Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Firestore 426 Upgrade Required error #5901

Closed
elbro opened this issue May 26, 2023 · 9 comments
Closed

Firestore 426 Upgrade Required error #5901

elbro opened this issue May 26, 2023 · 9 comments

Comments

@elbro
Copy link

elbro commented May 26, 2023

[REQUIRED] Environment info

firebase-tools: 12.21

Platform: Ubuntu 22.04 (Via WSL2)

[REQUIRED] Test case

Node 18
openjdk 11.0.19

Same exact codebase / install steps works fine in Ubuntu 20, but not on this machine with Ubuntu 22 and all the same versions.

[REQUIRED] Steps to reproduce

firebase emulators:start

appears to connect correctly.
image

[REQUIRED] Expected behavior

Should connect and work as usual

[REQUIRED] Actual behavior

image

@christhompsongoogle
Copy link
Contributor

Hi elbro, can you share more information? The full HTTP URL that's failing, how to reproduce it, some code snippets if possible.

What version of firebase are you using?
HTTP 2.0 may yield better results also

@christhompsongoogle christhompsongoogle self-assigned this May 30, 2023
@christhompsongoogle christhompsongoogle added the Needs: Author Feedback Issues awaiting author feedback label Jun 6, 2023
@google-oss-bot
Copy link
Contributor

Hey @elbro. We need more information to resolve this issue but there hasn't been an update in 7 weekdays. I'm marking the issue as stale and if there are no new updates in the next 3 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!

@google-oss-bot
Copy link
Contributor

Since there haven't been any recent updates here, I am going to close this issue.

@elbro 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.

@elbro
Copy link
Author

elbro commented Jul 6, 2023

Getting this again;

firebase --version: 12.4.2

npm package: "firebase": "^9.23.0"

it downloaded the latest version of the emulator .jar, but not sure how to verify this one.

project is a nextjs react app, setup;

const firestore = getFirestore(app)
connectFirestoreEmulator(firestore, 'localhost', 9100)

in console i see this request returning 426


response headers:
    HTTP/1.1 426 Upgrade Required
    Server: WebSocket++/0.8.2

how can I force HTTP 2?

firebase.json:

    "auth": {
      "port": 9099
    },
    "functions": {
      "port": 9101
    },
    "firestore": {
      "port": 9100
    },
    "ui": {
      "enabled": true,
      "port": 8000
    },
    "singleProjectMode": true
  },```

@christhompsongoogle
Copy link
Contributor

christhompsongoogle commented Jul 10, 2023

In the original report it looks like listCollectionIds is being called - is this from the Emulator UI? Or does the connectFirestoreEmulator fail immediately?

If we can reproduce the problem on our end it'll make fixing it much faster.

@google-oss-bot
Copy link
Contributor

Hey @elbro. We need more information to resolve this issue but there hasn't been an update in 7 weekdays. I'm marking the issue as stale and if there are no new updates in the next 3 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!

@google-oss-bot
Copy link
Contributor

Since there haven't been any recent updates here, I am going to close this issue.

@elbro 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.

@elbro
Copy link
Author

elbro commented Jul 24, 2023

listCollectionIds

In the original report it looks like listCollectionIds is being called - is this from the Emulator UI? Or does the connectFirestoreEmulator fail immediately?

If we can reproduce the problem on our end it'll make fixing it much faster.

Hey, it's failing immediately; in console i see immediate 426 POST errors. Can't figure out why it's not connecting to the emulator - how can I troubleshoot that?

Going to the emulator ui errors immediately on the firestore page;
image

image

@elbro
Copy link
Author

elbro commented Jul 24, 2023

Completely ignoring my app, I see Access to fetch at 'http://127.0.0.1:9100/v1/projects/swg-baas/databases/(default)/documents:listCollectionIds' from origin 'http://localhost:8000' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled. error visiting the emulator UI.

edit: pretty sure it's related to this firebase/firebase-tools-ui#332

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants