flutter-ml / google_ml_kit_flutter

A flutter plugin that implements Google's standalone ML Kit
MIT License
997 stars 753 forks source link

Google ML ^0.16.1 crash the Firestore. #495

Closed HeroRickyGAMES closed 7 months ago

HeroRickyGAMES commented 1 year ago

When I make an application with Firestore Firebase it crashes and keeps the device as offline, I researched and I think it's in the google play integration services, I think there was some incompatibility.

Haris2v commented 1 year ago

Can you please share your flutter doctor details along with the crash logs ?

HeroRickyGAMES commented 1 year ago

[√] Flutter (Channel stable, 3.10.6, on Microsoft Windows [versao 10.0.19045.2965], locale pt-BR) [√] Windows Version (Installed version of Windows is version 10 or higher) [√] Android toolchain - develop for Android devices (Android SDK version 34.0.0) [√] Chrome - develop for the web [√] Visual Studio - develop for Windows (Visual Studio Enterprise 2022 17.7.0 Preview 4.0) [√] Android Studio (version 2022.2) [√] Connected device (2 available) [√] Network resources

• No issues found!

Log: I/FirebaseApp(30047): Device unlocked: initializing all Firebase APIs for app [DEFAULT] W/System (30047): Ignoring header X-Firebase-Locale because its value was null. W/DynamiteModule(30047): Local module descriptor class for com.google.android.gms.providerinstaller.dynamite not found. I/DynamiteModule(30047): Considering local module com.google.android.gms.providerinstaller.dynamite:0 and remote module com.google.android.gms.providerinstaller.dynamite:0 W/ProviderInstaller(30047): Failed to load providerinstaller module: No acceptable module com.google.android.gms.providerinstaller.dynamite found. Local version is 0 and remote version is 0. V/NativeCrypto(30047): Registering com/google/android/gms/org/conscrypt/NativeCrypto's 295 native methods... W/er.glk_controls(30047): Accessing hidden method Ljava/security/spec/ECParameterSpec;->getCurveName()Ljava/lang/String; (unsupported, reflection, allowed) I/ProviderInstaller(30047): Installed default security provider GmsCore_OpenSSL W/er.glk_controls(30047): Accessing hidden method Ljava/security/spec/ECParameterSpec;->setCurveName(Ljava/lang/String;)V (unsupported, reflection, allowed) W/er.glk_controls(30047): Accessing hidden field Ljava/net/Socket;->impl:Ljava/net/SocketImpl; (unsupported, reflection, allowed) W/System (30047): Ignoring header X-Firebase-Locale because its value was null. D/FirebaseAuth(30047): Notifying id token listeners about user ( qBuUqI1QqwaG4rwWxKo88eNPBrd2 ). W/Firestore(30047): (24.7.0) [WatchStream]: (6a4d5ee) Stream closed with status: Status{code=INTERNAL, description=error in frame handler, cause=java.lang.NoSuchMethodError: No interface method getBuffer()Lokio/Buffer; in class Lokio/BufferedSource; or its super classes (declaration of 'okio.BufferedSource' appears in /data/app/~~_WO_R9JSBgleooxaAzOZIA==/com.hrs.flutter.glk_controls-Y_TMewtDrbCetdmhUR2Cdw==/base.apk!classes7.dex) W/Firestore(30047): at io.grpc.okhttp.OkHttpClientTransport$ClientFrameHandler.data(OkHttpClientTransport.java:1146) W/Firestore(30047): at io.grpc.okhttp.internal.framed.Http2$Reader.readData(Http2.java:236) W/Firestore(30047): at io.grpc.okhttp.internal.framed.Http2$Reader.nextFrame(Http2.java:148) W/Firestore(30047): at io.grpc.okhttp.OkHttpClientTransport$ClientFrameHandler.run(OkHttpClientTransport.java:1105) W/Firestore(30047): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1137) W/Firestore(30047): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:637) W/Firestore(30047): at java.lang.Thread.run(Thread.java:1012) W/Firestore(30047): }. W/Firestore(30047): (24.7.0) [OnlineStateTracker]: Could not reach Cloud Firestore backend. Connection failed 1 times. Most recent error: Status{code=INTERNAL, description=error in frame handler, cause=java.lang.NoSuchMethodError: No interface method getBuffer()Lokio/Buffer; in class Lokio/BufferedSource; or its super classes (declaration of 'okio.BufferedSource' appears in /data/app/~~_WO_R9JSBgleooxaAzOZIA==/com.hrs.flutter.glk_controls-Y_TMewtDrbCetdmhUR2Cdw==/base.apk!classes7.dex) W/Firestore(30047): at io.grpc.okhttp.OkHttpClientTransport$ClientFrameHandler.data(OkHttpClientTransport.java:1146) W/Firestore(30047): at io.grpc.okhttp.internal.framed.Http2$Reader.readData(Http2.java:236) W/Firestore(30047): at io.grpc.okhttp.internal.framed.Http2$Reader.nextFrame(Http2.java:148) W/Firestore(30047): at io.grpc.okhttp.OkHttpClientTransport$ClientFrameHandler.run(OkHttpClientTransport.java:1105) W/Firestore(30047): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1137) W/Firestore(30047): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:637) W/Firestore(30047): at java.lang.Thread.run(Thread.java:1012) W/Firestore(30047): } W/Firestore(30047): This typically indicates that your device does not have a healthy Internet connection at the moment. The client will operate in offline mode until it is able to successfully connect to the backend. W/Firestore(30047): (24.7.0) [WatchStream]: (6a4d5ee) Stream closed with status: Status{code=INTERNAL, description=error in frame handler, cause=java.lang.NoSuchMethodError: No interface method getBuffer()Lokio/Buffer; in class Lokio/BufferedSource; or its super classes (declaration of 'okio.BufferedSource' appears in /data/app/~~_WO_R9JSBgleooxaAzOZIA==/com.hrs.flutter.glk_controls-Y_TMewtDrbCetdmhUR2Cdw==/base.apk!classes7.dex) W/Firestore(30047): at io.grpc.okhttp.OkHttpClientTransport$ClientFrameHandler.data(OkHttpClientTransport.java:1146) W/Firestore(30047): at io.grpc.okhttp.internal.framed.Http2$Reader.readData(Http2.java:236) W/Firestore(30047): at io.grpc.okhttp.internal.framed.Http2$Reader.nextFrame(Http2.java:148) W/Firestore(30047): at io.grpc.okhttp.OkHttpClientTransport$ClientFrameHandler.run(OkHttpClientTransport.java:1105) W/Firestore(30047): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1137) W/Firestore(30047): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:637) W/Firestore(30047): at java.lang.Thread.run(Thread.java:1012) W/Firestore(30047): }. W/Firestore(30047): (24.7.0) [WatchStream]: (6a4d5ee) Stream closed with status: Status{code=INTERNAL, description=error in frame handler, cause=java.lang.NoSuchMethodError: No interface method getBuffer()Lokio/Buffer; in class Lokio/BufferedSource; or its super classes (declaration of 'okio.BufferedSource' appears in /data/app/~~_WO_R9JSBgleooxaAzOZIA==/com.hrs.flutter.glk_controls-Y_TMewtDrbCetdmhUR2Cdw==/base.apk!classes7.dex) W/Firestore(30047): at io.grpc.okhttp.OkHttpClientTransport$ClientFrameHandler.data(OkHttpClientTransport.java:1146) W/Firestore(30047): at io.grpc.okhttp.internal.framed.Http2$Reader.readData(Http2.java:236) W/Firestore(30047): at io.grpc.okhttp.internal.framed.Http2$Reader.nextFrame(Http2.java:148) W/Firestore(30047): at io.grpc.okhttp.OkHttpClientTransport$ClientFrameHandler.run(OkHttpClientTransport.java:1105) W/Firestore(30047): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1137) W/Firestore(30047): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:637) W/Firestore(30047): at java.lang.Thread.run(Thread.java:1012) W/Firestore(30047): }. W/Firestore(30047): (24.7.0) [WatchStream]: (6a4d5ee) Stream closed with status: Status{code=INTERNAL, description=error in frame handler, cause=java.lang.NoSuchMethodError: No interface method getBuffer()Lokio/Buffer; in class Lokio/BufferedSource; or its super classes (declaration of 'okio.BufferedSource' appears in /data/app/~~_WO_R9JSBgleooxaAzOZIA==/com.hrs.flutter.glk_controls-Y_TMewtDrbCetdmhUR2Cdw==/base.apk!classes7.dex) W/Firestore(30047): at io.grpc.okhttp.OkHttpClientTransport$ClientFrameHandler.data(OkHttpClientTransport.java:1146) W/Firestore(30047): at io.grpc.okhttp.internal.framed.Http2$Reader.readData(Http2.java:236) W/Firestore(30047): at io.grpc.okhttp.internal.framed.Http2$Reader.nextFrame(Http2.java:148) W/Firestore(30047): at io.grpc.okhttp.OkHttpClientTransport$ClientFrameHandler.run(OkHttpClientTransport.java:1105) W/Firestore(30047): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1137) W/Firestore(30047): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:637) W/Firestore(30047): at java.lang.Thread.run(Thread.java:1012) W/Firestore(30047): }. W/Firestore(30047): (24.7.0) [WatchStream]: (6a4d5ee) Stream closed with status: Status{code=INTERNAL, description=error in frame handler, cause=java.lang.NoSuchMethodError: No interface method getBuffer()Lokio/Buffer; in class Lokio/BufferedSource; or its super classes (declaration of 'okio.BufferedSource' appears in /data/app/~~_WO_R9JSBgleooxaAzOZIA==/com.hrs.flutter.glk_controls-Y_TMewtDrbCetdmhUR2Cdw==/base.apk!classes7.dex) W/Firestore(30047): at io.grpc.okhttp.OkHttpClientTransport$ClientFrameHandler.data(OkHttpClientTransport.java:1146) W/Firestore(30047): at io.grpc.okhttp.internal.framed.Http2$Reader.readData(Http2.java:236) W/Firestore(30047): at io.grpc.okhttp.internal.framed.Http2$Reader.nextFrame(Http2.java:148) W/Firestore(30047): at io.grpc.okhttp.OkHttpClientTransport$ClientFrameHandler.run(OkHttpClientTransport.java:1105) W/Firestore(30047): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1137) W/Firestore(30047): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:637) W/Firestore(30047): at java.lang.Thread.run(Thread.java:1012) W/Firestore(30047): }.

HeroRickyGAMES commented 1 year ago

Can you please share your flutter doctor details along with the crash logs ?

I don't know where this bug is, but I know that I only use TextRecognizer, I only installed it and it came back, but this could be spreading to other plugins like the QR code reader.

johnlim1001 commented 1 year ago

When I make an application with Firestore Firebase it crashes and keeps the device as offline, I researched and I think it's in the google play integration services, I think there was some incompatibility.

I face the same issue when using google_mlkit_digital_ink_recognition

fbernaly commented 1 year ago

Please look at the other similar Firebase issue that have been close. There is a compatibility issue between Google's dependencies when using ML Kit and Firebase. https://github.com/flutter-ml/google_ml_kit_flutter/issues?q=label%3AFirebase+is%3Aclosed I hope that helps.

github-actions[bot] commented 7 months ago

This issue is stale because it has been open for 30 days with no activity.

github-actions[bot] commented 7 months ago

This issue was closed because it has been inactive for 14 days since being marked as stale.