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 requests tab in emulator not working with v11.12.0 #5051

Closed
jasonkylefrank opened this issue Sep 30, 2022 · 15 comments · Fixed by #5081
Closed

Firestore requests tab in emulator not working with v11.12.0 #5051

jasonkylefrank opened this issue Sep 30, 2022 · 15 comments · Fixed by #5081
Assignees

Comments

@jasonkylefrank
Copy link

jasonkylefrank commented Sep 30, 2022

Environment info

firebase-tools: v11.12.0

Platform:. Mac

Test case

(1) Create a minimal project that uses Firestore
(2) Instrument your app to work with the emulators, as the docs show
(3) Install the Firebase Tools CLI, then run the emulators with this command:
firebase emulators:start --import=./emulator-data --export-on-exit

(note that the data import and export and optional but I included them since that's what I'm doing).

Steps to reproduce

In the emulator UI, navigate to the Firestore page, then click the Requests tab.

Note: The Firestore page itself is working fine for me, just not the Requests tab.

Expected behavior

The requests tab in the emulator under Firestore to function as expected (instead of saying I need to upgrade the Firebase CLI).

Actual behavior

The requests tab says I need to upgrade the Firebase CLI to the latest version (which I have).
image

As requested, I ran the emulators with the --debug flag to check those logs. Here's some of the outputs that printed out multiple times:

INFO: Detected non-HTTP/2 connection.
 {"metadata":{"emulator":{"name":"firestore"},"message":"Sep 30, 2022 12:13:58 PM io.gapi.emulators.netty.HttpVersionRoutingHandler channelRead\nINFO: Detected non-HTTP/2 connection.\n"}}
[2022-09-30T16:13:58.742Z] Sep 30, 2022 12:13:58 PM com.google.cloud.datastore.emulator.firestore.webchannel.FirestoreV1WebChannelAdapter$FirestoreListenHandler onClose
INFO: channel closed
 {"metadata":{"emulator":{"name":"firestore"},"message":"Sep 30, 2022 12:13:58 PM com.google.cloud.datastore.emulator.firestore.webchannel.FirestoreV1WebChannelAdapter$FirestoreListenHandler onClose\nINFO: channel closed\n"}}
[2022-09-30T16:14:00.377Z] Sep 30, 2022 12:14:00 PM io.gapi.emulators.netty.HttpVersionRoutingHandler channelRead
INFO: Detected non-HTTP/2 connection.
 {"metadata":{"emulator":{"name":"firestore"},"message":"Sep 30, 2022 12:14:00 PM io.gapi.emulators.netty.HttpVersionRoutingHandler channelRead\nINFO: Detected non-HTTP/2 connection.\n"}}
[2022-09-30T16:14:00.380Z] Sep 30, 2022 12:14:00 PM io.gapi.emulators.netty.NotFoundHandler handleRequest
INFO: Unknown request URI: /ws/discovery
 {"metadata":{"emulator":{"name":"firestore"},"message":"Sep 30, 2022 12:14:00 PM io.gapi.emulators.netty.NotFoundHandler handleRequest\nINFO: Unknown request URI: /ws/discovery\n"}}
[2022-09-30T16:14:00.391Z] Sep 30, 2022 12:14:00 PM io.gapi.emulators.netty.HttpVersionRoutingHandler channelRead
@radvansky-tomas
Copy link

same here

@gildotdev
Copy link

Same

@gildotdev
Copy link

I tried downgrading and this is all I am getting.

localhost_4000_firestore_requests(1080p)

@christhompsongoogle
Copy link
Contributor

christhompsongoogle commented Oct 4, 2022

My macbook was still on v11.9 so I ran the following:

sudo npm install -g firebase-tools

I see it updated the latest 1.15 version of firestore (expected) as we updated that in #4925.

The firestore emulator seems to be working as expected for me, so I'm not able to easily repro this.

Questions:
if you check the contents of your ~/.cache/firebase/emulators folder - do you see cloud-firestore-emulator-v1.15.1.jar or something different?
If you still have a cloud-firestore v14, does running npm install -g firebase-tools with sudo fix the issue?
What host/port are you using for firestore? (included in firebase.json, else it's "localhost" by default)
If you set a firestore.websocketPort in firebase.json does that help the issue?

@gildotdev
Copy link

I use the emulator in a Docker container. I recently added this to firebase.json to try and make sure I have a consistent port to expose:

    "firestore": {
      "port": 8888,
      "host": "0.0.0.0",
      "websocketPort": 5005
    }

This is the version of the jar file: cloud-firestore-emulator-v1.15.1.jar

Here is the error showing up constantly in the debug log

INFO: Unknown request URI: /ws/discovery

firebase-emulator-1 |  {"metadata":{"emulator":{"name":"firestore"},"message":"Oct 04, 2022 1:30:11 AM io.gapi.emulators.netty.NotFoundHandler handleRequest\nINFO: Unknown request URI: /ws/discovery\n"}}

@cchen-ownit
Copy link

Same issue occurring with v11.13

@zigav
Copy link

zigav commented Oct 6, 2022

With v11.14 as well

Same issue occurring with v11.13

@isanecat
Copy link

isanecat commented Oct 6, 2022

same

@nicholasstephan
Copy link

Same here with 11.13.0

@christhompsongoogle
Copy link
Contributor

We're still not able to reproduce the issue after some investigation. A detailed repro case would help us identify the issue and apply a fix ASAP.

Thanks everyone.

@yuchenshi
Copy link
Member

Fixed in CLI v11.14.1. Thanks everyone for the help!

@shun77768
Copy link

Hello!
I got still the same error even in CLI v11.14.1.
Oct 08, 2022 12:39:41 AM io.gapi.emulators.netty.HttpVersionRoutingHandler channelRead INFO: Detected non-HTTP/2 connection. Oct 08, 2022 12:39:41 AM io.gapi.emulators.netty.NotFoundHandler handleRequest INFO: Unknown request URI: /ws/discovery

@shun77768
Copy link

shun77768 commented Oct 7, 2022

And I got this using SwiftUI in xcode
[connection] nw_socket_handle_socket_event [C32.1:2] Socket SO_ERROR [61: Connection refused]
Sometimes I also got [Firebase/Firestore] WatchStream Stream error: 'Unknown: An internal error has occurred, print and inspect the error details for more information.

@yuchenshi
Copy link
Member

@shun77768 The /ws/discovery error message is a known log spam that we'll clean up shortly, but we believe that should not affect your ability to connect to the Firestore emulator since v11.14.1. If you're having trouble reaching the Firestore emulator from your app, that is an unrelated issue -- please open a new issue with the details and we can help you there.

@yuchenshi
Copy link
Member

FYI, we've got rid of the log message too in v11.14.2. Happy emulating!

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

Successfully merging a pull request may close this issue.