I am getting this error often STREAM closed with status Unavailable - android

W/Firestore( 6377): (24.2.2) [WriteStream]: (de0ea67) Stream closed with status: Status{code=UNAVAILABLE, description=Channel shutdownNow invoked, cause=null}.
W/DynamiteModule( 6377): Local module descriptor class for com.google.android.gms.providerinstaller.dynamite not found.
I/DynamiteModule( 6377): Considering local module com.google.android.gms.providerinstaller.dynamite:0 and remote module com.google.android.gms.providerinstaller.dynamite:0
W/ProviderInstaller( 6377): Failed to load providerinstaller module: No acceptable module com.google.android.gms.providerinstaller.dynamite found. Local version is 0 and remote version is 0.
W/ProviderInstaller( 6377): Failed to report request stats: reportRequestStats [class android.content.Context, long, long]
I am working on an Android application named cricket-info. Used Firestore database. When I run this application on an Android emulator (virtual device) it shows this warning and my data is not updated on firebase even taking more time to authenticate the user to the app. But whenever I run this app on a physical device my data gets updated and takes very less time to authenticate user...!
Code:
final _firestore = FirebaseFirestore.instance;
Also tried reinstalling Android Studio and Flutter.

Related

Android Emulator is able to the Internet but the App is unable to connect to Firebase

