plugins
plugins copied to clipboard
Problem using device manager to view logs on devices
Hi,
Tried to use the device manager to view the logs of my Tv device (not emulator), but nothing shows logs. The SDB and device manager recognizes the device without a problem but no logs are shown. Whereas, the logs when using the emulators, are displayed without issue.
I checked the documentation: https://docs.tizen.org/application/native/guides/error/system-logs/#dlogutil
There has been some prerequisites such as "libdlog.so", "dlogutil". Made sure everything is there. Is there anything i'm missing ?
The device's model is : "TU43CU7105KXXC".
Unfortunately, that's normal. Most of SDB features, including dlog, are not supported on TV due to VD's security policy. Only stdout/stderr of the running app process can be viewed in the flutter-tizen run console. (There are some options to see internal logs of the embedder or plugins.) The guide you checked is for native (C/C++) applications. Native app development is not possible with TV because they don't publicly release the native SDK.
Is there a specific log you want to see?
Hi, Thanks for the fast reply. So it's something related to the videoHole player plugin, i have the below piece of code, and sometimes there are some videos that works and some doesn't with almost the same parameters, so i'd like to get the LOGS that the native part outputs. It could be anything like:
LOG_ERROR("[DrmLicenseHelper] Invalid DRM Type");
LOG_ERROR("[DrmLicenseHelper] UserAgent attach
LOG_ERROR("[DrmLicenseHelper] Failed to set HTTP header.");
LOG_ERROR("[DrmLicenseHelper] Failed to compose post data, drm_result: 0x%lx",drm_result);
LOG_ERROR(
"[DrmLicenseHelper] Server returns response Code %ld [%s][%d]",
http_session->res_code, http_session->body.data,
http_session->body.size);
Current code:
@override
void initState() {
super.initState();
final myHeader = videoPlayerLicenseHeader(token);
_controller = VideoPlayerController.network(
_videoUrl,
drmConfigs: DrmConfigs(
type: _drmType,
licenseCallback: (Uint8List challenge) async {
final dio = Dio();
logger.i('send license request to license server...');
try {
final response = await dio.post(
_licenseUrl,
data: Stream.fromIterable(challenge.map((e) => [e])),
options: Options(
responseType: ResponseType.bytes, headers: myHeader),
);
String plainResponse = String.fromCharCodes(response.data);
logger.d(plainResponse);
return response.data;
} catch (e) {
if (e is DioError) {
if (kDebugMode) {
if (e.response != null) {
debugPrint(e.stackTrace);
final statusCode = e.response!.statusCode;
final statusMessage = e.response!.statusMessage;
final errorData = e.response!.data;
String errorDataString = String.fromCharCodes(errorData);
logger.e("statusCode : $statusCode");
logger.e("statusMessage : $statusMessage");
logger.e("errorDataString : \n$errorDataString");
}
}
return Uint8List(0);
} else {
//logger.e('Error while sending the license request: $e');
logger.i('Error while sending the license request: $e');
debugPrint("$e");
return Uint8List(0);
}
}
}),
);
What i get after decoding the byte data on a license with error message :
Ì
T
3FBE05BA5489A5C24800000000000000 3FBE05BA5489A5C24800000000000000
Whereas, when the license works, i get a readable xml response.
Hi, @IhabMks
As Mr.Kim said, dlog is not support on TV due to VD's security policy. You only can see the running app logs in flutter-tizen run console. For example, the videohole plugin:
change codes in log.h:
#include<iostream>
#define LOG(prio, fmt, arg...) \
printf("%s: %s(%d) > " fmt, __MODULE__, __func__, \
__LINE__, ##arg)
then you can see the logs in videohole plugin.
nit: For better line breaking
- printf("%s: %s(%d) > " fmt, __MODULE__, __func__, \
+ printf("%s: %s(%d) > " fmt "\n", __MODULE__, __func__, \
Hi, Well that's unfortunate, because currently i can't get the proper error message as i only get "Format not supported" which doesn't make sense because the same format video works fine without authorization and considering that, the error shouldn't be related to the format but to the authorization.
Closing since the issue is no longer related to the device logger. Please reopen or open a new issue if you're still facing the problem.