13 Jul 2023 09:22 PM - edited 13 Jul 2023 09:22 PM
I did all the documentation steps to initialize Dynatrace on my Flutter (Android) app.
I've runned dynatrace_flutter_plugin successfully, but it keeps not working. I'm using the latest plugin version dynatrace_flutter_plugin: ^3.269.1
E/MethodChannel#dynatrace_flutter_plugin/dynatrace( 8397): Failed to handle method call
E/MethodChannel#dynatrace_flutter_plugin/dynatrace( 8397): java.lang.NullPointerException: Attempt to read from field 'boolean com.dynatrace.android.agent.conf.Configuration.autoStart' on a null object reference in method 'void com.dynatrace.android.agent.DynatraceMethodCallHandler.onMethodCall(io.flutter.plugin.common.MethodCall, io.flutter.plugin.common.MethodChannel$Result)'
E/MethodChannel#dynatrace_flutter_plugin/dynatrace( 8397): at com.dynatrace.android.agent.DynatraceMethodCallHandler.onMethodCall(DynatraceMethodCallHandler.java:120)
E/MethodChannel#dynatrace_flutter_plugin/dynatrace( 8397): at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(MethodChannel.java:262)
E/MethodChannel#dynatrace_flutter_plugin/dynatrace( 8397): at io.flutter.embedding.engine.dart.DartMessenger.invokeHandler(DartMessenger.java:295)
E/MethodChannel#dynatrace_flutter_plugin/dynatrace( 8397): at io.flutter.embedding.engine.dart.DartMessenger.lambda$dispatchMessageToQueue$0$io-flutter-embedding-engine-dart-DartMessenger(DartMessenger.java:319)
E/MethodChannel#dynatrace_flutter_plugin/dynatrace( 8397): at io.flutter.embedding.engine.dart.DartMessenger$$ExternalSyntheticLambda0.run(Unknown Source:12)
E/MethodChannel#dynatrace_flutter_plugin/dynatrace( 8397): at android.os.Handler.handleCallback(Handler.java:942)
E/MethodChannel#dynatrace_flutter_plugin/dynatrace( 8397): at android.os.Handler.dispatchMessage(Handler.java:99)
E/MethodChannel#dynatrace_flutter_plugin/dynatrace( 8397): at android.os.Looper.loopOnce(Looper.java:201)
E/MethodChannel#dynatrace_flutter_plugin/dynatrace( 8397): at android.os.Looper.loop(Looper.java:288)
E/MethodChannel#dynatrace_flutter_plugin/dynatrace( 8397): at android.app.ActivityThread.main(ActivityThread.java:7872)
E/MethodChannel#dynatrace_flutter_plugin/dynatrace( 8397): at java.lang.reflect.Method.invoke(Native Method)
E/MethodChannel#dynatrace_flutter_plugin/dynatrace( 8397): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
E/MethodChannel#dynatrace_flutter_plugin/dynatrace( 8397): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:936)
I/flutter ( 8397): [2023-07-13 17:09:45][ERROR][DYNATRACE]: Dynatrace Flutter Plugin failed to initialize. Error: PlatformException(error, Attempt to read from field 'boolean com.dynatrace.android.agent.conf.Configuration.autoStart' on a null object reference in method 'void com.dynatrace.android.agent.DynatraceMethodCallHandler.onMethodCall(io.flutter.plugin.common.MethodCall, io.flutter.plugin.common.MethodChannel$Result)', null, java.lang.NullPointerException: Attempt to read from field 'boolean com.dynatrace.android.agent.conf.Configuration.autoStart' on a null object reference in method 'void com.dynatrace.android.agent.DynatraceMethodCallHandler.onMethodCall(io.flutter.plugin.common.MethodCall, io.flutter.plugin.common.MethodChannel$Result)'
I/flutter ( 8397): at com.dynatrace.android.agent.DynatraceMethodCallHandler.onMethodCall(DynatraceMethodCallHandler.java:120)
I/flutter ( 8397): at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(MethodChannel.java:262)
I/flutter ( 8397): at io.flutter.embedding.engine.dart.DartMessenger.invokeHandler(DartMes
I/flutter ( 8397): [2023-07-13 17:09:46][WARNING][DYNATRACE]: Dynatrace enterAction(Navigated to screen financeStatementDigitalAccount): Dynatrace().start() method was not called! Action will have no effect.
14 Jul 2023 05:49 PM
Hi there!
Just to recap:
If so and you still receive the same issue that you mentioned, please create a support ticket and add your dynatrace.config.yaml file and the full debug logs at your convenience:
https://pub.dev/packages/dynatrace_flutter_plugin#a-namestartplugina3-start-the-flutter-plugin
Thanks!
Nick
18 Jul 2023 05:12 PM - edited 18 Jul 2023 05:20 PM
Hi!
Yes, I did all the steps as you said.
I'm thinking that the problem may be related to my project being a module and not an app. Do you support Flutter module interoperability with native app? I didn't find this on the doc.
01 Aug 2023 12:48 PM - edited 01 Aug 2023 12:48 PM
Hi there.
Apologies for the delay. When using our plugin/package, the native parts should work as well. I don't believe this error is related to that specifically. I would suggest again to create a support ticket to further investigate the issue. Please attach the error and steps that you've done already along with all of the information listed in the open a support case section.
Thanks!
Nick