Troubleshooting¶
SDK Initialization Exception Check¶
Check Logcat
to see if there are logs with Level
as Error
and Tag
prefixed with [FT-SDK]
.
The SDK internally uses assertions to check the correctness of multiple configurations. If the configuration is incorrect, the program will crash and output relevant warnings. However, this only takes effect in the Debug environment by default. It is recommended to use the offline packaging project to create a custom debugging base, and set it to also take effect in the Release environment.
Click project
-> target
-> Build Settings
, search for ENABLE_NS_ASSERTIONS
, and change the Release setting to Yes.
It is recommended to configure this only in the debugging base, and use the default configuration for normal packaging and distribution.
If the above configuration is not performed, you can also enable Debug debugging, and check the debugging logs in the "Console" to determine whether the SDK is initialized successfully.
Enable Debug Debugging¶
You can enable the debug function of the SDK through the following configuration.
var ftMobileSDK = uni.requireNativePlugin("GCUniPlugin-MobileAgent");
ftMobileSDK.sdkConfig({
'serverUrl': SDKConst.SERVER_URL,
'debug': true,
});
It is recommended to turn off this configuration when releasing the version
Check the logs with Tag
prefixed with [FT-SDK]
in Logcat
.
Check the SDK debugging logs in the "Console" on the Mac.
"Console" usage:
Select Action
, check Include Brief Information
, Include Debug Information
.
Select the debugging device, click the Start
button, and enter the search condition [FTLog] in the search condition box on the right. At this time, you can view the SDK debugging logs.
Android Logcat and iOS Xcode Console log samples
SDK Runs Normally but No Data¶
-
Check Datakit to see if it is running normally.
-
Confirm that the SDK upload address
serverUrl
is configured correctly, and initialized correctly. In debug mode, check the synchronization logs in Android Logcat or iOS Xcode Console. -
Check if datakit is uploading data to the corresponding workspace and if it is offline. This can be confirmed by logging into Guance and checking the "Infrastructure".
Data Loss¶
Partial Data Loss¶
-
If some data in a RUM Session or a few data in Log, Trace are lost, first exclude whether
samplerate < 1
is set in FTRUMConfig, FTLoggerConfig, FTTraceConfig. -
Is the collected RUM data incomplete, with no Resource or Action data?
Resource and Action data are bound to View. Ensure that there is a - startView operation. Refer to the RUM-View document to implement View event collection.
-
Check the network of the device uploading data and the network and load of the device where datakit is installed.