Flutter Firestore throwing Google Playstore exception on emulator - flutter

I am using Firebase auth and Firebase Firestore. My auth implementation i working fine. As soon as I hooked the Firebase Firestore, I keep getting a FATAL error that Google Playstore service is needed. I am running on Pixel_3a_API_30_x86 emulator. Firestore does not require Google Play service as per the google documentation. I am not sure why is this happening. I have googled but nothing have I found. On a different emulator, it is working fine. I am using a Mac. Here is the error reported in IDE. Thanks in advance for any advise.
/GooglePlayServicesUtil( 3512): Google Play Store is missing.
E/GooglePlayServicesUtil( 3512): GooglePlayServices not available due to error 9
W/Firestore( 3512): (23.0.4) [GrpcCallProvider]: Failed to update ssl context: com.google.android.gms.common.GooglePlayServicesNotAvailableException
I/TetheringManager( 3512): registerTetheringEventCallback:com.theshuk.rental
W/.theshuk.renta( 3512): Accessing hidden method Lcom/android/org/conscrypt/OpenSSLSocketImpl;->getAlpnSelectedProtocol()[B (greylist-max-q,core-platform-api, reflection, denied)
W/.theshuk.renta( 3512): Accessing hidden method Lcom/android/org/conscrypt/AbstractConscryptSocket;->getAlpnSelectedProtocol()[B (greylist-max-q, reflection, denied)
E/AndroidRuntime( 3512): FATAL EXCEPTION: grpc-okhttp-0

After further investigation it turns out the exception is pertaining to grpc-okhttp-0. Even though GooglePlayServicesUtil is reported as E ( Errors ) it still continues.
The grpc-okhttp-0 exception happens only on some emulators, not all. For example pixel 4a works fine. To solve the problem, I added the following to my build.gradle file.
implementation "io.grpc:grpc-okhttp:1.41.0"
It worked.

Related

Flutter HMS Core Plugin Integration Error

I am using HMS Core plugin(Huawei Location Kit) in my application, everything works fine in debug mode, but when I switch it on release mode, it is throwing the following error even though I can access to the Huawei Location Kit normally:
E/flutter (28815): [ERROR:flutter/lib/ui/ui_dart_state.cc(157)] Unhandled Exception: PlatformException(-5, -5: Core error, null) E/flutter (28815): Warning: This VM has been configured to produce stack traces that violate the Dart standard.
I have no idea what might be causing the problem. Any ideas?
Can you check if you have added SHA in AppGallery Console correctly.
Please check if your json file is in correct place inside app folder.
And please exclude the HMS SDK from obfuscation.

Firebase Crashlytics 'Error loading your issues' and upload-symbols script error - iOS App using XCode

I recently noticed all of my crash reports in Firebase Crashlytics were not being deobfuscated, they were all returning compiler errors and memory locations (eg <compiler-generated> - Line 4331771636, EXC_BREAKPOINT 0x0000000102afd6f4), rather than function names and line numbers. I realised it's because Fabric has been shutdown (4th May 2020), so I began the transition to Firebase Crashlytics.
I changed my pod file and added the Firebase/Crashlytics pod, and followed the transition instructions located here.
I've put the following code in my Run script under Build Phases in Xcode:
"${PODS_ROOT}/FirebaseCrashlytics/run"
"${PODS_ROOT}/FirebaseCrashlytics/upload-symbols" -gsp "${PROJECT_DIR}/GoogleService-Info.plist" -p ios "${DWARF_DSYM_FOLDER_PATH}/${DWARF_DSYM_FILE_NAME}"
When I build my project I get the following error returned from upload-symbols:
Fetching upload-symbols settings...
[31merror: Could not fetch upload-symbols settings: Could not connect to the server.[0m
Command PhaseScriptExecution failed with a nonzero exit code
If I manually run the upload-symbols script in terminal, I get the same error error: Could not fetch upload-symbols settings: Could not connect to the server.
I also noticed that on the Crashlytics dashboard in Firebase, I had lost all my previous crash data and was receiving the message Error loading your issues.
How can I fix the errors and get Crashlytics working like before?
The solution was to force a crash in my app using fatalError(). It is not obvious that this is required to finalise the registration of the new SDK with the Firebase Crashlytics backend.
After doing this, all my historical crash data is available like before, and upload-symbols completes successfully.

Getting "app:transformClassesWithMultidexlistForDebug" error

I am getting this error while building the app. I have done all the changes related to MULTIDEX but still getting this error.
Android MultiDex Error Solution
Link : stackoverflow.com/a/54680454/4997344

java.lang.IllegalStateException occurs only in android production release flutter

App crashes when java.lang.IllegalStateException error occurs which is only happens in an Android production release(Android 8.0 and 9 from the google crash report), not in a debug mode. This error only occurs when the app is started at the very first time and error's gone when the app is started right after. I have been searching for the solutions but haven't found one. The app is working perfectly fine on IOS devices. Does anyone have same issue or any ideas to fix this issue? The error messages are as follow
java.lang.IllegalStateException:
at io.flutter.embedding.engine.dart.DartMessenger$Reply.reply (DartMessenger.java:135)
at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler$1.error (MethodChannel.java:230)
at io.flutter.plugins.firebase.cloudfirestore.CloudFirestorePlugin$3.onComplete (CloudFirestorePlugin.java:427)
at com.google.android.gms.tasks.zzj.run (Unknown Source:4)
at android.os.Handler.handleCallback (Handler.java:789)
at android.os.Handler.dispatchMessage (Handler.java:98)
at android.os.Looper.loop (Looper.java:164)
at android.app.ActivityThread.main (ActivityThread.java:6944)
at java.lang.reflect.Method.invoke (Native Method)
at com.android.internal.os.Zygote$MethodAndArgsCaller.run (Zygote.java:327)
at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1374)
Check if you configured Firebase properly. Sometimes we need to give Firebase our App certificates hashes for Debug and for Release, maybe you didn't provide those?
Pretend you are configuring Firebase for the first time and recheck every step of the way.

Nativescript RadSideDrawer gives symbol not available at run time error

I am following nativescript RadSideDrawer doc at:
http://docs.telerik.com/devtools/nativescript-ui/Controls/Angular/SideDrawer/getting-started, but once I started the app in ios emulator, I am getting this error:
CONSOLE ERROR file:///app/tns_modules/#angular/core/./bundles/core.umd.js:1052:24: ERROR Error: Uncaught (in promise): ReferenceError: Metadata for "TelerikUI.TKSideDrawerView" found but symbol not available at runtime.
RadSideDrawer#file:///app/tns_modules/nativescript-telerik-ui/sidedrawer/sidedrawer.js:15:38
I tried several times and always got the same error.
What's wrong with this? Is the documentation having errors here?
Thanks
It looks like there may be inconsistency and incompatibility in the used dependencies in your package.json. You can take a look at the sdkAngular repository that showcases many scenarios for using the RadSideDrawer and the other components of the nativescript-telerik-ui-pro plugin here.
Other things that you can try is to clean the project, by deleting the platforms and node_modules folders and running tns run ios after that.