firebase-js-sdk icon indicating copy to clipboard operation
firebase-js-sdk copied to clipboard

Firebase blocked in Some Russia areas

Open AbdElrahman-Rafaat-Amer opened this issue 2 years ago • 32 comments

Operating System

iOS/Android

Browser Version

not exists

Firebase SDK Version

Android-->19.0.0 /iOS---->10.0.0

Firebase SDK Product:

Firestore

Describe your project's tooling

Swift for iOS Java for Android

Describe the problem

I am facing some problems with creating the user nodes on FireStore the nodes aren't created or created with some attributes (fields ) and others are not. This is an example of what I mean:

If I want to write these fields to FireStore var user = User() user.email = Auth.auth().currentUser!.email! user.time_stamp = "19-10-2023" user.name = "Username" user.age = 24 user.uid = Auth.auth().currentUser!.uid user.language = "ru" user.address = "Russia"

there are 2 scenarios: the First-------> the node will not be created. the second----> the node will be created with only some fields and others not like user.email = Auth.auth().currentUser!.email! user.time_stamp = "19-10-2023" user.name = "Username"

or user.uid = Auth.auth().currentUser!.uid user.language = "ru" user.address = "Russia"

or user.address = "Russia"

Note:

  • This case only happened with some of end users in Russia but there are some users the FireStore works fine without this "STRANGE BEHAVIOR"
  • The user who faced this problems when use VPN every thing works fine with any blocker.

SO Here is my question: Does some Firebase service like "FIRESTORE" or any other services blocked in some ares not Just Russia

Steps and code to reproduce issue

        if let uid = Auth.auth().currentUser?.uid {
            try? store.collection(Users_F_KEY).document(uid).setData(from: user, completion: { error in
                if (error != nil) {
                   //show error
                } else {
                  //continue the flow
                }
            })
        }

AbdElrahman-Rafaat-Amer avatar Oct 19 '23 10:10 AbdElrahman-Rafaat-Amer

Hi @AbdElrahman-Rafaat-Amer ! Can you clarify what stack and platform you're using? You indicated that you're having issues with iOS and Android. Do you have native iOS and Android apps? Are you using the Web SDK (this repository), and if so, how?

ehsannas avatar Oct 19 '23 16:10 ehsannas

I am seeing a similar issue/behavior - in the past week or so, users of my iPhone app in Russia are reporting that they can no longer access the Firestore database.

tgvoskuilen avatar Oct 19 '23 20:10 tgvoskuilen

Same here, Flutter with firestore. Both android and ios platforms. Wifi and mobile internet. And it is unacceptable at all! Works only with VPN.

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.
Stream error: 'Unavailable: failed to connect to all addresses; last error: UNKNOWN: ipv6:%5B2a00:1450:4010:c02::5f%5D:443: No route to host' 

nzackoya avatar Oct 19 '23 20:10 nzackoya

Hi @ehsannas, I am using native apps for Android and iOS and also use the library for native Android and iOS. It's my fault that I opened the issue at the web repository so I apologize for that. Should I delete the issue from this repository and Recreate it on the Android and iOS repositories? or is it okay to continue here?

AbdElrahman-Rafaat-Amer avatar Oct 19 '23 20:10 AbdElrahman-Rafaat-Amer

@tgvoskuilen Are all users facing this issue or just some users (depending on their location in Russia)? Do some of them(who face the strange behavior) use a VPN and the issue is solved (Some of my app users use a VPN and the app works)?

AbdElrahman-Rafaat-Amer avatar Oct 19 '23 20:10 AbdElrahman-Rafaat-Amer

I do not know - I've been contacted by a couple dozen users, all in Russia, about the loss of connection. None of them have tried a VPN that I know of. I haven't been able to replicate it myself or figure out any sort of workarounds.

tgvoskuilen avatar Oct 19 '23 20:10 tgvoskuilen

I do not know - I've been contacted by a couple dozen users, all in Russia, about the loss of connection. None of them have tried a VPN that I know of. I haven't been able to replicate it myself or figure out any sort of workarounds.

@tgvoskuilen The only workaround I tried and worked was to ask users to use a VPN that works for them(Just to ensure not a code issue ) but this can not be the regular behavior it is annoying to ask users to use a VPN to use your app

AbdElrahman-Rafaat-Amer avatar Oct 19 '23 20:10 AbdElrahman-Rafaat-Amer

