Describe the bug
When trying to get a document from Firestore, if the device is connected through Wifi the connection fails with the following error message:
W/Firestore( 4903): (21.4.3) [OnlineStateTracker]: Could not reach Cloud Firestore backend. Backend didn't respond within 10 seconds
W/Firestore( 4903): 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.
To Reproduce
Usually, the error happens when running in a Physical device.
I created a small app to be able to reproduce the errors with minimal interference from the rest my code. See the code below.
When you hit run on the debugger (I'm using VSCode) and then I click on the (+) button to make the request to Firestore, it stays trying for a few seconds (you'll see the progress indicator no the test app) and then the call snapshot = await docRef.get() fails with the following error message:
PlatformException(Error performing get, Failed to get document because the client is offline., null)

Then, if you turn the wifi off, the request works perfectly. And the content of the document retrieved from Firestore is present in the screen:

Now if you turn the wifi again, the request works. Sometimes the data is retrieved from the server and other from the cache.
import 'package:cloud_firestore/cloud_firestore.dart';
import 'package:flutter/material.dart';
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Firestore Network Bug',
theme: ThemeData(
primarySwatch: Colors.blue,
visualDensity: VisualDensity.adaptivePlatformDensity,
),
home: MyHomePage(),
);
}
}
class MyHomePage extends StatefulWidget {
@override
_MyHomePageState createState() => _MyHomePageState();
}
class _MyHomePageState extends State<MyHomePage> {
bool _loading = false;
Map<String, dynamic> _firebaseDocument;
String _firebaseError;
String _source;
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text("Firestore Network Bug"),
),
body: Padding(
padding: const EdgeInsets.all(24),
child: Column(
mainAxisAlignment: MainAxisAlignment.start,
children: <Widget>[
Text('Tap the (+) button to try to read from Firestore...',
style: TextStyle(fontSize: 20)),
_showProgress(),
_showResults(),
_showErrors(),
],
),
),
floatingActionButton: FloatingActionButton(
onPressed: _readFromFirebase,
tooltip: 'Increment',
child: Icon(Icons.add),
), // This trailing comma makes auto-formatting nicer for build methods.
);
}
Widget _showProgress() {
return Padding(
padding: const EdgeInsets.only(top: 12.0),
child: Container(
height: 6.0,
child: (_loading) ? LinearProgressIndicator() : Container(),
),
);
}
Widget _showResults() {
return Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
SizedBox(height: 12.0),
Text("Result:"),
Container(
height: 150,
padding: const EdgeInsets.all(16),
color: Colors.blue[100],
child: (_firebaseDocument != null)
? Text("From $_source: \n\n" + _firebaseDocument?.toString(),
style: TextStyle(fontSize: 16))
: Container(),
),
],
);
}
Widget _showErrors() {
return Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
SizedBox(height: 12.0),
Text("Errors:"),
Container(
height: 150,
padding: const EdgeInsets.all(16),
color: Colors.red[100],
child: (_firebaseError != null)
? Text(_firebaseError?.toString(), style: TextStyle(fontSize: 16))
: Container(),
),
],
);
}
void _readFromFirebase() async {
setState(() {
_loading = true;
_firebaseDocument = null;
_firebaseError = null;
});
DocumentReference docRef =
Firestore.instance.document("myCollection/myDocument");
DocumentSnapshot snapshot = await docRef.get().catchError(
(onError) {
setState(() {
_loading = false;
_firebaseDocument = null;
_firebaseError = onError.toString();
});
},
);
if (_firebaseError != null) return;
_source = (snapshot.metadata.isFromCache) ? "cache" : "server";
if (snapshot.exists) {
setState(() {
_loading = false;
_firebaseDocument = snapshot.data;
});
print("Document found!");
print("- ${_firebaseDocument.toString()}");
} else {
print("Document not found!");
}
}
}
Expected behavior
Since the device has perfect connectivity over wifi, it was excepted that the request worked fine and the document was retrieved from the server.
Additional context
On the emulator, everything works perfectly.
I tested in the following emulator configurations: Pixel 4 API 29, Pixel 5 API 25, Pixel 3 API 29.
The physical devices I used to test (both failed identically) where: Pixel 4XL (Android 10 QQ3Q.200605.001) and Pixel 3XL (Android 10 QQ2A.200305.002).
Flutter doctor
[β] Flutter (Channel stable, v1.17.3, on Mac OS X 10.15.4 19E287, locale en-US)
β’ Flutter version 1.17.3 at /Users/mlemos/Documents/flutter
β’ Framework revision b041144f83 (8 days ago), 2020-06-04 09:26:11 -0700
β’ Engine revision ee76268252
β’ Dart version 2.8.4
[β] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
β’ Android SDK at /Users/mlemos/Library/Android/sdk
β’ Platform android-30, build-tools 29.0.2
β’ Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
β’ Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593)
β’ All Android licenses accepted.
[β] Xcode - develop for iOS and macOS (Xcode 11.5)
β’ Xcode at /Applications/Xcode.app/Contents/Developer
β’ Xcode 11.5, Build version 11E608c
β’ CocoaPods version 1.9.1
[!] Android Studio (version 4.0)
β’ Android Studio at /Applications/Android Studio.app/Contents
β Flutter plugin not installed; this adds Flutter specific functionality.
β Dart plugin not installed; this adds Dart specific functionality.
β’ Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593)
[β] VS Code (version 1.46.0)
β’ VS Code at /Applications/Visual Studio Code.app/Contents
β’ Flutter extension version 3.11.0
[β] Connected device (2 available)
β’ Pixel 4 XL β’ 99201FFBA000KF β’ android-arm64 β’ Android 10 (API 29)
β’ Android SDK built for x86 β’ emulator-5554 β’ android-x86 β’ Android 7.1.1 (API 25) (emulator)
! Doctor found issues in 1 category.
pubspec.yaml
name: firestore_network_bug
description: A new Flutter project.
publish_to: 'none'
version: 1.0.0+1
environment:
sdk: ">=2.7.0 <3.0.0"
dependencies:
flutter:
sdk: flutter
cupertino_icons: ^0.1.3
firebase_analytics: ^5.0.14
cloud_firestore: ^0.13.6
dev_dependencies:
flutter_test:
sdk: flutter
flutter:
uses-material-design: true
/build.gradle
buildscript {
ext.kotlin_version = '1.3.50'
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.5.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
// Application specific configuration (dependencies)
classpath 'com.google.gms:google-services:4.3.3'
classpath 'com.google.firebase:firebase-crashlytics-gradle:2.1.1'
}
}
allprojects {
repositories {
google()
jcenter()
}
}
rootProject.buildDir = '../build'
subprojects {
project.buildDir = "${rootProject.buildDir}/${project.name}"
}
subprojects {
project.evaluationDependsOn(':app')
}
task clean(type: Delete) {
delete rootProject.buildDir
}
/app/build.gradle
def localProperties = new Properties()
def localPropertiesFile = rootProject.file('local.properties')
if (localPropertiesFile.exists()) {
localPropertiesFile.withReader('UTF-8') { reader ->
localProperties.load(reader)
}
}
def flutterRoot = localProperties.getProperty('flutter.sdk')
if (flutterRoot == null) {
throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
}
def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
if (flutterVersionCode == null) {
flutterVersionCode = '1'
}
def flutterVersionName = localProperties.getProperty('flutter.versionName')
if (flutterVersionName == null) {
flutterVersionName = '1.0'
}
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
// Application specific configuration (plugins)
apply plugin: 'com.google.gms.google-services'
apply plugin: 'com.google.firebase.crashlytics'
android {
compileSdkVersion 28
sourceSets {
main.java.srcDirs += 'src/main/kotlin'
}
lintOptions {
disable 'InvalidPackage'
}
defaultConfig {
applicationId "com.example.firestore_network_bug"
minSdkVersion 16
targetSdkVersion 28
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
// Application specific configuration (multidex)
multiDexEnabled true
}
buildTypes {
release {
signingConfig signingConfigs.debug
}
}
}
flutter {
source '../..'
}
dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
// Application specific configuration (dependencies)
implementation 'com.android.support:multidex:1.0.3'
implementation 'com.google.firebase:firebase-analytics:17.2.2'
implementation 'com.google.firebase:firebase-crashlytics:17.0.0'
implementation 'com.google.firebase:firebase-firestore:21.4.3'
}
Here is the debug console output:
Over Wifi - When the error happens
Please note that, over Wifi, Crashlytics also fails.
Launching lib/main.dart on Pixel 4 XL in debug mode...
β Built build/app/outputs/apk/debug/app-debug.apk.
Connecting to VM Service at ws://127.0.0.1:54122/cahgKkWqnBU=/ws
E/FirebaseCrashlytics(22411): Settings request failed.
E/FirebaseCrashlytics(22411): java.io.InterruptedIOException: timeout
E/FirebaseCrashlytics(22411): at okhttp3.RealCall.timeoutExit(RealCall.java:107)
E/FirebaseCrashlytics(22411): at okhttp3.RealCall.execute(RealCall.java:96)
E/FirebaseCrashlytics(22411): at com.google.firebase.crashlytics.internal.network.HttpRequest.execute(com.google.firebase:firebase-crashlytics@@17.0.0:129)
E/FirebaseCrashlytics(22411): at com.google.firebase.crashlytics.internal.settings.network.DefaultSettingsSpiCall.invoke(com.google.firebase:firebase-crashlytics@@17.0.0:86)
E/FirebaseCrashlytics(22411): at com.google.firebase.crashlytics.internal.settings.SettingsController$1.then(com.google.firebase:firebase-crashlytics@@17.0.0:200)
E/FirebaseCrashlytics(22411): at com.google.firebase.crashlytics.internal.settings.SettingsController$1.then(com.google.firebase:firebase-crashlytics@@17.0.0:193)
E/FirebaseCrashlytics(22411): at com.google.android.gms.tasks.zzp.run(Unknown Source:2)
E/FirebaseCrashlytics(22411): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
E/FirebaseCrashlytics(22411): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
E/FirebaseCrashlytics(22411): at com.google.firebase.crashlytics.internal.common.ExecutorUtils$1$1.onRun(com.google.firebase:firebase-crashlytics@@17.0.0:60)
E/FirebaseCrashlytics(22411): at com.google.firebase.crashlytics.internal.common.BackgroundPriorityRunnable.run(com.google.firebase:firebase-crashlytics@@17.0.0:27)
E/FirebaseCrashlytics(22411): at java.lang.Thread.run(Thread.java:919)
E/FirebaseCrashlytics(22411): Caused by: java.io.IOException: Canceled
E/FirebaseCrashlytics(22411): at okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.java:120)
E/FirebaseCrashlytics(22411): at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147)
E/FirebaseCrashlytics(22411): at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:121)
E/FirebaseCrashlytics(22411): at okhttp3.RealCall.getResponseWithInterceptorChain(RealCall.java:254)
E/FirebaseCrashlytics(22411): at okhttp3.RealCall.execute(RealCall.java:92)
E/FirebaseCrashlytics(22411): ... 10 more
W/DynamiteModule(22411): Local module descriptor class for providerinstaller not found.
I/DynamiteModule(22411): Considering local module providerinstaller:0 and remote module providerinstaller:0
W/ProviderInstaller(22411): Failed to load providerinstaller module: No acceptable module found. Local version is 0 and remote version is 0.
I/ore_network_bu(22411): The ClassLoaderContext is a special shared library.
I/chatty (22411): uid=10227(com.example.firestore_network_bug) AsyncTask #1 identical 1 line
I/ore_network_bu(22411): The ClassLoaderContext is a special shared library.
W/ore_network_bu(22411): Accessing hidden method Lsun/misc/Unsafe;->getLong(Ljava/lang/Object;J)J (greylist,core-platform-api, linking, allowed)
W/ore_network_bu(22411): Accessing hidden method Lsun/misc/Unsafe;->arrayBaseOffset(Ljava/lang/Class;)I (greylist,core-platform-api, linking, allowed)
W/ore_network_bu(22411): Accessing hidden method Lsun/misc/Unsafe;->copyMemory(JJJ)V (greylist, linking, allowed)
W/ore_network_bu(22411): Accessing hidden method Lsun/misc/Unsafe;->objectFieldOffset(Ljava/lang/reflect/Field;)J (greylist,core-platform-api, linking, allowed)
W/ore_network_bu(22411): Accessing hidden method Lsun/misc/Unsafe;->getByte(J)B (greylist,core-platform-api, linking, allowed)
W/ore_network_bu(22411): Accessing hidden method Lsun/misc/Unsafe;->getByte(Ljava/lang/Object;J)B (greylist,core-platform-api, linking, allowed)
W/ore_network_bu(22411): Accessing hidden method Lsun/misc/Unsafe;->getLong(J)J (greylist,core-platform-api, linking, allowed)
W/ore_network_bu(22411): Accessing hidden method Lsun/misc/Unsafe;->putByte(JB)V (greylist,core-platform-api, linking, allowed)
W/ore_network_bu(22411): Accessing hidden method Lsun/misc/Unsafe;->putByte(Ljava/lang/Object;JB)V (greylist,core-platform-api, linking, allowed)
W/ore_network_bu(22411): Accessing hidden method Lsun/misc/Unsafe;->getLong(Ljava/lang/Object;J)J (greylist,core-platform-api, reflection, allowed)
W/ore_network_bu(22411): Accessing hidden method Lsun/misc/Unsafe;->getLong(Ljava/lang/Object;J)J (greylist,core-platform-api, reflection, allowed)
W/ore_network_bu(22411): Accessing hidden field Ljava/nio/Buffer;->address:J (greylist, reflection, allowed)
V/NativeCrypto(22411): Registering com/google/android/gms/org/conscrypt/NativeCrypto's 286 native methods...
W/ore_network_bu(22411): Accessing hidden method Ljava/security/spec/ECParameterSpec;->getCurveName()Ljava/lang/String; (greylist, reflection, allowed)
I/ProviderInstaller(22411): Installed default security provider GmsCore_OpenSSL
W/Firestore(22411): (21.4.3) [OnlineStateTracker]: Could not reach Cloud Firestore backend. Backend didn't respond within 10 seconds
W/Firestore(22411):
W/Firestore(22411): 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/DynamiteModule(22411): Local module descriptor class for providerinstaller not found.
I/DynamiteModule(22411): Considering local module providerinstaller:0 and remote module providerinstaller:0
W/ProviderInstaller(22411): Failed to load providerinstaller module: No acceptable module found. Local version is 0 and remote version is 0.
W/DynamiteModule(22411): Local module descriptor class for providerinstaller not found.
I/DynamiteModule(22411): Considering local module providerinstaller:0 and remote module providerinstaller:0
W/ProviderInstaller(22411): Failed to load providerinstaller module: No acceptable module found. Local version is 0 and remote version is 0.
W/DynamiteModule(22411): Local module descriptor class for providerinstaller not found.
I/DynamiteModule(22411): Considering local module providerinstaller:0 and remote module providerinstaller:0
W/ProviderInstaller(22411): Failed to load providerinstaller module: No acceptable module found. Local version is 0 and remote version is 0.
W/DynamiteModule(22411): Local module descriptor class for providerinstaller not found.
I/DynamiteModule(22411): Considering local module providerinstaller:0 and remote module providerinstaller:0
W/ProviderInstaller(22411): Failed to load providerinstaller module: No acceptable module found. Local version is 0 and remote version is 0.
W/DynamiteModule(22411): Local module descriptor class for providerinstaller not found.
I/DynamiteModule(22411): Considering local module providerinstaller:0 and remote module providerinstaller:0
W/ProviderInstaller(22411): Failed to load providerinstaller module: No acceptable module found. Local version is 0 and remote version is 0.
W/DynamiteModule(22411): Local module descriptor class for providerinstaller not found.
I/DynamiteModule(22411): Considering local module providerinstaller:0 and remote module providerinstaller:0
W/ProviderInstaller(22411): Failed to load providerinstaller module: No acceptable module found. Local version is 0 and remote version is 0.
Over LTE - When things work fine
Launching lib/main.dart on Pixel 4 XL in debug mode...
β Built build/app/outputs/apk/debug/app-debug.apk.
Connecting to VM Service at ws://127.0.0.1:54345/egB1v0JRe6c=/ws
W/DynamiteModule(23529): Local module descriptor class for providerinstaller not found.
I/DynamiteModule(23529): Considering local module providerinstaller:0 and remote module providerinstaller:0
W/ProviderInstaller(23529): Failed to load providerinstaller module: No acceptable module found. Local version is 0 and remote version is 0.
I/ore_network_bu(23529): The ClassLoaderContext is a special shared library.
I/chatty (23529): uid=10227(com.example.firestore_network_bug) AsyncTask #1 identical 1 line
I/ore_network_bu(23529): The ClassLoaderContext is a special shared library.
W/ore_network_bu(23529): Accessing hidden method Lsun/misc/Unsafe;->getLong(Ljava/lang/Object;J)J (greylist,core-platform-api, linking, allowed)
W/ore_network_bu(23529): Accessing hidden method Lsun/misc/Unsafe;->arrayBaseOffset(Ljava/lang/Class;)I (greylist,core-platform-api, linking, allowed)
W/ore_network_bu(23529): Accessing hidden method Lsun/misc/Unsafe;->copyMemory(JJJ)V (greylist, linking, allowed)
W/ore_network_bu(23529): Accessing hidden method Lsun/misc/Unsafe;->objectFieldOffset(Ljava/lang/reflect/Field;)J (greylist,core-platform-api, linking, allowed)
W/ore_network_bu(23529): Accessing hidden method Lsun/misc/Unsafe;->getByte(J)B (greylist,core-platform-api, linking, allowed)
W/ore_network_bu(23529): Accessing hidden method Lsun/misc/Unsafe;->getByte(Ljava/lang/Object;J)B (greylist,core-platform-api, linking, allowed)
W/ore_network_bu(23529): Accessing hidden method Lsun/misc/Unsafe;->getLong(J)J (greylist,core-platform-api, linking, allowed)
W/ore_network_bu(23529): Accessing hidden method Lsun/misc/Unsafe;->putByte(JB)V (greylist,core-platform-api, linking, allowed)
W/ore_network_bu(23529): Accessing hidden method Lsun/misc/Unsafe;->putByte(Ljava/lang/Object;JB)V (greylist,core-platform-api, linking, allowed)
W/ore_network_bu(23529): Accessing hidden method Lsun/misc/Unsafe;->getLong(Ljava/lang/Object;J)J (greylist,core-platform-api, reflection, allowed)
W/ore_network_bu(23529): Accessing hidden method Lsun/misc/Unsafe;->getLong(Ljava/lang/Object;J)J (greylist,core-platform-api, reflection, allowed)
W/ore_network_bu(23529): Accessing hidden field Ljava/nio/Buffer;->address:J (greylist, reflection, allowed)
V/NativeCrypto(23529): Registering com/google/android/gms/org/conscrypt/NativeCrypto's 286 native methods...
W/ore_network_bu(23529): Accessing hidden method Ljava/security/spec/ECParameterSpec;->getCurveName()Ljava/lang/String; (greylist, reflection, allowed)
I/ProviderInstaller(23529): Installed default security provider GmsCore_OpenSSL
W/ore_network_bu(23529): Accessing hidden field Ljava/net/Socket;->impl:Ljava/net/SocketImpl; (greylist, reflection, allowed)
W/ore_network_bu(23529): Accessing hidden field Ljava/io/FileDescriptor;->descriptor:I (greylist, JNI, allowed)
W/ore_network_bu(23529): Accessing hidden method Ljava/security/spec/ECParameterSpec;->setCurveName(Ljava/lang/String;)V (greylist, reflection, allowed)
W/ore_network_bu(23529): Accessing hidden method Ldalvik/system/BlockGuard;->getThreadPolicy()Ldalvik/system/BlockGuard$Policy; (greylist,core-platform-api, linking, allowed)
W/ore_network_bu(23529): Accessing hidden method Ldalvik/system/BlockGuard$Policy;->onNetwork()V (greylist, linking, allowed)
I/flutter (23529): Document found!
I/flutter (23529): - {date: Timestamp(seconds=1590980400, nanoseconds=0), published: true, title: Hello World!, body: Firebase rocks and Firestore rocks also (when it works).}
I highly doubt this is an issue with FlutterFire, since it has no impact on how the native SDKs handle online/offline state.
Hi @mlemos
I followed your steps and code sample, it loads document initially with no issues.
Please try another device or emulator and device know

