Open ClaireDavis opened 3 weeks ago
Here's an example project that shows the issue
Hi @ClaireDavis thank you for your report, we start looking into this.
Hi @ClaireDavis sorry to answer late, I can't replicate the issue, could you help me to show us the logs with the error please?
@edsonjab
In order to repro the error, I had to add a write key to the configuration. I then get this error on running the app and letting it load:
Launching lib/main.dart on iPhone 15 in debug mode...
Xcode build done. 18.9s
Connecting to VM Service at ws://127.0.0.1:52481/PzlgjxLpe4Q=/ws
Connected to the VM Service.
[ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: Null check operator used on a null value
#0 AppsFlyerDestination.track (package:segment_analytics_plugin_appsflyer/plugin_appsflyer.dart:110:22)
plugin_appsflyer.dart:110
#1 EventPlugin.execute (package:segment_analytics/plugin.dart:54:16)
plugin.dart:54
#2 DestinationPlugin.process (package:segment_analytics/plugin.dart:163:17)
plugin.dart:163
<asynchronous suspension>
I've attached a zip showing the issue. You'll notice that settings
is null
at first which triggers an early return but then tracking events force unwrap appsFlyer
even though it was never initialized.
Hi @ClaireDavis sorry to answer late, this is an example to use the AppsFlyerDestination plugin:
Hello - I'm attempting to migrate my app to use the latest analytics_flutter package, but when I try to add the appsflyer plugin, it doesn't initialize properly.
This is how I'm setting up my analytics client:
Then when
update
is called inAppsFlyerDestination
, thesettings
map is null so it returns early on line 24 ofplugin_appsflyer.dart
. Later whenidentify
is called, there is a userId, but then line 61 throws an error because it's force unwrappingappsFlyer
which was never set inupdate
because of the early return.How can I get this to work properly?