I'm trying to debug a Flutter app on an Emulator through AVD (Intellij). Everything works fine on a physical device. I can connect to the internet through the Emulator (Chrome browsing works) But I'm unable to connect to the Firebase server through the App in the emulator.
Here's the error stack trace
Launching lib\main.dart on Android SDK built for x86 in debug mode...
Running Gradle task 'assembleDebug'...
√ Built build\app\outputs\flutter-apk\app-debug.apk.
Installing build\app\outputs\flutter-apk\app.apk...
Debug service listening on ws://127.0.0.1:59768/9pXmC0Ic4uc=/ws
Syncing files to device Android SDK built for x86...
W/DynamiteModule( 6185): Local module descriptor class for com.google.android.gms.providerinstaller.dynamite not found.
I/DynamiteModule( 6185): Considering local module com.google.android.gms.providerinstaller.dynamite:0 and remote module com.google.android.gms.providerinstaller.dynamite:0
W/ProviderInstaller( 6185): Failed to load providerinstaller module: No acceptable module com.google.android.gms.providerinstaller.dynamite found. Local version is 0 and remote version is 0.
I/il.arnet_helpe( 6185): The ClassLoaderContext is a special shared library.
I/chatty ( 6185): uid=10146(app.zumy.mil.arnet_helper) AsyncTask #1 identical 2 lines
I/il.arnet_helpe( 6185): The ClassLoaderContext is a special shared library.
...
**W/Firestore( 6185): (24.3.1) [OnlineStateTracker]: Could not reach Cloud Firestore backend. Backend didn't respond within 10 seconds
W/Firestore( 6185):
W/Firestore( 6185): 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.
...**
>putInt(Ljava/lang/Object;JI)V (greylist, linking, allowed)
W/il.arnet_helpe( 6185): Accessing hidden method Lsun/misc/Unsafe;->putObject(Ljava/lang/Object;JLjava/lang/Object;)V (greylist, linking, allowed)
W/Firestore( 6185): (24.3.1) [WatchStream]: (b4b5c28) Stream closed with status: Status{code=UNAVAILABLE, description=Channel shutdownNow invoked, cause=null}.
W/DynamiteModule( 6185): Local module descriptor class for com.google.android.gms.providerinstaller.dynamite not found.
I/DynamiteModule( 6185): Considering local module com.google.android.gms.providerinstaller.dynamite:0 and remote module com.google.android.gms.providerinstaller.dynamite:0
W/ProviderInstaller( 6185): Failed to load providerinstaller module: No acceptable module com.google.android.gms.providerinstaller.dynamite found. Local version is 0 and remote version is 0.
W/ProviderInstaller( 6185): Failed to report request stats: com.google.android.gms.common.security.ProviderInstallerImpl.reportRequestStats [class android.content.Context, long, long]
W/DynamiteModule( 6185): Local module descriptor class for com.google.android.gms.providerinstaller.dynamite not found.
I/DynamiteModule( 6185): Considering local module com.google.android.gms.providerinstaller.dynamite:0 and remote module com.google.android.gms.providerinstaller.dynamite:0
W/ProviderInstaller( 6185): Failed to load providerinstaller module: No acceptable module com.google.android.gms.providerinstaller.dynamite found. Local version is 0 and remote version is 0.
W/ProviderInstaller( 6185): Failed to report request stats: com.google.android.gms.common.security.ProviderInstallerImpl.reportRequestStats [class android.content.Context, long, long]
W/DynamiteModule( 6185): Local module descriptor class for com.google.android.gms.providerinstaller.dynamite not found.
I/DynamiteModule( 6185): Considering local module com.google.android.gms.providerinstaller.dynamite:0 and remote module com.google.android.gms.providerinstaller.dynamite:0
W/ProviderInstaller( 6185): Failed to load providerinstaller module: No acceptable module com.google.android.gms.providerinstaller.dynamite found. Local version is 0 and remote version is 0.
W/ProviderInstaller( 6185): Failed to report request stats: com.google.android.gms.common.security.ProviderInstallerImpl.reportRequestStats [class android.content.Context, long, long]
D/EGL_emulation( 6185): eglMakeCurrent: 0xe0f191e0: ver 2 0 (tinfo 0xe0f3e260)
W/DynamiteModule( 6185): Local module descriptor class for com.google.android.gms.providerinstaller.dynamite not found.
I/DynamiteModule( 6185): Considering local module com.google.android.gms.providerinstaller.dynamite:0 and remote module com.google.android.gms.providerinstaller.dynamite:0
W/ProviderInstaller( 6185): Failed to load providerinstaller module: No acceptable module com.google.android.gms.providerinstaller.dynamite found. Local version is 0 and remote version is 0.
W/ProviderInstaller( 6185): Failed to report request stats: com.google.android.gms.common.security.ProviderInstallerImpl.reportRequestStats [class android.content.Context, long, long]
I have added the following to /android/app/main/AndroidManifest.xml
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.INTERNET" />
I have tried the cold boot option. It's not an issue with DNS because I CAN connect to the Internet through Chrome in the Emulator. I'm currently on Android 10.0 but I also tried 11. What could be missing?
This looks like an open unresolved issue with Firebase on Android emulators. So I gave up on running this on an emulator and instead using Edge (Web) instead to debug and continue with the development
Just make sure to pass in the options or else you WON'T be able to run your app on any browser or on Windows App. Here's the config needed for WEB.
Future main() async {
WidgetsFlutterBinding.ensureInitialized();
await Firebase.initializeApp(options: DefaultFirebaseOptions.currentPlatform);
runApp(const MyApp());
}

Google Maps API SDK Crash