flutter doctor -v
[β] Flutter (Channel dev, 1.20.0-0.0.pre, on Mac OS X 10.15.5 19F101, locale
en-GB)
β’ Flutter version 1.20.0-0.0.pre at /Users/tahatesser/Code/flutter_dev
β’ Framework revision d9653445f4 (6 days ago), 2020-06-09 18:43:03 -0400
β’ Engine revision e8c13aa012
β’ Dart version 2.9.0 (build 2.9.0-14.0.dev 5c1376615e)
[β] Android toolchain - develop for Android devices (Android SDK version 30.0.0)
β’ Android SDK at /Users/tahatesser/Code/sdk
β’ Platform android-30, build-tools 30.0.0
β’ ANDROID_HOME = /Users/tahatesser/Code/sdk
β’ Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
β’ Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593)
β’ All Android licenses accepted.
[β] Xcode - develop for iOS and macOS (Xcode 11.5)
β’ Xcode at /Applications/Xcode.app/Contents/Developer
β’ Xcode 11.5, Build version 11E608c
β’ CocoaPods version 1.9.3
[β] Chrome - develop for the web
β’ Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
[β] Android Studio (version 4.0)
β’ Android Studio at /Applications/Android Studio.app/Contents
β’ Flutter plugin version 46.0.2
β’ Dart plugin version 193.7361
β’ Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593)
[β] VS Code (version 1.46.0)
β’ VS Code at /Applications/Visual Studio Code.app/Contents
β’ Flutter extension version 3.11.0
[β] Connected device (5 available)
β’ SM M305F β’ 32003c30dc19668f β’ android-arm64 β’ Android 10 (API 29)
β’ Tahaβs iPhone β’ 00008020-001059882212002E β’ ios β’ iOS 13.5.1
β’ macOS β’ macOS β’ darwin-x64 β’ Mac OS X 10.15.5 19F101
β’ Web Server β’ web-server β’ web-javascript β’ Flutter Tools
β’ Chrome β’ chrome β’ web-javascript β’ Google Chrome 83.0.4103.97
β’ No issues found!
Thank you
I am also facing the similar issue, in my case, it reaches to the cloud_firestore but returns null in _data with real iOS device when connected to WiFi.
HI @TahaTesser , I just performed a "reset to factory defaults" on my Pixel 3XL and the problem persisted. It happens on both my Pixel 4XL and Pixel 3XL. I'll grab another device today and perform more testing.
What is interesting is that both Firestore and Crashlytics provide error messages while running over wifi. It seems that the firebase plugin is not correctly identifying the connectivity status and is assuming that it is not connected over wifi in those circumstances.
Probably a shared code between Crashlytics and Firestore causing the error on both packages.
Crashlytics error:
E/FirebaseCrashlytics(22411): Settings request failed.
E/FirebaseCrashlytics(22411): java.io.InterruptedIOException: timeout
E/FirebaseCrashlytics(22411): at okhttp3.RealCall.timeoutExit(RealCall.java:107)
E/FirebaseCrashlytics(22411): at okhttp3.RealCall.execute(RealCall.java:96)
Firestore Error:
W/Firestore(22411): (21.4.3) [OnlineStateTracker]: Could not reach Cloud Firestore backend. Backend didn't respond within 10 seconds
W/Firestore(22411):
W/Firestore(22411): 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.
Hi @TahaTesser, I finally put my hands in another device and the results were the same.
I have also updated my Flutter environment and all libraries.
The key error messages are:
...
D/NetworkManagementSocketTagger(29981): tagSocket(62) with statsTag=0xffffffff, statsUid=-1
E/FirebaseInstanceId(29981): binding to the service failed
...
/FirebaseCrashlytics(29981): Settings request failed.
E/FirebaseCrashlytics(29981): java.io.InterruptedIOException: timeout
E/FirebaseCrashlytics(29981): at okhttp3.RealCall.timeoutExit(RealCall.java:107)
E/FirebaseCrashlytics(29981): at okhttp3.RealCall.execute(RealCall.java:96)
...
D/ConnectivityManager(29981): requestNetwork; CallingUid : 10263, CallingPid : 29981
W/DynamiteModule(29981): Local module descriptor class for providerinstaller not found.
I/DynamiteModule(29981): Considering local module providerinstaller:0 and remote module providerinstaller:0
W/ProviderInstaller(29981): Failed to load providerinstaller module: No acceptable module found. Local version is 0 and remote version is 0.
I/ject.spread_de(29981): The ClassLoaderContext is a special shared library.
I/chatty (29981): uid=10263(net.spreadproject.spread_dev) AsyncTask #2 identical 1 line
I/ject.spread_de(29981): The ClassLoaderContext is a special shared library.
V/NativeCrypto(29981): Registering com/google/android/gms/org/conscrypt/NativeCrypto's 286 native methods...
W/ject.spread_de(29981): Accessing hidden field Ljava/nio/Buffer;->address:J (light greylist, reflection)
W/ject.spread_de(29981): Accessing hidden method Ljava/security/spec/ECParameterSpec;->getCurveName()Ljava/lang/String; (light greylist, reflection)
I/ject.spread_de(29981): Waiting for a blocking GC ClassLinker
I/ject.spread_de(29981): Background concurrent copying GC freed 53995(2MB) AllocSpace objects, 62(2MB) LOS objects, 67% free, 2MB/8MB, paused 281us total 107.391ms
I/ject.spread_de(29981): WaitForGcToComplete blocked ClassLinker on ClassLinker for 58.302ms
I/ProviderInstaller(29981): Installed default security provider GmsCore_OpenSSL
D/ConnectivityManager(29981): requestNetwork; CallingUid : 10263, CallingPid : 29981
D/NetworkManagementSocketTagger(29981): tagSocket(116) with statsTag=0xffffffff, statsUid=-1
W/Firestore(29981): (21.4.3) [OnlineStateTracker]: Could not reach Cloud Firestore backend. Backend didn't respond within 10 seconds
W/Firestore(29981):
W/Firestore(29981): 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.
I/flutter (29981): [2020-06-20 17:39:09.303984] DashNavigationBar >> healthStatus is: unknown
D/ConnectivityManager(29981): unregisterNetworkCallback; CallingUid : 10263, CallingPid : 29981
W/DynamiteModule(29981): Local module descriptor class for providerinstaller not found.
Flutter Doctor -v is:
[β] Flutter (Channel stable, v1.17.4, on Mac OS X 10.15.5 19F101, locale en-US)
β’ Flutter version 1.17.4 at /Users/mlemos/Documents/flutter
β’ Framework revision 1ad9baa8b9 (3 days ago), 2020-06-17 14:41:16 -0700
β’ Engine revision ee76268252
β’ Dart version 2.8.4
[β] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
β’ Android SDK at /Users/mlemos/Library/Android/sdk
β’ Platform android-30, build-tools 29.0.2
β’ Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
β’ Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593)
β’ All Android licenses accepted.
[β] Xcode - develop for iOS and macOS (Xcode 11.5)
β’ Xcode at /Applications/Xcode.app/Contents/Developer
β’ Xcode 11.5, Build version 11E608c
β’ CocoaPods version 1.9.1
[!] Android Studio (version 4.0)
β’ Android Studio at /Applications/Android Studio.app/Contents
β Flutter plugin not installed; this adds Flutter specific functionality.
β Dart plugin not installed; this adds Dart specific functionality.
β’ Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593)
[β] VS Code (version 1.46.1)
β’ VS Code at /Applications/Visual Studio Code.app/Contents
β’ Flutter extension version 3.11.0
[β] Connected device (1 available)
β’ SM J415G β’ 1abf0307 β’ android-arm β’ Android 9 (API 28)
! Doctor found issues in 1 category.
Strangely, now the tests are like this:
All of them using the same Wifi and same 3G network.
@mlemos Are you able to access the firestore hostname from a browser on the devices that are not working?
For me I have 1 Mi-A2(Android Phone) and 1 iPhoneXR here are the test results.
So I have a bit different configuration of WiFi.
Wifi 1 = Main Wifi given by the service provider (with DHCP enable)
Wifi 2 = New network created from Wifi 1 and it has its own DHCP enable
So when I connect my iPhoneXR on Wifi 2 it start throwing the exception mentioned. But I connect to Wifi 1 it works perfectly.
If I disable the DHCP of wifi 2 and use it as a switch and keep the DHCP enable of Wifi 1 then also it works perfectly.
So I think there is some issue with dynamic IP and network connection and that's why it is causing the exception(Thinking loud)
I hope this will help to resolve this issue.
I am facing a similar issue. any solution so far
Any physical device - fails on wifi and works on 4G
I got a new broadband connection yesterday and saw a few firebase package update in the package.json. Could these be related?
Any suggestion soon appreciated
hi, I am also facing the same issue, for me it doesn't work on Airtel 4G network but it works on Idea 4G network, though both are good network providers, also I tested on WIFI, it works fine, I get same results across the devices. Please help
I have the same issue, doesn't work my device Redmi Note 8 Pro - on Airtel 4G but works on Airtel 2G and also on Wifi (Airtel Broadband).
Also, not working on Samsung galaxy s8+ - Vodafone 4G.
Working on other devices I have tested till now.
But there surely is a problem with fireflutter - how can firstore say slow connection on 4G(Ookla SpeedTest - 30Mbps) but not on 2G?
FlutterFire just sends some data from Dart, which hits the native Firebase SDKs, and sends the data back once they return some data. There isn't anything to debug on our end since it's a Firebase/SDK/location problem.
Have you raised a ticket directly with Firebase?
Hi All, after trying many different approaches to this error I was not able to systematically reproduce it.
Also, I noted that the errors I was getting at the time I opened this issue were related to one of the WiFi networks in my home. In other words, it worked fine in one WiFi network and not in another.
The networks are very very similar, same ISP, same configurations, same hardware, and I was not able to identify any differences between them that could be linked to the error. On my side, I quit trying to solve the issue.
However, there is definitely something here... and we need a better way to understand such basic and critical issues like network issues with Flutter and Firebase as those are key for reliability in the apps being developed.
Hello!
I am also facing the same issue here with Crashlytics.
Using a physical tablet (ProDVX 22") Crashlytics does not initialise correctly with the error:
D/FirebaseCrashlytics: Reports are being sent.
D/FirebaseCrashlytics: Requesting settings from https://firebase-settings.crashlytics.com/spi/v2/platforms/android/gmp/1:XXXXXXX:android:XXXXXXX/settings
D/FirebaseCrashlytics: Settings query params were: {instance=XXXXXXXXXX, build_version=1, display_version=1.0.0, source=1}
E/FirebaseCrashlytics: Settings request failed.
java.io.InterruptedIOException: timeout
at okhttp3.RealCall.timeoutExit(RealCall.java:107)
at okhttp3.RealCall.execute(RealCall.java:96)
at com.google.firebase.crashlytics.internal.network.HttpRequest.execute(com.google.firebase:firebase-crashlytics@@17.0.0:129)
at com.google.firebase.crashlytics.internal.settings.network.DefaultSettingsSpiCall.invoke(com.google.firebase:firebase-crashlytics@@17.0.0:86)
at com.google.firebase.crashlytics.internal.settings.SettingsController$1.then(com.google.firebase:firebase-crashlytics@@17.0.0:200)
at com.google.firebase.crashlytics.internal.settings.SettingsController$1.then(com.google.firebase:firebase-crashlytics@@17.0.0:193)
at com.google.android.gms.tasks.zzp.run(Unknown Source:2)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
at com.google.firebase.crashlytics.internal.common.ExecutorUtils$1$1.onRun(com.google.firebase:firebase-crashlytics@@17.0.0:60)
at com.google.firebase.crashlytics.internal.common.BackgroundPriorityRunnable.run(com.google.firebase:firebase-crashlytics@@17.0.0:27)
at java.lang.Thread.run(Thread.java:764)
Caused by: java.io.IOException: Canceled
at okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.java:120)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:121)
at okhttp3.RealCall.getResponseWithInterceptorChain(RealCall.java:254)
at okhttp3.RealCall.execute(RealCall.java:92)
at com.google.firebase.crashlytics.internal.network.HttpRequest.execute(com.google.firebase:firebase-crashlytics@@17.0.0:129)
at com.google.firebase.crashlytics.internal.settings.network.DefaultSettingsSpiCall.invoke(com.google.firebase:firebase-crashlytics@@17.0.0:86)
at com.google.firebase.crashlytics.internal.settings.SettingsController$1.then(com.google.firebase:firebase-crashlytics@@17.0.0:200)
at com.google.firebase.crashlytics.internal.settings.SettingsController$1.then(com.google.firebase:firebase-crashlytics@@17.0.0:193)
at com.google.android.gms.tasks.zzp.run(Unknown Source:2)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
at com.google.firebase.crashlytics.internal.common.ExecutorUtils$1$1.onRun(com.google.firebase:firebase-crashlytics@@17.0.0:60)
at com.google.firebase.crashlytics.internal.common.BackgroundPriorityRunnable.run(com.google.firebase:firebase-crashlytics@@17.0.0:27)
at java.lang.Thread.run(Thread.java:764)
But with the emulator it works fine:
D/FirebaseCrashlytics: Requesting settings from https://firebase-settings.crashlytics.com/spi/v2/platforms/android/gmp/XXXXXXXX/settings
D/FirebaseCrashlytics: Settings query params were: {instance=XXXXXXXXXXX, build_version=1, display_version=1.0.0, source=1}
D/FirebaseCrashlytics: Settings request ID: null
D/FirebaseCrashlytics: Settings result was: 200
D/FirebaseCrashlytics: Writing settings to cache file...
D/FirebaseCrashlytics: Loaded settings: {"settings_version":3,"cache_duration":86400,"features":{"collect_logged_exceptions":true,"collect_reports":true,"collect_analytics":false,"prompt_enabled":false,"push_enabled":false,"firebase_crashlytics_enabled":false},"app":{"status":"activated","update_required":false,"report_upload_variant":1,"native_report_upload_variant":1},"fabric":{"org_id":"XXXXXXXXXX","bundle_id":"XXXXXX"},"expires_at":1601540531383}
D/FirebaseCrashlytics: Send via DataTransport disabled. Removing DataTransport reports.
D/FirebaseCrashlytics: Starting report processing in 1.0 second(s)β¦
Both are on the same Wifi network. Running the exact same app.
Going to the settings URL displayed in the log is working fine on the tablet with Chrome and also on my laptop. And the result is displayed in less than 1 second.
Official Google/Firebase support ask me to fill the issue here, since they don't address Firebase/Flutter related API.
Hello. I have the same issue, but for Samsung J6 and J4.
I have some Flutter applications, everything works fine in every device, but Samsung.
Users have complained about the app not getting any data when connected on wifi.
I bought a Samsung J6, just for testing, and I installed one of my apps from the play Store and it was completely blank. After 3 minutes, just staring the screen, the data showed.
Detail: I have other app pubished but with SQL database. This one worked well. So I think it is something related to Firebase.
Antoher detail: the same code from Web works.
I think the problem is it takes a long time to get wi-fi connection from Samsung.
One detail: this device only connects in wi-fi 2.4ghz
With the debub app and completely connected in wi-fi, we get this:
W/Firestore(32621): (21.3.0) [OnlineStateTracker]: Could not reach Cloud Firestore backend. Backend didn't respond within 10 seconds
W/Firestore(32621):
W/Firestore(32621): 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.
After 3 minutes, it finally shows data.
I put the installed apk from Play Store for debugger and I think this verbose may be important:
2020-11-13 13:59:38.721 28883-25297/? W/NetworkScheduler: Error inserting flex_time=3534000 job_id=-1 period=7069000 source=16 requires_charging=0 preferred_network_type=1 target_class=com.google.android.gms.measurement.PackageMeasurementTaskService user_id=0 target_package=com.google.android.gms tag=Measurement.PackageMeasurementTaskService.UPLOAD_TASK_TAG task_type=0 required_idleness_state=0 service_kind=0 source_version=203915000 persistence_level=1 preferred_charging_state=1 required_network_type=0 runtime=1605286778713 retry_strategy={"maximum_backoff_seconds":{"3600":0},"initial_backoff_seconds":{"30":0},"retry_policy":{"0":0}} last_runtime=0, error message: UNIQUE constraint failed: pending_ops.tag, pending_ops.target_class, pending_ops.target_package, pending_ops.user_id (code 2067 SQLITE_CONSTRAINT_UNIQUE[2067]) [CONTEXT service_id=218 ]
I get the following erros from the published app:
2020-11-13 13:54:09.753 3300-3534/? E/NetdEventListenerService: handleMessage: { when=0 what=10001 obj=com.android.server.connectivity.NetdEventListenerService$DnsResultParams@c36a3bb target=com.android.server.connectivity.NetdEventListenerService$DnsEventHandler }
2020-11-13 13:54:12.569 3816-5647/? E/#IMSCR: 11-13 13:54:12 0x12060000:N,REFR:0
2020-11-13 13:54:12.605 3816-5647/? E/#IMSCR: 11-13 13:54:12 0x12060001:N,REFR:FOUND:0
2020-11-13 13:54:12.898 2893-4382/? E/NativeSemDvfsGpuManager: acquire:: Start
2020-11-13 13:54:12.898 2893-4382/? E/NativeSemDvfsGpuManager: acquire:: timeout = 1000 mIsAcquired = 0 mTagName : SurfaceFlinger
2020-11-13 13:54:12.900 2893-4382/? E/NativeCustomFrequencyManager: [NativeCFMS] BpCustomFrequencyManager::requestGPU()
2020-11-13 13:54:12.901 2893-4382/? E/NativeSemDvfsGpuManager: acquire:: End
2020-11-13 13:54:13.414 2893-4382/? E/NativeSemDvfsGpuManager: acquire:: Start
2020-11-13 13:54:13.414 2893-4382/? E/NativeSemDvfsGpuManager: acquire:: timeout = 1000 mIsAcquired = 1 mTagName : SurfaceFlinger
2020-11-13 13:54:13.414 2893-4382/? E/NativeCustomFrequencyManager: [NativeCFMS] BpCustomFrequencyManager::requestGPU()
2020-11-13 13:54:13.414 2893-4382/? E/NativeSemDvfsGpuManager: acquire:: End
2020-11-13 13:54:14.415 2893-4381/? E/NativeSemDvfsGpuManager: release:: Start
2020-11-13 13:54:14.415 2893-4381/? E/NativeSemDvfsGpuManager: release():: mIsAcquired = 1 , mName = GPU , mTagName : SurfaceFlinger
2020-11-13 13:54:14.416 2893-4381/? E/NativeCustomFrequencyManager: [NativeCFMS] BpCustomFrequencyManager::releaseGPU()
2020-11-13 13:54:14.417 2893-4381/? E/NativeSemDvfsGpuManager: release:: End
2020-11-13 13:54:14.577 22613-22613/? E/Zygote: isWhitelistProcess - Process is Whitelisted
2020-11-13 13:54:14.578 22613-22613/? E/Zygote: accessInfo : 1
2020-11-13 13:54:14.595 22613-22613/? E/d.mobileservic: Not starting debugger since process cannot load the jdwp agent.
2020-11-13 13:54:14.817 22632-22632/? E/Zygote: isWhitelistProcess - Process is Whitelisted
2020-11-13 13:54:14.818 22632-22632/? E/Zygote: accessInfo : 1
2020-11-13 13:54:14.827 22632-22632/? E/android:drmSer: Not starting debugger since process cannot load the jdwp agent.
2020-11-13 13:54:14.989 22613-22613/? E/SEMS:DataAdapterLog_11.1.0: [SEMS][2][GroupDBHelper] Instance null
2020-11-13 13:54:17.905 2893-4382/? E/NativeSemDvfsGpuManager: acquire:: Start
2020-11-13 13:54:17.905 2893-4382/? E/NativeSemDvfsGpuManager: acquire:: timeout = 1000 mIsAcquired = 0 mTagName : SurfaceFlinger
2020-11-13 13:54:17.908 2893-4382/? E/NativeCustomFrequencyManager: [NativeCFMS] BpCustomFrequencyManager::requestGPU()
2020-11-13 13:54:17.908 2893-4382/? E/NativeSemDvfsGpuManager: acquire:: End
2020-11-13 13:54:18.420 2893-4382/? E/NativeSemDvfsGpuManager: acquire:: Start
2020-11-13 13:54:18.421 2893-4382/? E/NativeSemDvfsGpuManager: acquire:: timeout = 1000 mIsAcquired = 1 mTagName : SurfaceFlinger
2020-11-13 13:54:18.422 2893-4382/? E/NativeCustomFrequencyManager: [NativeCFMS] BpCustomFrequencyManager::requestGPU()
2020-11-13 13:54:18.422 2893-4382/? E/NativeSemDvfsGpuManager: acquire:: End
2020-11-13 13:54:19.423 2893-4381/? E/NativeSemDvfsGpuManager: release:: Start
2020-11-13 13:54:19.423 2893-4381/? E/NativeSemDvfsGpuManager: release():: mIsAcquired = 1 , mName = GPU , mTagName : SurfaceFlinger
2020-11-13 13:54:19.425 2893-4381/? E/NativeCustomFrequencyManager: [NativeCFMS] BpCustomFrequencyManager::releaseGPU()
2020-11-13 13:54:19.425 2893-4381/? E/NativeSemDvfsGpuManager: release:: End
2020-11-13 13:54:22.894 2893-4382/? E/NativeSemDvfsGpuManager: acquire:: Start
2020-11-13 13:54:22.894 2893-4382/? E/NativeSemDvfsGpuManager: acquire:: timeout = 1000 mIsAcquired = 0 mTagName : SurfaceFlinger
2020-11-13 13:54:22.896 2893-4382/? E/NativeCustomFrequencyManager: [NativeCFMS] BpCustomFrequencyManager::requestGPU()
2020-11-13 13:54:22.896 2893-4382/? E/NativeSemDvfsGpuManager: acquire:: End
2020-11-13 13:54:23.410 2893-4382/? E/NativeSemDvfsGpuManager: acquire:: Start
2020-11-13 13:54:23.410 2893-4382/? E/NativeSemDvfsGpuManager: acquire:: timeout = 1000 mIsAcquired = 1 mTagName : SurfaceFlinger
2020-11-13 13:54:23.411 2893-4382/? E/NativeCustomFrequencyManager: [NativeCFMS] BpCustomFrequencyManager::requestGPU()
2020-11-13 13:54:23.411 2893-4382/? E/NativeSemDvfsGpuManager: acquire:: End
2020-11-13 13:54:24.412 2893-4381/? E/NativeSemDvfsGpuManager: release:: Start
2020-11-13 13:54:24.412 2893-4381/? E/NativeSemDvfsGpuManager: release():: mIsAcquired = 1 , mName = GPU , mTagName : SurfaceFlinger
2020-11-13 13:54:24.414 2893-4381/? E/NativeCustomFrequencyManager: [NativeCFMS] BpCustomFrequencyManager::releaseGPU()
2020-11-13 13:54:24.414 2893-4381/? E/NativeSemDvfsGpuManager: release:: End
2020-11-13 13:54:27.901 2893-4382/? E/NativeSemDvfsGpuManager: acquire:: Start
2020-11-13 13:54:27.901 2893-4382/? E/NativeSemDvfsGpuManager: acquire:: timeout = 1000 mIsAcquired = 0 mTagName : SurfaceFlinger
2020-11-13 13:54:27.903 2893-4382/? E/NativeCustomFrequencyManager: [NativeCFMS] BpCustomFrequencyManager::requestGPU()
2020-11-13 13:54:27.903 2893-4382/? E/NativeSemDvfsGpuManager: acquire:: End
2020-11-13 13:54:28.417 2893-4382/? E/NativeSemDvfsGpuManager: acquire:: Start
2020-11-13 13:54:28.417 2893-4382/? E/NativeSemDvfsGpuManager: acquire:: timeout = 1000 mIsAcquired = 1 mTagName : SurfaceFlinger
2020-11-13 13:54:28.417 2893-4382/? E/NativeCustomFrequencyManager: [NativeCFMS] BpCustomFrequencyManager::requestGPU()
2020-11-13 13:54:28.417 2893-4382/? E/NativeSemDvfsGpuManager: acquire:: End
2020-11-13 13:54:29.418 2893-4381/? E/NativeSemDvfsGpuManager: release:: Start
2020-11-13 13:54:29.418 2893-4381/? E/NativeSemDvfsGpuManager: release():: mIsAcquired = 1 , mName = GPU , mTagName : SurfaceFlinger
2020-11-13 13:54:29.420 2893-4381/? E/NativeCustomFrequencyManager: [NativeCFMS] BpCustomFrequencyManager::releaseGPU()
2020-11-13 13:54:29.420 2893-4381/? E/NativeSemDvfsGpuManager: release:: End
2020-11-13 13:54:30.855 3300-3324/? E/Watchdog: !@sync 198 [2020-11-13 13:54:30.855] FD count : 520, wdog_way : softdog
2020-11-13 13:54:32.907 2893-4382/? E/NativeSemDvfsGpuManager: acquire:: Start
2020-11-13 13:54:32.907 2893-4382/? E/NativeSemDvfsGpuManager: acquire:: timeout = 1000 mIsAcquired = 0 mTagName : SurfaceFlinger
2020-11-13 13:54:32.910 2893-4382/? E/NativeCustomFrequencyManager: [NativeCFMS] BpCustomFrequencyManager::requestGPU()
2020-11-13 13:54:32.910 2893-4382/? E/NativeSemDvfsGpuManager: acquire:: End
2020-11-13 13:54:33.423 2893-4382/? E/NativeSemDvfsGpuManager: acquire:: Start
2020-11-13 13:54:33.423 2893-4382/? E/NativeSemDvfsGpuManager: acquire:: timeout = 1000 mIsAcquired = 1 mTagName : SurfaceFlinger
2020-11-13 13:54:33.425 2893-4382/? E/NativeCustomFrequencyManager: [NativeCFMS] BpCustomFrequencyManager::requestGPU()
2020-11-13 13:54:33.425 2893-4382/? E/NativeSemDvfsGpuManager: acquire:: End
2020-11-13 13:54:34.426 2893-4381/? E/NativeSemDvfsGpuManager: release:: Start
2020-11-13 13:54:34.426 2893-4381/? E/NativeSemDvfsGpuManager: release():: mIsAcquired = 1 , mName = GPU , mTagName : SurfaceFlinger
2020-11-13 13:54:34.428 2893-4381/? E/NativeCustomFrequencyManager: [NativeCFMS] BpCustomFrequencyManager::releaseGPU()
2020-11-13 13:54:34.428 2893-4381/? E/NativeSemDvfsGpuManager: release:: End
2020-11-13 13:54:34.729 7825-22606/? E/InternalPeopleServiceGrpcClient: Error making Grpc request.
clxm: DEADLINE_EXCEEDED: deadline exceeded after 24.969990846s. [buffered_nanos=24970205597, waiting_for_connection]
at clxl.c(:com.google.android.gms@[email protected] (120306-335085812):3)
at snn.a(:com.google.android.gms@[email protected] (120306-335085812):65)
at apeo.a(:com.google.android.gms@[email protected] (120306-335085812):34)
at apeq.a(:com.google.android.gms@[email protected] (120306-335085812):18)
at aper.run(:com.google.android.gms@[email protected] (120306-335085812):2)
at java.lang.Thread.run(Thread.java:919)
2020-11-13 13:54:34.729 7825-22606/? E/FSA2_GroupSyncGrpc: getGroups() failed
clxm: DEADLINE_EXCEEDED: deadline exceeded after 24.969990846s. [buffered_nanos=24970205597, waiting_for_connection]
at clxl.c(:com.google.android.gms@[email protected] (120306-335085812):3)
at snn.a(:com.google.android.gms@[email protected] (120306-335085812):65)
at apeo.a(:com.google.android.gms@[email protected] (120306-335085812):34)
at apeq.a(:com.google.android.gms@[email protected] (120306-335085812):18)
at aper.run(:com.google.android.gms@[email protected] (120306-335085812):2)
at java.lang.Thread.run(Thread.java:919)
2020-11-13 13:54:37.897 2893-4382/? E/NativeSemDvfsGpuManager: acquire:: Start
2020-11-13 13:54:37.897 2893-4382/? E/NativeSemDvfsGpuManager: acquire:: timeout = 1000 mIsAcquired = 0 mTagName : SurfaceFlinger
2020-11-13 13:54:37.899 2893-4382/? E/NativeCustomFrequencyManager: [NativeCFMS] BpCustomFrequencyManager::requestGPU()
2020-11-13 13:54:37.899 2893-4382/? E/NativeSemDvfsGpuManager: acquire:: End
2020-11-13 13:54:38.413 2893-4382/? E/NativeSemDvfsGpuManager: acquire:: Start
There is this error too:
There is this error:
2020-11-13 14:57:22.263 14098-14115/com.oneplanet.historiasparadormir E/MediaHTTPConnection: java.lang.NullPointerException: Attempt to invoke virtual method 'java.net.URLConnection java.net.URL.openConnection()' on a null object reference
at android.media.MediaHTTPConnection.seekTo(MediaHTTPConnection.java:256)
at android.media.MediaHTTPConnection.getMIMEType(MediaHTTPConnection.java:475)
at android.media.IMediaHTTPConnection$Stub.onTransact(IMediaHTTPConnection.java:159)
at android.os.Binder.execTransactInternal(Binder.java:1056)
at android.os.Binder.execTransact(Binder.java:1029)
2020-11-13 14:57:22.265 14098-14115/com.oneplanet.historiasparadormir E/MediaHTTPConnection: java.lang.NullPointerException: Attempt to invoke virtual method 'java.net.URLConnection java.net.URL.openConnection()' on a null object reference
at android.media.MediaHTTPConnection.seekTo(MediaHTTPConnection.java:256)
at android.media.MediaHTTPConnection.getSize(MediaHTTPConnection.java:461)
at android.media.IMediaHTTPConnection$Stub.onTransact(IMediaHTTPConnection.java:151)
at android.os.Binder.execTransactInternal(Binder.java:1056)
at android.os.Binder.execTransact(Binder.java:1029)
This is really urgent! The apps are blank in some devices!!
Help, please.
I also reproduced this issue on another out of the box tablet through a working wifi connection:
E/FirebaseCrashlytics( 5971): Settings request failed.
E/FirebaseCrashlytics( 5971): java.io.InterruptedIOException: timeout
E/FirebaseCrashlytics( 5971): at okhttp3.RealCall.timeoutExit(RealCall.java:107)
E/FirebaseCrashlytics( 5971): at okhttp3.RealCall.execute(RealCall.java:96)
E/FirebaseCrashlytics( 5971): at com.google.firebase.crashlytics.internal.network.HttpRequest.execute(com.google.firebase:firebase-crashlytics@@17.0.0:129)
E/FirebaseCrashlytics( 5971): at com.google.firebase.crashlytics.internal.settings.network.DefaultSettingsSpiCall.invoke(com.google.firebase:firebase-crashlytics@@17.0.0:86)
E/FirebaseCrashlytics( 5971): at com.google.firebase.crashlytics.internal.settings.SettingsController$1.then(com.google.firebase:firebase-crashlytics@@17.0.0:200)
E/FirebaseCrashlytics( 5971): at com.google.firebase.crashlytics.internal.settings.SettingsController$1.then(com.google.firebase:firebase-crashlytics@@17.0.0:193)
E/FirebaseCrashlytics( 5971): at com.google.android.gms.tasks.zzp.run(Unknown Source:2)
E/FirebaseCrashlytics( 5971): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162)
E/FirebaseCrashlytics( 5971): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
E/FirebaseCrashlytics( 5971): at com.google.firebase.crashlytics.internal.common.ExecutorUtils$1$1.onRun(com.google.firebase:firebase-crashlytics@@17.0.0:60)
E/FirebaseCrashlytics( 5971): at com.google.firebase.crashlytics.internal.common.BackgroundPriorityRunnable.run(com.google.firebase:firebase-crashlytics@@17.0.0:27)
E/FirebaseCrashlytics( 5971): at java.lang.Thread.run(Thread.java:764)
E/FirebaseCrashlytics( 5971): Caused by: java.io.IOException: Canceled
E/FirebaseCrashlytics( 5971): at okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.java:120)
E/FirebaseCrashlytics( 5971): at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147)
E/FirebaseCrashlytics( 5971): at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:121)
E/FirebaseCrashlytics( 5971): at okhttp3.RealCall.getResponseWithInterceptorChain(RealCall.java:254)
E/FirebaseCrashlytics( 5971): at okhttp3.RealCall.execute(RealCall.java:92)
E/FirebaseCrashlytics( 5971): ... 10 more
Maybe there is something obvious to solve this issue, but in the meantime our app can't send analytics or crash report...
It is not possible to use Firebase due to this error.
It's critical!
The apps are blank in some devices.
Another log:
E/flutter (25716): [ERROR:flutter/lib/ui/ui_dart_state.cc(177)] Unhandled Exception: [cloud_firestore/unavailable] The service is currently unavailable. This is a most likely a transient condition and may be corrected by retrying with a backoff.
E/flutter (25716): #0 MethodChannelDocumentReference.get (package:cloud_firestore_platform_interface/src/method_channel/method_channel_document_reference.dart:80:7)
E/flutter (25716):
E/flutter (25716): #1 DocumentReference.get (package:cloud_firestore/src/document_reference.dart:63:20)
E/flutter (25716):
E/flutter (25716): #2 _MyHomePageState.initState.
E/flutter (25716):
E/flutter (25716):
D/ConnectivityManager(25716): unregisterNetworkCallback; CallingUid : 10238, CallingPid : 25716
W/Firestore(25716): (21.7.1) [WatchStream]: (7cbc8be) Stream closed with status: Status{code=UNAVAILABLE, description=Channel shutdownNow invoked, cause=null}.
Has anyone found a workaround for this issue?
Nope... It doesn't work on some device model, sadly this is the model which should go to production, we will not be able to monitor crash and analytics for this application...
Every day, for at least 2 months I have the same error.
Maybe the fix is simple or may depend on an OS setting, but for now this is a major issue for us.
@jdimond Do you think you could help us here?
The message comes from onlinestatetracker. If you check in the code there is a comment:
The weird part is that onlinestatetracker is in ios/Pods? but the message occurs when we use Android.
Or am I wrong?
// To deal with transient failures, we allow multiple stream attempts before
// giving up and transitioning from OnlineState Unknown to Offline.
// TODO(mikelehen): This used to be set to 2 as a mitigation for b/66228394.
// @jdimond thinks that bug is sufficiently fixed so that we can set this back
// to 1. If that works okay, we could potentially remove this logic entirely.
const int kMaxWatchStreamFailures = 1;
I also encountered this problem, but the issue has been resolved a few days back on one of my devices.
@Ehesp I would like to confirm that this issue was not limited to FlutterFire, native Android Firebase Apps were not working as well.
I was in contact with Firebase Support, they told me that there are some issues with ISPs on which they are working to get them resolved.
For me, things are working fine now, but once in a couple of weeks, I still face this issue for 5-10 mins. And, I have noticed that when this issue occurs, even YouTube takes a long time in loading.
Here, it happens all the time in some devices in wi-fi. The same app is working fine in one device, and it doesn't work in other.
Here, it happens in some devices. The same app is working fine in one device, and it doesn't work in other.
@ElaineSchwner What I found after hours of testing that the problem isn't with the device, but the network. On the devices in which the app isn't working, try using a network different than you are using on that device.
Here, it happens in some devices. The same app is working fine in one device, and it doesn't work in other.
@ElaineSchwner What I found after hours of testing that the problem isn't with the device, but the network. On the devices in which the app isn't working, try using a network different than you are using on that device.
Yes, it doesn't work if the network is connecting in wi-fi through a 2.4 Mhz router. But some devices, like Samsung J6, only connect in 2.4Mhz, it doesn't connect in a 5.0 Mhz.
I know this because, after so many complaints I bought a Samsung J6 and here I have two routers, one 2.4 and the other 5.0.
But how can we tell the users that our app doesn't work on wi-fi?
It is an issue that needs to be corrected.
Yes, absolutely there is no way to tell the users that our app doesn't work on wi-fi.
This issue needs to be corrected ASAP, because it makes releasing an app impossible when about 20% users can't use it.
But, what I think is all the people here should directly raise request with firebase rather than flutter fire, because the root of this issue is present in firebase and not flutterfire.
i have a case where im testing on a simulator ( iphone ) and the app works on a version of the device but not in another. Connected to the same network ( wifi ) but different results.
Same here, on the same network it works on the simulator but not on two devices, all of them can connect to the Internet.
Firebase support did not want to address the issue, since FlutterFire is not supported.
Yes, absolutely there is no way to tell the users that our app doesn't work on wi-fi.
This issue needs to be corrected ASAP, because it makes releasing an app impossible when about 20% users can't use it.
But, what I think is all the people here should directly raise request with firebase rather than flutter fire, because the root of this issue is present in firebase and not flutterfire.
I just created a native app (kotlin) and made a simple list connecting with Firebase for testing purpose. It worked fine, on the same device that doesn't work with FlutterFire.
So I think it is problem with this package not with Firebase.
I downgraded to cloud_firestore: 0.13.6
And it started working.
Most helpful comment
HI @TahaTesser , I just performed a "reset to factory defaults" on my Pixel 3XL and the problem persisted. It happens on both my Pixel 4XL and Pixel 3XL. I'll grab another device today and perform more testing.
What is interesting is that both Firestore and Crashlytics provide error messages while running over wifi. It seems that the firebase plugin is not correctly identifying the connectivity status and is assuming that it is not connected over wifi in those circumstances.
Probably a shared code between Crashlytics and Firestore causing the error on both packages.
Crashlytics error:
Firestore Error: