Closed nksyed closed 3 years ago
These are the errors we're getting after restarting the app, I replaced the app Id with myAppId:
W/IInputConnectionWrapper(10088): beginBatchEdit on inactive InputConnection
W/IInputConnectionWrapper(10088): getTextBeforeCursor on inactive InputConnection
W/IInputConnectionWrapper(10088): getTextAfterCursor on inactive InputConnection
W/IInputConnectionWrapper(10088): getSelectedText on inactive InputConnection
W/IInputConnectionWrapper(10088): endBatchEdit on inactive InputConnection
D/EGL_emulation(10088): eglMakeCurrent: 0x749d93846ea0: ver 3 0 (tinfo 0x749d939ee5a0)
W/FlutterJNI(10088): Tried to send a platform message to Flutter, but FlutterJNI was detached from native C++. Could not send. Channel: flutter/textinput. Response ID: 0
W/FlutterJNI(10088): Tried to send a platform message to Flutter, but FlutterJNI was detached from native C++. Could not send. Channel: flutter/textinput. Response ID: 0
W/ActivityThread(10088): handleWindowVisibility: no activity for token android.os.BinderProxy@5dcbb42
D/EGL_emulation(10088): eglCreateContext: 0x749d93846680: maj 3 min 0 rcv 3
D/ (10088): HostConnection::get() New Host Connection established 0x749d938363c0, tid 10162
D/EGL_emulation(10088): eglMakeCurrent: 0x749d93846680: ver 3 0 (tinfo 0x749d939489a0)
D/ (10088): HostConnection::get() New Host Connection established 0x749d99696820, tid 10161
D/EGL_emulation(10088): eglCreateContext: 0x749d91cd99e0: maj 3 min 0 rcv 3
D/EGL_emulation(10088): eglMakeCurrent: 0x749d91cd99e0: ver 3 0 (tinfo 0x749d91d084c0)
D/EGL_emulation(10088): eglMakeCurrent: 0x749d93846ea0: ver 3 0 (tinfo 0x749d939ee5a0)
E/MethodChannel#flutter_mongo_stitch(10088): Failed to handle method call
E/MethodChannel#flutter_mongo_stitch(10088): java.lang.IllegalStateException: default app can only be set once; currently set to 'chexapp-zykko'
E/MethodChannel#flutter_mongo_stitch(10088): at com.mongodb.stitch.android.core.Stitch.initializeDefaultAppClient(Stitch.java:175)
E/MethodChannel#flutter_mongo_stitch(10088): at com.mongodb.stitch.android.core.Stitch.initializeDefaultAppClient(Stitch.java:149)
E/MethodChannel#flutter_mongo_stitch(10088): at com.example.flutter_mongo_stitch.FlutterMongoStitchPlugin.connectMongo(FlutterMongoStitchPlugin.kt:118)
E/MethodChannel#flutter_mongo_stitch(10088): at com.example.flutter_mongo_stitch.FlutterMongoStitchPlugin.onMethodCall(FlutterMongoStitchPlugin.kt:76)
E/MethodChannel#flutter_mongo_stitch(10088): at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(MethodChannel.java:226)
E/MethodChannel#flutter_mongo_stitch(10088): at io.flutter.embedding.engine.dart.DartMessenger.handleMessageFromDart(DartMessenger.java:85)
E/MethodChannel#flutter_mongo_stitch(10088): at io.flutter.embedding.engine.FlutterJNI.handlePlatformMessage(FlutterJNI.java:631)
E/MethodChannel#flutter_mongo_stitch(10088): at android.os.MessageQueue.nativePollOnce(Native Method)
E/MethodChannel#flutter_mongo_stitch(10088): at android.os.MessageQueue.next(MessageQueue.java:326)
E/MethodChannel#flutter_mongo_stitch(10088): at android.os.Looper.loop(Looper.java:160)
E/MethodChannel#flutter_mongo_stitch(10088): at android.app.ActivityThread.main(ActivityThread.java:6669)
E/MethodChannel#flutter_mongo_stitch(10088): at java.lang.reflect.Method.invoke(Native Method)
E/MethodChannel#flutter_mongo_stitch(10088): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
E/MethodChannel#flutter_mongo_stitch(10088): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
D/EGL_emulation(10088): eglMakeCurrent: 0x749d91cd99e0: ver 3 0 (tinfo 0x749d91d084c0)
E/flutter (10088): [ERROR:flutter/lib/ui/ui_dart_state.cc(157)] Unhandled Exception: PlatformException(error, default app can only be set once; currently set to 'MyAppId', null)
E/flutter (10088): #0 StandardMethodCodec.decodeEnvelope
package:flutter/…/services/message_codecs.dart:569
E/flutter (10088): #1 MethodChannel._invokeMethod
package:flutter/…/services/platform_channel.dart:156
E/flutter (10088):
Hi, I'll try to fix the issue soon, thanks!
Hello, Any fix for the above issue? I am using a try/catch block to check and catch the exception to prevent my app from crashing.
this happens when I do hot reload during development.
is there any other way to check if the MongoStitchClient is initialized without it throwing an error when we reload the app?
`void main() async { WidgetsFlutterBinding.ensureInitialized(); try { await MongoStitchClient.initializeApp("MyApp-Id"); } catch (e) { print(e); }
runApp(MyApp()); }`
Fixed, will be updated soon
Getting an error after closing the app through the back button on Android, and relaunching the app through recent apps. We assume it's because our main.dart is trying to run MongoStitchClient.initializeApp() again.