Skip to content

Troubleshooting

Enable Debug Mode

You can enable the Debug feature of the SDK with the following configuration. After enabling it, on Android systems, you can directly view the output Debug logs in the Flutter compilation tool. For iOS, you need to compile and run through Xcode, compile with Xcode, or view the logs via the macOS Console app.

FTMobileFlutter.sdkConfig(
      serverUrl: serverUrl,
      debug: true, // Enable debug mode
  );

Note: It is recommended to disable this configuration when releasing the Release version.

Android Logcat and iOS Xcode Console log examples

SDK Runs Normally but No Data

  • Check whether Datakit is running normally.

  • Confirm that the SDK upload address datakitUrl or datawayUrl is configured correctly and initialized properly. In debug mode, check the synchronization logs in Android Logcat or iOS Xcode Console.

  • Check whether Datakit is uploading data to the corresponding workspace and whether it is offline. You can confirm this by logging into Guance and checking the "Infrastructure" section.

Errors During Pod Compilation

CocoaPods could not find compatible versions for pod "FTMobileSDK/FTMobileAgent"

[!] CocoaPods could not find compatible versions for pod "FTMobileSDK/FTMobileAgent":
  In snapshot (Podfile.lock):
    FTMobileSDK/FTMobileAgent (= 1.3.9-alpha.14)

  In Podfile:
    ft_mobile_agent_flutter (from `.symlinks/plugins/ft_mobile_agent_flutter/ios`) was resolved to 0.0.2, which depends on
      FTMobileSDK/FTMobileAgent (= 1.3.10-beta.2)


You have either:
 * out-of-date source repos which you can update with `pod repo update` or with `pod install --repo-update`.
 * changed the constraints of dependency `FTMobileSDK/FTMobileAgent` inside your development pod `ft_mobile_agent_flutter`.
   You should run `pod update FTMobileSDK/FTMobileAgent` to apply changes you've made.

If you encounter a similar version import issue when compiling the iOS application, you need to execute the following command in the terminal within the ios directory of your Flutter project:

pod install --repo-update

The Swift pod ft_mobile_agent_flutter depends upon FTMobileSDK, which does not define modules

In ft_mobile_agent_flutter ≤ 0.5.6, if the CocoaPods configuration does not explicitly specify use_module_headers! or use_frameworks!, executing pod install will trigger the following error:

[!] The following Swift pods cannot yet be integrated as static libraries:

The Swift pod `ft_mobile_agent_flutter` depends upon `FTMobileSDK`, which does not define modules. To opt into those targets generating module maps (which is necessary to import them from Swift when building as static libraries), you may set `use_modular_headers!` globally in your Podfile, or specify `:modular_headers => true` for particular dependencies.

Cause: ft_mobile_agent_flutter (developed in Swift) depends on the OC library FTMobileSDK. Because the FTMobileSDK.podspec lacks the DEFINES_MODULE = YES configuration, it causes a "module not found" error during iOS static library compilation.

Solution: Add the following configuration inside the target 'Runner' do code block in your project's Podfile:

target 'Runner' do
  flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
  pod 'FTMobileSDK', :modular_headers => true
end

Note: Adding :modular_headers => true is only a supplementary compilation configuration and does not repeatedly introduce the SDK.

Data Loss

Partial Data Loss

  • If some data from a specific RUM Session, or a few Log or Trace entries are missing, first check if sampleRate < 1 is set in FTRUMManager.setConfig, FTLogger.logConfig, or FTTracer.setConfig.
  • Is the collected RUM data incomplete, missing Resource or Action data?

    Resource and Action data are bound to the View. Ensure that there is a startView operation. Refer to the RUM-View documentation to implement View event collection.

  • Investigate network issues on the device uploading the data and network/load issues on the device where Datakit is installed.

Further Reading

Feedback

Is this page helpful? ×