Flutter HMS Core Plugin Integration Error - flutter

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.

Related

Issue while running flutter app in release mode

I'm using audio service in my flutter app it was working fine in both debug and release mode when my flutter version was 3.0.2 when I update my flutter from 3.0.2 to to any higher flutter version then the app isn't working correctly.App is working fine in debug mode but when I'm running my app in release mode the following error is occurs.
E/flutter (12940): [ERROR:flutter/shell/common/shell.cc(93)] Dart Error: Dart_LookupLibrary: library 'package:shiatoolkit/services/audio/app_audio_service.dart' not found.

Flutter firebase messaging issue on upgrade

I was using firebase_messaging 7.0.0 all is working fine but i need to update my flutter so i have upgrade firebase_messaging to 10.0.9 now its stop working on getToken.
When app load it keep crashing and showing
E/flutter (17162): [ERROR:flutter/lib/ui/ui_dart_state.cc(209)] Unhandled Exception: [firebase_messaging/unknown] java.io.IOException: java.util.concurrent.ExecutionException: java.io.IOException: FIS_AUTH_ERROR
I have try everything
flutter clean
implementation 'com.google.firebase:firebase-messaging:20.1.0'
But it's not working if I comment my getToken then my app is fine. I didn't find any solution on GitHub or StackOverflow. I have checked my google-service.json etc all is fine
Yes now it's different.
please follow steps here:
firebase messaging doc
and you have to add firebase_core package to your dependencies
and follow this steps too: firebase_core doc

Flutter Firestore throwing Google Playstore exception on emulator

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.

Unhandled Exception: MissingPluginException(No implementation found for method getLocation on channel lyokone/location)

E/flutter (13237): [ERROR:flutter/lib/ui/ui_dart_state.cc(177)] Unhandled Exception: MissingPluginException(No implementation found for method getLocation on channel lyokone/location)
I am using Location and Place picker plugin
Unhandled Exception: PlatformException(error, java.lang.IllegalStateException: Trying to create a platform view of unregistered type: plugins.flutter.io/google_maps
This error occur when you add a package that hooks into the device like gps/camera/storage etc. without rebuilding the project.
To solve this, terminate the current running project from your IDE or if you're using flutter run in your terminal just press q.
Run flutter clean and then re-run the project again.
I had this problem when the proxy debugger (Proxyman or Charles) was started on my computer.
This worked for me:
Close proxy debugger
flutter clean
Restart IDE
Build app
Try terminating your current running project and re-running. It will work. Refer this for more details.

Facing issue in a specfic flutter project while running over my ios device in flutter

Failed to establish a debug connection with 661e647d32d2bf1e57a60abeedda37a0af480e22 using mdns: Invalid argument(s): Cannot find executable for /Users/khattab/Desktop/flutter/bin/cache/artifacts/usbmuxd/iproxy.
There is no artifact, so probably build failed. You should check your debug console to see what is the exact problem.