I have an navigation app that uses offline tiles along with google maps api v2.
The first time I open the app, the api connects to google server so it can download google play certificate ( I think) and then it works with the oflline tiles that are stored in the device. After the first connection, the application can stay offline and continue to work fine.
In my last build, after 3-4 days of using the app, the offline (tiles,markers,polygons,etc) capability is lost and the api needs to connect again to the internet as to continue function.
When I go online then the application starts to work again.
What I have done until now:
Checked that the google maps api key is correct (it works fine when I connect to the internet)
Add the application SHA to the google api console
Try restricted/unrestricted of the api key
I attach three logcat when opening the app
1)Opening the app offline and the google api doesnt work:
W/ActivityThread: handleWindowVisibility: no activity for token android.os.BinderProxy#ae82085
W/: Unsupported class loader
W/: Skipping duplicate class check due to unsupported classloader
I/DynamiteModule: Considering local module com.google.android.gms.maps_dynamite:0 and remote module com.google.android.gms.maps_dynamite:203113001
I/DynamiteModule: Selected remote version of com.google.android.gms.maps_dynamite, version >= 203113001
V/DynamiteModule: Dynamite loader version >= 2, using loadModule2NoCrashUtils
W/: Unknown chunk type '200'.
W/: Unsupported class loader
/: Skipping duplicate class check due to unsupported classloader
I/Google Maps Android API: Google Play services client version: 12451000
I/Google Maps Android API: Google Play services package version: 212418024
I/Google Maps Android API: Google Play services maps renderer version(legacy): 203113001
W/: Accessing hidden field Ljava/nio/Buffer;->address:J (light greylist, reflection)
W/tb: Invoking recovery actions due to previous crash loop detection.
W/sx: Marker deleted: _google_maps_sdk_recovery_needed_
W/sx: Marker deleted: _google_maps_sdk_crash_count_2
W/tb: Crash loop detection recovery actions completed.
W/sx: File created: _google_maps_sdk_crash_count_1
W/sx: Couldn't create marker: _google_maps_sdk_crash_
W/libEGL: EGLNativeWindowType 0xe360f008 disconnect failed
W/DynamiteModule: Local module descriptor class for com.google.android.gms.googlecertificates not found.
I/DynamiteModule: Considering local module com.google.android.gms.googlecertificates:0 and remote module com.google.android.gms.googlecertificates:6
I/DynamiteModule: Selected remote version of com.google.android.gms.googlecertificates, version >= 6
W/: Unsupported class loader
W/: Skipping duplicate class check due to unsupported classloader
2)After the google maps api fail, I go online and this is the logcat from the next start (the maps start working again)
W/ActivityThread: handleWindowVisibility: no activity for token android.os.BinderProxy#ae82085
W/: Unsupported class loader
W/: Skipping duplicate class check due to unsupported classloader
I/DynamiteModule: Considering local module com.google.android.gms.maps_dynamite:0 and remote module com.google.android.gms.maps_dynamite:203113001
I/DynamiteModule: Selected remote version of com.google.android.gms.maps_dynamite, version >= 203113001
W/: Unknown chunk type '200'.
W/: Unsupported class loader
W/: Skipping duplicate class check due to unsupported classloader
I/Google Maps Android API: Google Play services client version: 12451000
I/Google Maps Android API: Google Play services package version: 212418024
I/Google Maps Android API: Google Play services maps renderer version(legacy): 203113001
W/: Accessing hidden field Ljava/nio/Buffer;->address:J (light greylist, reflection)
W/sx: File created: _google_maps_sdk_crash_count_2
W/sx: Marker deleted: _google_maps_sdk_crash_count_1
W/sx: Couldn't create marker: _google_maps_sdk_crash_
W/libEGL: EGLNativeWindowType 0xe360f008 disconnect failed
W/DynamiteModule: Local module descriptor class for com.google.android.gms.googlecertificates not found.
I/DynamiteModule: Considering local module com.google.android.gms.googlecertificates:0 and remote module com.google.android.gms.googlecertificates:6
I/DynamiteModule: Selected remote version of com.google.android.gms.googlecertificates, version >= 6
W/: Unsupported class loader
W/: Skipping duplicate class check due to unsupported classloader
3)This is logcat from next starts of the app being OFFLINE and the api is still working.
W/ActivityThread: handleWindowVisibility: no activity for token android.os.BinderProxy#ae82085
W/: Unsupported class loader
W/: Skipping duplicate class check due to unsupported classloader
I/DynamiteModule: Considering local module com.google.android.gms.maps_dynamite:0 and remote module com.google.android.gms.maps_dynamite:203113001
I/DynamiteModule: Selected remote version of com.google.android.gms.maps_dynamite, version >= 203113001
W/: Unknown chunk type '200'.
W/: Unsupported class loader
W/: Skipping duplicate class check due to unsupported classloader
I/Google Maps Android API: Google Play services client version: 12451000
I/Google Maps Android API: Google Play services package version: 212418024
I/Google Maps Android API: Google Play services maps renderer version(legacy): 203113001
W/: Accessing hidden field Ljava/nio/Buffer;->address:J (light greylist, reflection)
D/NetworkSecurityConfig: No Network Security Config specified, using platform default
W/sx: File created: _google_maps_sdk_recovery_needed_
W/sx: Marker deleted: _google_maps_sdk_crash_count_2
W/sx: Couldn't create marker: _google_maps_sdk_crash_
W/libEGL: EGLNativeWindowType 0xe360f008 disconnect failed
W/DynamiteModule: Local module descriptor class for com.google.android.gms.googlecertificates not found.
I/DynamiteModule: Considering local module com.google.android.gms.googlecertificates:0 and remote module com.google.android.gms.googlecertificates:6
I/DynamiteModule: Selected remote version of com.google.android.gms.googlecertificates, version >= 6
W/: Unsupported class loader
W/: Skipping duplicate class check due to unsupported classloader
One difference I can spot is on line #6 V/DynamiteModule: Dynamite loader version >= 2, using loadModule2NoCrashUtils when the google maps api stops to work.
Maybe its something with my dependecies?
implementation files('libs/common-lang3.jar')
implementation 'com.android.support:support-v13:28.0.0'
implementation 'com.google.code.gson:gson:2.8.6'
implementation 'com.google.android.gms:play-services-location:16.0.0'
implementation 'com.google.android.gms:play-services-maps:16.1.0'
implementation 'com.google.maps.android:android-maps-utils:2.1.0'
implementation 'com.android.support:multidex:1.0.3'
implementation 'org.jetbrains:annotations-java5:15.0'
implementation 'com.android.support:design:28.0.0'
implementation 'com.android.support.constraint:constraint-layout:2.0.4'
implementation 'com.android.support:preference-v7:28.0.0'
implementation 'org.apache.commons:commons-io:1.3.2'