Same problem for me (issue #11736). I'm currently now in Vologda (Russia) and this last wednesday evening, Firestore was working without VPN. But since thursday, I must to use VPN (I tried with oldest and latests version of firebase plug-in).

Kinomad avatar Oct 20 '23 06:10 Kinomad

Are you (or anyone experiencing the issue) able to ping firestore.googleapis.com ?

ehsannas avatar Oct 20 '23 20:10 ehsannas

@ehsannas the ping is successful, but still having the issue

nzackoya avatar Oct 20 '23 21:10 nzackoya

@ehsannas As for @nzackoya, successful ping without VPN but still have the issue

Kinomad avatar Oct 21 '23 07:10 Kinomad

Таже проблема уже недели 2. В Москве временами нормально но в основном с VPN

Heoh888 avatar Oct 21 '23 12:10 Heoh888

Same problem, iOS with firestore and DB (Partly). can write in Firestore, but its problems with reading. Wifi and mobile internet. Works only with VPN.

shelvs023 avatar Oct 21 '23 13:10 shelvs023

Может это связано с тем, что Google в России банкрот с долгом в 50 миллиардов?!

Heoh888 avatar Oct 21 '23 13:10 Heoh888

same problem

iOS log

[FirebaseFirestore][I-FST000001] Committing transaction: <LevelDbTransaction Allocate target: 0 changes (0 bytes):> [FirebaseFirestore][I-FST000001] Using full collection scan to execute query: Query(canonical_id=) [FirebaseFirestore][I-FST000001] Committing transaction: <LevelDbTransaction ExecuteQuery: 0 changes (0 bytes):> [FirebaseFirestore][I-FST000001] WatchStream (137717d18) watch: <ListenRequest 0x16be1d6b0>: { [FirebaseFirestore][I-FST000001] GrpcStream('60000180e910'): operation of type 1 failed [FirebaseFirestore][I-FST000001] GrpcStream('60000180e910'): finishing the underlying call [FirebaseFirestore][I-FST000001] GrpcStream('60000180e910'): fast finishing 1 completion(s) [FirebaseFirestore][I-FST000001] GrpcStream('60000180e910'): finishing and notifying observers [FirebaseFirestore][I-FST000001] GrpcStream('60000180e910'): shutting down; completions: 0, is finished: true [FirebaseFirestore][I-FST000001] GrpcStream('60000180e910'): fast finishing 0 completion(s) [FirebaseFirestore][I-FST000001] WatchStream (137717d18) Stream error: 'Unavailable: failed to connect to all addresses; last error: UNKNOWN: No route to host' [FirebaseFirestore][I-FST000001] GrpcStream('60000180e910'): destroying stream [FirebaseFirestore][I-FST000001] Could not reach Cloud Firestore backend. Connection failed 1 times. Most recent error: failed to connect to all addresses; last error: UNKNOWN: No route to host [FirebaseFirestore][I-FST000001] WatchStream (137717d18) backoff [FirebaseFirestore][I-FST000001] Backing off for 0 ms (base delay: 1500 ms, delay with jitter: 1931 ms, last attempt: 32522 ms ago) [FirebaseFirestore][I-FST000001] WatchStream (137717d18) start [FirebaseFirestore][I-FST000001] WatchStream (137717d18) watch: <ListenRequest 0x16be1e110>: { [FirebaseFirestore][I-FST000001] GrpcStream('6000019d8ea0'): operation of type 1 failed [FirebaseFirestore][I-FST000001] GrpcStream('6000019d8ea0'): finishing the underlying call [FirebaseFirestore][I-FST000001] GrpcStream('6000019d8ea0'): fast finishing 1 completion(s) [FirebaseFirestore][I-FST000001] Committing transaction: <LevelDbTransaction Release target: 2 changes (137 bytes): [FirebaseFirestore][I-FST000001] WatchStream (137717d18) unwatch: <ListenRequest 0x16c04e270>: { [FirebaseFirestore][I-FST000001] GrpcStream('6000019d8ea0'): finishing and notifying observers [FirebaseFirestore][I-FST000001] GrpcStream('6000019d8ea0'): shutting down; completions: 0, is finished: true [FirebaseFirestore][I-FST000001] GrpcStream('6000019d8ea0'): fast finishing 0 completion(s) [FirebaseFirestore][I-FST000001] WatchStream (137717d18) Stream error: 'Unavailable: failed to connect to all addresses; last error: UNKNOWN: No route to host' [FirebaseFirestore][I-FST000001] GrpcStream('6000019d8ea0'): destroying stream [FirebaseFirestore][I-FST000001] WriteStream (138808448) start [FirebaseFirestore][I-FST000001] WriteStream (138808448) initial request: <WriteRequest 0x16c04e370>: { [FirebaseFirestore][I-FST000001] GrpcStream('60000180c090'): operation of type 1 failed [FirebaseFirestore][I-FST000001] GrpcStream('60000180c090'): finishing the underlying call [FirebaseFirestore][I-FST000001] GrpcStream('60000180c090'): fast finishing 1 completion(s) [FirebaseFirestore][I-FST000001] GrpcStream('60000180c090'): finishing and notifying observers [FirebaseFirestore][I-FST000001] GrpcStream('60000180c090'): shutting down; completions: 0, is finished: true [FirebaseFirestore][I-FST000001] GrpcStream('60000180c090'): fast finishing 0 completion(s) [FirebaseFirestore][I-FST000001] WriteStream (138808448) Stream error: 'Unavailable: failed to connect to all addresses; last error: UNKNOWN: No route to host' [FirebaseFirestore][I-FST000001] GrpcStream('60000180c090'): destroying stream [FirebaseFirestore][I-FST000001] WriteStream (138808448) backoff [FirebaseFirestore][I-FST000001] Backing off for 33575 ms (base delay: 57654 ms, delay with jitter: 33582 ms, last attempt: 7 ms ago)

theDrunkestMonkey avatar Oct 21 '23 15:10 theDrunkestMonkey

Hi everyone, a follow up question: Are you using other GCP products in your project, and if so, are you having access issues with any other service?

ehsannas avatar Oct 24 '23 22:10 ehsannas

Hello I am flutter developer from Russia. I facing with same problem. We are using Firebase for push notifications in our project. It`s works well. I am developing webrtc calls now. I started work on this calls about year ago, but at some point I started work on other issues. I used Firestore as signalling server in my project. Year ago it works fine, but now its works very unstable - sometimes i can create room for call, sometimes - not. VPN solves my problem, but its not what I looking for.

Error, which i getting (when firestore is not working):

W/Firestore( 9516): (24.8.1) [WriteStream]: (c65ea35) Stream closed with status: Status{code=UNAVAILABLE, description=null, cause=javax.net.ssl.SSLHandshakeException: Connection closed by peer
W/Firestore( 9516):     at com.google.android.gms.org.conscrypt.NativeCrypto.SSL_do_handshake(Native Method)
W/Firestore( 9516):     at com.google.android.gms.org.conscrypt.NativeSsl.doHandshake(:com.google.android.gms@[email protected] (190408-572056781):11)
W/Firestore( 9516):     at com.google.android.gms.org.conscrypt.ConscryptFileDescriptorSocket.startHandshake(:com.google.android.gms@[email protected] (190408-572056781):131)
W/Firestore( 9516):     at io.grpc.okhttp.OkHttpProtocolNegotiator.negotiate(OkHttpProtocolNegotiator.java:100)
W/Firestore( 9516):     at io.grpc.okhttp.OkHttpProtocolNegotiator$AndroidNegotiator.negotiate(OkHttpProtocolNegotiator.java:218)
W/Firestore( 9516):     at io.grpc.okhttp.OkHttpTlsUpgrader.upgrade(OkHttpTlsUpgrader.java:63)
W/Firestore( 9516):     at io.grpc.okhttp.OkHttpClientTransport$3.run(OkHttpClientTransport.java:551)
W/Firestore( 9516):     at io.grpc.internal.SerializingExecutor.run(SerializingExecutor.java:133)
W/Firestore( 9516):     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
W/Firestore( 9516):     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:644)
W/Firestore( 9516):     at java.lang.Thread.run(Thread.java:1012)
W/Firestore( 9516): }.

DimkaSF avatar Oct 25 '23 11:10 DimkaSF

We are experiencing an issue whenever a user is connected via the following IP: 176.124.193.68.
For about 30% of users, everything works fine.

shStefan avatar Oct 25 '23 12:10 shStefan

Hello @ehsannas!

I tried to write my own grpc client that went to the RPC api firestore and everything worked fine. I still can’t understand why only in Russia the problem appeared in sdk firestore so unexpectedly

appmaketech avatar Oct 25 '23 22:10 appmaketech

Here with the same problem. Users give bad marks in Appstore because they cannot register. What is the problem?

EvgenyTishkin avatar Oct 26 '23 15:10 EvgenyTishkin

@ehsannas Hi! Tell, is there any progress to date?

appmaketech avatar Oct 28 '23 22:10 appmaketech

Same issue from Russia IP address Logs: [FirebaseFirestore][I-FST000001] 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.

[FirebaseFirestore][I-FST000001] WatchStream (102505df8) Stream error: 'Unavailable: failed to connect to all addresses; last error: UNKNOWN: No route to host'

P.S. Its work correctly w/ VPN

gikKid avatar Oct 29 '23 19:10 gikKid

This is not an issue in the SDK as the SDK simply sets the endpoint (firestore.googleapis.com). It might be a problem with routing the requests.

Can you browse to https://debug-my.firebaseapp.com/ and send us the log from the screen? Maybe that'll provide some insights.

ehsannas avatar Oct 30 '23 20:10 ehsannas

same issue - if you build flutter web - works fine, if you build android - need vpn

B0yma avatar Oct 31 '23 12:10 B0yma

same issue - if you build flutter web - works fine, if you build android - need vpn

yea, same issue from Russian users. works in flutter web but not work in flutter native

Bochu3 avatar Oct 31 '23 16:10 Bochu3

@ehsannas

All tests done. 1: webchannel.googleapis.com with default options: SUCCEEDED (2053ms) 2: webchannel.googleapis.com with detectBufferingProxy: SUCCEEDED (1882ms) 3: webchannel.googleapis.com with forceLongPolling: SUCCEEDED (1996ms) 4: webchannel.sandbox.google.com with default options: SUCCEEDED (2111ms) 5: webchannel.sandbox.google.com with detectBufferingProxy: SUCCEEDED (2076ms) 6: webchannel.sandbox.google.com with forceLongPolling: SUCCEEDED (1976ms) 7: Firestore listen test with default options: SUCCEEDED (1156ms) 8: Firestore listen test with detectBufferingProxy: SUCCEEDED (996ms) 9: Firestore listen test with forceLongPolling: SUCCEEDED (1421ms)

appmaketech avatar Oct 31 '23 21:10 appmaketech

@ehsannas

All tests done. 1: webchannel.googleapis.com with default options: FAILED (40387ms) 2: webchannel.googleapis.com with detectBufferingProxy: FAILED (39754ms) 3: webchannel.googleapis.com with forceLongPolling: FAILED (39761ms) 4: webchannel.sandbox.google.com with default options: FAILED (39993ms) 5: webchannel.sandbox.google.com with detectBufferingProxy: FAILED (40197ms) 6: webchannel.sandbox.google.com with forceLongPolling: FAILED (39785ms) 7: Firestore listen test with default options: SUCCEEDED (1639ms) 8: Firestore listen test with detectBufferingProxy: SUCCEEDED (1675ms) 9: Firestore listen test with forceLongPolling: SUCCEEDED (2175ms)


[296.807s] [goog.labs.net.webChannel.WebChannelDebug] TIMEOUT: null [300.798s] [goog.labs.net.webChannel.WebChannelDebug] TIMEOUT: null [303.790s] [goog.labs.net.webChannel.WebChannelDebug] TIMEOUT: null

Mustafin-Daniel avatar Nov 03 '23 21:11 Mustafin-Daniel

Same here, on mobile Firestore doesn't work, but Auth and Storage works.

den-ree avatar Nov 04 '23 11:11 den-ree

Firebase is not working for me also, with VPN everything working fine.... Saint-Petersburg Russia

naveenpardeep avatar Nov 04 '23 21:11 naveenpardeep

********************************************************
All tests done.
1: webchannel.googleapis.com with default options: FAILED (19902ms)
2: webchannel.googleapis.com with detectBufferingProxy: FAILED (19893ms)
3: webchannel.googleapis.com with forceLongPolling: FAILED (19844ms)
4: webchannel.sandbox.google.com with default options: FAILED (20083ms)
5: webchannel.sandbox.google.com with detectBufferingProxy: FAILED (19944ms)
6: webchannel.sandbox.google.com with forceLongPolling: FAILED (19863ms)
7: Firestore listen test with default options: SUCCEEDED (1135ms)
8: Firestore listen test with detectBufferingProxy: SUCCEEDED (999ms)
9: Firestore listen test with forceLongPolling: SUCCEEDED (1000ms)

********************************************************

:(

Misery7100 avatar Nov 15 '23 22:11 Misery7100