Closed danielHype closed 4 years ago
Thanks firebase team for creating such a wonderful software and for making it open source & free for simple usage.
I am facing a similar CORS issue on Chrome 84, Safari and Firefox with 7.9.1, 7.9.3, 7.9.3 and 7.17.2 versions of firebase app, and storage on both localhost and on a website deployed via Google app script.
I enabled CORS on my storage bucket as shared in https://stackoverflow.com/a/37765371/1585523. However it was mentioned in https://cloud.google.com/storage/docs/cross-origin#client-side-support that such a thing is not necessary.
@danielHype Can you confirm that you are indeed using version 7.12.2 and not 7.17.2? We made changes in our networking stack in version 7.17.2 and I would like to figure out if this is a possible regression.
From the logs it looks like you are using the latest version 7.17.2. Do you see similar behavior in version 7.17.1? We made changes in our networking stack in version 7.17.2 and I would like to figure out if this is a possible regression. So far, I have not been able to see this issue locally.
@danielHype I talked to the maintainer of the WebChannel library about this issue. It turns out that we need a couple more things to look at this. Can you send us the URL and the request/response headers for the failed requests as recorded by the Chrome debugger (specifically the URL and Origin header for the initial POST handshake request)? Thanks!
Hey @danielHype. We need more information to resolve this issue but there hasn't been an update in 5 weekdays. I'm marking the issue as stale and if there are no new updates in the next 5 days I will close it automatically.
If you have more information that will help us get to the bottom of this, just add a comment!
i have the same issue...please solve this isse..getting this error for calling get method in documentRef..please google solve this
Hey @danielHype. We need more information to resolve this issue but there hasn't been an update in 5 weekdays. I'm marking the issue as stale and if there are no new updates in the next 5 days I will close it automatically.
If you have more information that will help us get to the bottom of this, just add a comment!
I have same error 7.19.1 React Native expo SDK 38
var firebaseConfig = { apiKey: "mykey", authDomain: "react-native-chat-8b961.firebaseapp.com", databaseURL: "https://react-native-chat-8b961.firebaseio.com", projectId: "react-native-chat-8b961", storageBucket: "react-native-chat-8b961.appspot.com", messagingSenderId: "366682905206", appId: "1:366682905206:web:537cc31fdad7d4be6c1d57", measurementId: "G-8PRQ8YNTH3", };
[2020-08-29T02:09:26.941Z] @firebase/firestore:, Firestore (7.19.1): Could not reach Cloud Firestore backend. Connection failed 1 times. Most recent error: FirebaseError: [code=not-found]: The project react-native-chat-8b961 does not exist or it does not contain an active Cloud Datastore or Cloud Firestore database. Please visit http://console.cloud.google.com to create a project or https://console.cloud.google.com/datastore/setup?project=react-native-chat-8b961 to add a Cloud Datastore or Cloud Firestore database. Note that Cloud Datastore or Cloud Firestore always have an associated App Engine app and this app must not be disabled. 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.
Even though the original issue opener hasn't responded, I see other users have the issue and I think the Firestore team still requires this additional information to help solve the problem:
@danielHype I talked to the maintainer of the WebChannel library about this issue. It turns out that we need a couple more things to look at this. Can you send us the URL and the request/response headers for the failed requests as recorded by the Chrome debugger (specifically the URL and Origin header for the initial POST handshake request)? Thanks!
Can any of the other users having this problem provide this info? I believe they need the actual POST request details, not just error logs.
@hsubox76 Here is my http dump.
Request origin: file:// sec-fetch-dest: empty x-goog-api-client: gl-js/ fire/7.8.1 user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) ReactNativeDebugger/0.11.3 Chrome/80.0.3987.165 Electron/8.2.5 Safari/537.36 content-type: application/x-www-form-urlencoded
count=1&ofs=0&req0_data=%257B%2522database%2522%253A%2522projects%252Freact-native-chat-8b961%252Fdatabases%252F%28default%29%2522%252C%2522addTarget%2522%253A%257B%2522query%2522%253A%257B%2522structuredQuery%2522%253A%257B%2522from%2522%253A%255B%257B%2522collectionId%2522%253A%2522chats%2522%257D%255D%252C%2522orderBy%2522%253A%255B%257B%2522field%2522%253A%257B%2522fieldPath%2522%253A%2522name%2522%257D%252C%2522direction%2522%253A%2522ASCENDING%2522%257D%255D%257D%252C%2522parent%2522%253A%2522projects%252Freact-native-chat-8b961%252Fdatabases%252F%28default%29%252Fdocuments%2522%257D%252C%2522targetId%2522%253A2%257D%257D
Response :status: 200 date: Tue, 01 Sep 2020 12:06:24 GMT content-encoding: gzip x-content-type-options: nosniff server: ESF x-frame-options: SAMEORIGIN content-type: text/plain; charset=utf-8 cache-control: private x-client-wire-protocol: h2 x-http-session-id: HKkOstWt4zadr9UdM8ZWKV3ArtDhKEHV alt-svc: h3-29=":443"; ma=2592000,h3-27=":443"; ma=2592000,h3-T051=":443"; ma=2592000,h3-T050=":443"; ma=2592000,h3-Q050=":443"; ma=2592000,h3-Q046=":443"; ma=2592000,h3-Q043=":443"; ma=2592000,quic=":443"; ma=2592000; v="46,43" content-length: 71 x-xss-protection: 0
51 [[0,["c","FI0waj_NK_Ntfq2dpKr3jQ","",8,12,30000]]]
In your case (unlike the original post), I noticed the error message contained this text:
The project react-native-chat-8b961 does not exist or it does not contain an active Cloud Datastore or Cloud Firestore database. Please visit http://console.cloud.google.com to create a project or https://console.cloud.google.com/datastore/setup?project=react-native-chat-8b961 to add a Cloud Datastore or Cloud Firestore database.
Just wanted to double check, did you create a Firestore database in the console for this project?
@hsubox76 I just found out that "Realtime" and "Firestore" are different things. I created "Realtime" and tried to access "Firestore". Thank you for your double check :)
Glad that helped! If anyone is still having the initial problem in this issue, can you please provide the details @schmidt-sebastian asked for above? I can re-quote:
@danielHype I talked to the maintainer of the WebChannel library about this issue. It turns out that we need a couple more things to look at this. Can you send us the URL and the request/response headers for the failed requests as recorded by the Chrome debugger (specifically the URL and Origin header for the initial POST handshake request)? Thanks!
If not, I'll leave the "needs-info" tag up and let the bot auto-close the issue if there are no responses after a certain amount of time.
Hey @danielHype. We need more information to resolve this issue but there hasn't been an update in 5 weekdays. I'm marking the issue as stale and if there are no new updates in the next 5 days I will close it automatically.
If you have more information that will help us get to the bottom of this, just add a comment!
Since there haven't been any recent updates here, I am going to close this issue.
@danielHype if you're still experiencing this problem and want to continue the discussion just leave a comment here and we are happy to re-open this.
[REQUIRED] Describe your environment
[REQUIRED] Describe the problem
Steps to reproduce:
Since a few days we are getting an error while trying to communicate via Firebase/ Firestore. However, the issue only comes in our localhost, as soon as we build and deploy on our server everything works fine. Please see the issue getting logged into my console.
Furthermore:
As you can see in the results, I tried different things: At first, forceLongPolling, logging extensive logging and trying different firebase versions. Updating to the newest version, which many people helped, did not help me.
I think code reproduction may work, but should not be needed here as this is probably an easyfix.
Still, googling and putting many hours in did not help for me thus I am seeking help here.
If more information is needed, please inform me and i am very happy to provide more information.
I am not sure if this may be subject to changes made by chrome due to new enforced CORS and cookie policy. As the screenshot suggest, I am having a problem with the CORS Policy. However, if yes, how can I enforce CORS with firebase?
I am not using API Calls, I am using the firebase functions.