plus_plugins
plus_plugins copied to clipboard
lateinit property sensorEventListener has not been initialized
System info
Platform the Issue occurs on: Android Plugin name: sensors_plus Plugin version: 1.3.1
Steps to Reproduce
- Not sure, only seeing the logs in Crashlytics
Caused by x8.r: lateinit property sensorEventListener has not been initialized
at dev.fluttercommunity.plus.sensors.StreamHandlerImpl.onCancel(StreamHandlerImpl.java:12)
at dev.fluttercommunity.plus.sensors.SensorsPlugin.teardownEventChannels(SensorsPlugin.java:40)
at dev.fluttercommunity.plus.sensors.SensorsPlugin.onDetachedFromEngine(SensorsPlugin.java:5)
at io.flutter.embedding.engine.FlutterEngineConnectionRegistry.remove(FlutterEngineConnectionRegistry.java:143)
at io.flutter.embedding.engine.FlutterEngineConnectionRegistry.remove(FlutterEngineConnectionRegistry.java:16)
at io.flutter.embedding.engine.FlutterEngineConnectionRegistry.removeAll(FlutterEngineConnectionRegistry.java:11)
at io.flutter.embedding.engine.FlutterEngineConnectionRegistry.destroy(FlutterEngineConnectionRegistry.java:10)
at io.flutter.embedding.engine.FlutterEngine.destroy(FlutterEngine.java:31)
at io.flutter.embedding.android.FlutterActivityAndFragmentDelegate.onDetach(FlutterActivityAndFragmentDelegate.java:90)
at io.flutter.embedding.android.FlutterActivity.onDestroy(FlutterActivity.java:18)
at android.app.Activity.performDestroy(Activity.java:8225)
at android.app.Instrumentation.callActivityOnDestroy(Instrumentation.java:1342)
at android.app.ActivityThread.performDestroyActivity(ActivityThread.java:5441)
at android.app.ActivityThread.handleDestroyActivity(ActivityThread.java:5493)
at android.app.servertransaction.DestroyActivityItem.execute(DestroyActivityItem.java:44)
at android.app.servertransaction.TransactionExecutor.executeLifecycleState(TransactionExecutor.java:176)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:97)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2267)
at android.os.Handler.dispatchMessage(Handler.java:107)
at android.os.Looper.loop(Looper.java:237)
at android.app.ActivityThread.main(ActivityThread.java:8167)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:496)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1100)
System info
Platform the Issue occurs on: Android Plugin name: sensors_plus Plugin version: 1.3.1
Steps to Reproduce
- Not sure, only seeing the logs in Crashlytics
Caused by x8.r: lateinit property sensorEventListener has not been initialized at dev.fluttercommunity.plus.sensors.StreamHandlerImpl.onCancel(StreamHandlerImpl.java:12) at dev.fluttercommunity.plus.sensors.SensorsPlugin.teardownEventChannels(SensorsPlugin.java:40) at dev.fluttercommunity.plus.sensors.SensorsPlugin.onDetachedFromEngine(SensorsPlugin.java:5) at io.flutter.embedding.engine.FlutterEngineConnectionRegistry.remove(FlutterEngineConnectionRegistry.java:143) at io.flutter.embedding.engine.FlutterEngineConnectionRegistry.remove(FlutterEngineConnectionRegistry.java:16) at io.flutter.embedding.engine.FlutterEngineConnectionRegistry.removeAll(FlutterEngineConnectionRegistry.java:11) at io.flutter.embedding.engine.FlutterEngineConnectionRegistry.destroy(FlutterEngineConnectionRegistry.java:10) at io.flutter.embedding.engine.FlutterEngine.destroy(FlutterEngine.java:31) at io.flutter.embedding.android.FlutterActivityAndFragmentDelegate.onDetach(FlutterActivityAndFragmentDelegate.java:90) at io.flutter.embedding.android.FlutterActivity.onDestroy(FlutterActivity.java:18) at android.app.Activity.performDestroy(Activity.java:8225) at android.app.Instrumentation.callActivityOnDestroy(Instrumentation.java:1342) at android.app.ActivityThread.performDestroyActivity(ActivityThread.java:5441) at android.app.ActivityThread.handleDestroyActivity(ActivityThread.java:5493) at android.app.servertransaction.DestroyActivityItem.execute(DestroyActivityItem.java:44) at android.app.servertransaction.TransactionExecutor.executeLifecycleState(TransactionExecutor.java:176) at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:97) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2267) at android.os.Handler.dispatchMessage(Handler.java:107) at android.os.Looper.loop(Looper.java:237) at android.app.ActivityThread.main(ActivityThread.java:8167) at java.lang.reflect.Method.invoke(Method.java) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:496) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1100)
same error on Samsung devices
Do you have any 'Steps to Reproduce' @darwin-morocho ? I can test with a samsung s8, would that device be representative of the issue?
Open a flutter app but don't open any of the sensor streams. Press the back button to close the app.
On 19 Apr 2022, at 02:08, fabiancrx @.***> wrote:
Do you have any 'Steps to Reproduce' @darwin-morocho ? I can test with a samsung s8, would that device be representative of the issue?
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.
Do you have any 'Steps to Reproduce' @darwin-morocho ? I can test with a samsung s8, would that device be representative of the issue?
Galaxy S21+ 5G and Galaxy S8+. I my case I just close the app and then In my firebase console I have the next error report
dev.fluttercommunity.plus.sensors.StreamHandlerImpl.onCancel (StreamHandlerImpl.java:12)
dev.fluttercommunity.plus.sensors.SensorsPlugin.teardownEventChannels (SensorsPlugin.java:40)
dev.fluttercommunity.plus.sensors.SensorsPlugin.onDetachedFromEngine (SensorsPlugin.java:5)
io.flutter.embedding.engine.FlutterEngineConnectionRegistry.remove (FlutterEngineConnectionRegistry.java:143)
io.flutter.embedding.engine.FlutterEngineConnectionRegistry.remove (FlutterEngineConnectionRegistry.java:16)
io.flutter.embedding.engine.FlutterEngineConnectionRegistry.removeAll (FlutterEngineConnectionRegistry.java:11)
io.flutter.embedding.engine.FlutterEngineConnectionRegistry.destroy (FlutterEngineConnectionRegistry.java:10)
io.flutter.embedding.engine.FlutterEngine.destroy (FlutterEngine.java:31)
io.flutter.embedding.android.FlutterActivityAndFragmentDelegate.onDetach (FlutterActivityAndFragmentDelegate.java:90)
io.flutter.embedding.android.FlutterActivity.onDestroy (FlutterActivity.java:18)
android.app.Activity.performDestroy (Activity.java:8468)
android.app.Instrumentation.callActivityOnDestroy (Instrumentation.java:1344)
android.app.ActivityThread.performDestroyActivity (ActivityThread.java:5622)
android.app.ActivityThread.handleDestroyActivity (ActivityThread.java:5682)
android.app.servertransaction.DestroyActivityItem.execute (DestroyActivityItem.java:44)
android.app.servertransaction.TransactionExecutor.executeLifecycleState (TransactionExecutor.java:176)
android.app.servertransaction.TransactionExecutor.execute (TransactionExecutor.java:97)
android.app.ActivityThread$H.handleMessage (ActivityThread.java:2317)
android.os.Handler.dispatchMessage (Handler.java:106)
android.os.Looper.loop (Looper.java:246)
android.app.ActivityThread.main (ActivityThread.java:8595)
java.lang.reflect.Method.invoke (Method.java)
com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:602)
com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1130)
Thanks @darwin-morocho and @Wackymax, I'll take a look at this issue
Actually it seems this issue should be solved after #838 is merged
Actually it seems this issue should be solved after #838 is merged
It happens to most of the devices and the emulator as well using sensors_plus: 1.3.1 . Just when you close the app with the back button it occurs.
Any update on this? I see there is an open PR, when will it be merged and released?
My app also has this issue, so it would be great if the PR was merged as soon as possible.
Please fix this bug
For anyone who is in a hurry or blocked by this PR not being merged you could just override the dependency with the code from the PR in your pubspec.yaml
dependencies:
sensors_plus:
git:
url: https://github.com/Rexios80/plus_plugins
ref: c6ddf49f6c2a3ea553c86033ef5427893dc07707
path: packages/sensors_plus/sensors_plus
cc: @offline-first
This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 15 days
We can close this as #838 is merged👀