Google Mobile Vision ocrlib.so file downloading error

I am using Google Mobile Vision TextRecogniser API in my application to read text from a captured image. But I am getting below error every time.
I/Vision: Request download for engine ocr is a no-op because rate limiting
I/Vision: Loading library libocr.so
I/Vision: libocr.so library load status: false
I/Vision: Request download for engine ocr is a no-op because rate limiting
W/DynamiteModule: Local module descriptor class for com.google.android.gms.vision.dynamite.text not found.
I/DynamiteModule: Considering local module com.google.android.gms.vision.dynamite.text:0 and remote module com.google.android.gms.vision.dynamite.text:0
W/DynamiteModule: Local module descriptor class for com.google.android.gms.vision.dynamite not found.
I/DynamiteModule: Considering local module com.google.android.gms.vision.dynamite:0 and remote module com.google.android.gms.vision.dynamite:2702
I/DynamiteModule: Selected remote version of com.google.android.gms.vision.dynamite, version >= 2702
W/DynamiteModule: Local module descriptor class for com.google.android.gms.vision.ocr not found.
I/DynamiteModule: Considering local module com.google.android.gms.vision.ocr:0 and remote module com.google.android.gms.vision.ocr:0```
This vision message is what causing the problem:
**E/Vision:Request download for engine ocr is a no-op because rate limiting**
Finally i was able to resolve this issue by factory resetting the device. I was using the knox profile so first i unassigned the existing knox profile and then factory reset the device and it was workign fine. Cheers!

Unable to decode stream: android.graphics.ImageDecoder$DecodeException: Failed to create image decoder with message 'unimplemented'

I've recently tried implementing Pusher's Chatkit into my android app along with some Kotlin plugins and am now running into this error that I cannot resolve.
E/Drawable: Unable to decode stream: android.graphics.ImageDecoder$DecodeException: Failed to create image decoder with message 'unimplemented'Input contained an error.
the error I'm getting right below it is:
E/FirebaseInstanceId: Token retrieval failed: SERVICE_NOT_AVAILABLE
Which is through throwing me for a loop because my internet is working fine although a couple lines further down, I get:
W/Firestore: (21.3.0) [OnlineStateTracker]: Could not reach Cloud Firestore backend. Backend didn't respond within 10 seconds.
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.
Process 15216 terminated.
Note: I've started to get this error above about not having a good connection ever since I started working more at cafes instead of at home since I needed to get out. In order to work offline, firebase asked me to opt into an offline mode I've been getting this notification of not being able to connect ever since.
I am following along to the getting started page here and have completed up to the end of the "Displaying Messages" section however when I go to the activity, it just stalls and blanks out. I have been searching StackO and the rest of the web for the past 2 days to try to resolve the conflict to no avail. All of the similar posts I have looked at dont seem to resolve the issue.
similarPost#1 but I'm not trying to save to a bitmap
Here is the entire stack trace:
E/Drawable: Unable to decode stream: android.graphics.ImageDecoder$DecodeException: Failed to create image decoder with message 'unimplemented'Input contained an error.
E/FirebaseInstanceId: Token retrieval failed: SERVICE_NOT_AVAILABLE
W/DynamiteModule: Local module descriptor class for providerinstaller not found.
I/DynamiteModule: Considering local module providerinstaller:0 and remote module providerinstaller:0
W/ProviderInstaller: Failed to load providerinstaller module: No acceptable module found. Local version is 0 and remote version is 0.
I/ghborsbookshel: The ClassLoaderContext is a special shared library.
I/chatty: uid=10086(com.example.android_myneighborsbookshelf) AsyncTask #2 identical 1 line
I/ghborsbookshel: The ClassLoaderContext is a special shared library.
V/NativeCrypto: Registering com/google/android/gms/org/conscrypt/NativeCrypto's 286 native methods...
W/ghborsbookshel: Accessing hidden method Ljava/security/spec/ECParameterSpec;->getCurveName()Ljava/lang/String; (light greylist, reflection)
I/ProviderInstaller: Installed default security provider GmsCore_OpenSSL
W/Firestore: (21.3.0) [OnlineStateTracker]: Could not reach Cloud Firestore backend. Backend didn't respond within 10 seconds
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.
Process 15216 terminated.
It seems to have fixed itself except for the unable to decode stream error however it doesn't crash, it just shows up in the log.
I checked for updates, cleaned, rebuild, invalidated caches and restarted, and shut down my emulator. I also restarted my computer completely 2x and that seems to have fixed it.

Android app becomes slow after adding Firebase Analytics and Crash Reporting

Before adding firebase analytics my app worked really fast. It has a lot of request which are sequential.
However, as soon as I added firebase analytics my app's internet requests froze and I got a lot of logs which consume time for no purpose.
W/System: ClassLoader referenced unknown path: /data/app/my.project.-1/lib/arm64
W/art: Verification of void my.project.App.<init>() took 133.425ms
D/FirebaseApp: com.google.firebase.auth.FirebaseAuth is not linked. Skipping initialization.
D/FirebaseApp: Initialized class com.google.firebase.iid.FirebaseInstanceId.
V/GoogleSignatureVerifier: com.google.android.gms signature not valid. Found: <Some big sequence of characters>
I/FA: Tag Manager is not found and thus will not be used
D/ChimeraCfgMgr: Reading stored module config
I/DynamiteModule: Considering local module com.google.android.gms.crash:0 and remote module com.google.android.gms.crash:2
D/ChimeraFileApk: Primary ABI of requesting process is arm64-v8a
D/FirebaseCrashReceiverServiceImpl: onCreate
I/DynamiteModule: Selected remote version of com.google.android.gms.flags, version >= 1
This is quite important, because I wait about 5-6 seconds until my own requests start to execute.

Categories

Resources