rohitsangwan01 / pocketbase_server_flutter

Start Pocketbase Server directly from Android/IOS with Flutter
MIT License
28 stars 2 forks source link

Error Kotlin uninitialized property access exception #2

Open FigueiredoStable opened 4 months ago

FigueiredoStable commented 4 months ago

Only on Samsung Galaxy Tab A (SM X200) Android 14 the application don't start the pocketbase, in others versions it's ok. I try run the example app two, but show the same error.

Trace:

E/MethodChannel#com.pocketbase.mobile.channel(17735): kotlin.UninitializedPropertyAccessException: lateinit property activity has not been initialized
E/MethodChannel#com.pocketbase.mobile.channel(17735):   at com.rohit.pocketbase_server_flutter.PocketbaseServerFlutterPlugin.haveNotificationPermission(PocketbaseServerFlutterPlugin.kt:165)
E/MethodChannel#com.pocketbase.mobile.channel(17735):   at com.rohit.pocketbase_server_flutter.PocketbaseServerFlutterPlugin.startPocketbaseService(PocketbaseServerFlutterPlugin.kt:93)
E/MethodChannel#com.pocketbase.mobile.channel(17735):   at com.rohit.pocketbase_server_flutter.PocketbaseServerFlutterPlugin.onMethodCall(PocketbaseServerFlutterPlugin.kt:60)
E/MethodChannel#com.pocketbase.mobile.channel(17735):   at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(MethodChannel.java:267)
E/MethodChannel#com.pocketbase.mobile.channel(17735):   at io.flutter.embedding.engine.dart.DartMessenger.invokeHandler(DartMessenger.java:292)
E/MethodChannel#com.pocketbase.mobile.channel(17735):   at io.flutter.embedding.engine.dart.DartMessenger.lambda$dispatchMessageToQueue$0$io-flutter-embedding-engine-dart-DartMessenger(DartMessenger.java:319)
E/MethodChannel#com.pocketbase.mobile.channel(17735):   at io.flutter.embedding.engine.dart.DartMessenger$$ExternalSyntheticLambda0.run(Unknown Source:12)
E/MethodChannel#com.pocketbase.mobile.channel(17735):   at android.os.Handler.handleCallback(Handler.java:958)
E/MethodChannel#com.pocketbase.mobile.channel(17735):   at android.os.Handler.dispatchMessage(Handler.java:99)
E/MethodChannel#com.pocketbase.mobile.channel(17735):   at android.os.Looper.loopOnce(Looper.java:230)
E/MethodChannel#com.pocketbase.mobile.channel(17735):   at android.os.Looper.loop(Looper.java:319)
E/MethodChannel#com.pocketbase.mobile.channel(17735):   at android.app.ActivityThread.main(ActivityThread.java:8913)
E/MethodChannel#com.pocketbase.mobile.channel(17735):   at java.lang.reflect.Method.invoke(Native Method)
E/MethodChannel#com.pocketbase.mobile.channel(17735):   at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:608)
E/MethodChannel#com.pocketbase.mobile.channel(17735):   at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1103)
TheFehr commented 1 month ago

I have the same issue on a Nothing Phone 2

Alvish0407 commented 1 month ago

same issue