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

Connection WebChannel transport errored when querying more than 9998 rows... #5197

Open
tnoetzel opened this issue Oct 31, 2022 · 33 comments
Open

Comments

@tnoetzel
Copy link

[REQUIRED] Environment info

firebase-tools: 11.15.0

Platform: macOS 13.0

[REQUIRED] Test case

Since upgrading to Ventura, using firebase web @firebase/firestore: Firestore (8.10.1), I'm getting errors when trying to listen to ~15K rows of data. The backup I'm using is only 18.3MB of data (I have 64GB of ram), so I don't think this is a memory issue.

With some testing, this seems to start happening when trying to pull any more than 9998 rows.

In the console, I'm seeing @firebase/firestore: Firestore (8.10.1): Connection WebChannel transport errored and numerous 400 request errors.

In the logs (firestore-debug.log) shows:

WARNING: Failed to send a new message due to too many pending messagings in the back channel (10001). May need enable flow control.
Oct 31, 2022 4:48:33 PM com.google.net.webchannel.server.v8.ChannelInternalImpl handle
WARNING: Server fails to send the message, abort the channel!
Oct 31, 2022 4:48:33 PM com.google.cloud.datastore.emulator.firestore.webchannel.FirestoreV1WebChannelAdapter$FirestoreListenHandler onError
WARNING: [ERROR] NETWORK_ERROR ()

[REQUIRED] Steps to reproduce

These both result in the console error :

 firestore.collection("bookings").onSnapshot((querySnapshot) => {
 ...
 })
firestore.collection("bookings").get();

Adding .limit(9998) seems to prevent these errors.

[REQUIRED] Expected behavior

Data should query without error.

[REQUIRED] Actual behavior

Picked up JAVA_TOOL_OPTIONS: -Xmx32g
Oct 31, 2022 4:48:15 PM com.google.cloud.datastore.emulator.firestore.websocket.WebSocketServer start
INFO: Started WebSocket server on ws:https://localhost:53469
API endpoint: http:https://localhost:8080
If you are using a library that supports the FIRESTORE_EMULATOR_HOST environment variable, run:

   export FIRESTORE_EMULATOR_HOST=localhost:8080

Dev App Server is now running.

Oct 31, 2022 4:48:24 PM io.gapi.emulators.netty.HttpVersionRoutingHandler channelRead
INFO: Detected non-HTTP/2 connection.
Oct 31, 2022 4:48:24 PM io.gapi.emulators.netty.HttpVersionRoutingHandler channelRead
INFO: Detected HTTP/2 connection.
Oct 31, 2022 4:48:25 PM io.gapi.emulators.netty.HttpVersionRoutingHandler channelRead
INFO: Detected non-HTTP/2 connection.
Oct 31, 2022 4:48:25 PM io.gapi.emulators.netty.HttpVersionRoutingHandler channelRead
INFO: Detected non-HTTP/2 connection.
Oct 31, 2022 4:48:25 PM io.gapi.emulators.netty.HttpVersionRoutingHandler channelRead
INFO: Detected non-HTTP/2 connection.
Oct 31, 2022 4:48:25 PM io.gapi.emulators.netty.HttpVersionRoutingHandler channelRead
INFO: Detected non-HTTP/2 connection.
Oct 31, 2022 4:48:25 PM io.gapi.emulators.netty.HttpVersionRoutingHandler channelRead
INFO: Detected non-HTTP/2 connection.
Oct 31, 2022 4:48:25 PM io.gapi.emulators.netty.HttpVersionRoutingHandler channelRead
INFO: Detected non-HTTP/2 connection.
Oct 31, 2022 4:48:25 PM io.gapi.emulators.netty.HttpVersionRoutingHandler channelRead
INFO: Detected non-HTTP/2 connection.
Oct 31, 2022 4:48:31 PM io.gapi.emulators.netty.HttpVersionRoutingHandler channelRead
INFO: Detected non-HTTP/2 connection.
Oct 31, 2022 4:48:31 PM com.google.cloud.datastore.emulator.impl.context.EmulatorAuthorization warnAboutSecuredJwt
WARNING: expected an unsecured JWT, the emulator does not validate JWTs and IS NOT SECURE
Oct 31, 2022 4:48:31 PM io.gapi.emulators.netty.HttpVersionRoutingHandler channelRead
INFO: Detected non-HTTP/2 connection.
Oct 31, 2022 4:48:31 PM io.gapi.emulators.netty.HttpVersionRoutingHandler channelRead
INFO: Detected non-HTTP/2 connection.
Oct 31, 2022 4:48:32 PM io.gapi.emulators.netty.HttpVersionRoutingHandler channelRead
INFO: Detected non-HTTP/2 connection.
Oct 31, 2022 4:48:32 PM io.gapi.emulators.netty.HttpVersionRoutingHandler channelRead
INFO: Detected non-HTTP/2 connection.
Oct 31, 2022 4:48:33 PM com.google.net.webchannel.server.v8.BackChannel add
WARNING: Failed to send a new message due to too many pending messagings in the back channel (10001). May need enable flow control.
Oct 31, 2022 4:48:33 PM com.google.net.webchannel.server.v8.ChannelInternalImpl handle
WARNING: Server fails to send the message, abort the channel!
Oct 31, 2022 4:48:33 PM com.google.cloud.datastore.emulator.firestore.webchannel.FirestoreV1WebChannelAdapter$FirestoreListenHandler onError
WARNING: [ERROR] NETWORK_ERROR ()
Oct 31, 2022 4:48:33 PM com.google.net.webchannel.server.v8.BackChannel add
WARNING: Failed to send a new message due to too many pending messagings in the back channel (10001). May need enable flow control.
Oct 31, 2022 4:48:33 PM com.google.net.webchannel.server.v8.ChannelInternalImpl handle
WARNING: Server fails to send the message, abort the channel!
Oct 31, 2022 4:48:33 PM com.google.cloud.datastore.emulator.firestore.webchannel.FirestoreV1WebChannelAdapter$FirestoreListenHandler onError
WARNING: [ERROR] NETWORK_ERROR ()
Oct 31, 2022 4:48:33 PM com.google.net.webchannel.server.v8.BackChannel add
WARNING: Failed to send a new message due to too many pending messagings in the back channel (10001). May need enable flow control.
Oct 31, 2022 4:48:33 PM com.google.net.webchannel.server.v8.ChannelInternalImpl handle
WARNING: Server fails to send the message, abort the channel!
Oct 31, 2022 4:48:33 PM com.google.cloud.datastore.emulator.firestore.webchannel.FirestoreV1WebChannelAdapter$FirestoreListenHandler onError
WARNING: [ERROR] NETWORK_ERROR ()

... etc...

Or, from the --debug flag:

[2022-10-31T21:10:13.773Z] Picked up JAVA_TOOL_OPTIONS: -Xmx32g

[2022-10-31T21:10:13.790Z] openjdk version "19" 2022-09-20

[2022-10-31T21:10:13.790Z] OpenJDK Runtime Environment Homebrew (build 19)
OpenJDK 64-Bit Server VM Homebrew (build 19, mixed mode, sharing)

[2022-10-31T21:10:13.793Z] Parsed Java major version: 19
i  emulators: Starting emulators: firestore {"metadata":{"emulator":{"name":"hub"},"message":"Starting emulators: firestore"}}
[2022-10-31T21:10:13.799Z] [hub] writing locator at /var/folders/6t/yq0mrc014msg9gbvc5_sztg80000gn/T/hub-grail-talent.json
i  firestore: Detected non-emulator Firestore export at /Users/tim/GitHub/consulting/Strudel/grail-app/functions/db_backup {"metadata":{"emulator":{"name":"firestore"},"message":"Detected non-emulator Firestore export at /Users/tim/GitHub/consulting/Strudel/grail-app/functions/db_backup"}}
i  firestore: Importing data from /Users/tim/GitHub/consulting/Strudel/grail-app/functions/db_backup/2022-10-30.overall_export_metadata {"metadata":{"emulator":{"name":"firestore"},"message":"Importing data from /Users/tim/GitHub/consulting/Strudel/grail-app/functions/db_backup/2022-10-30.overall_export_metadata"}}
[2022-10-31T21:10:13.804Z] Ignoring unsupported arg: projectId {"metadata":{"emulator":{"name":"firestore"},"message":"Ignoring unsupported arg: projectId"}}
[2022-10-31T21:10:13.804Z] Ignoring unsupported arg: auto_download {"metadata":{"emulator":{"name":"firestore"},"message":"Ignoring unsupported arg: auto_download"}}
[2022-10-31T21:10:13.804Z] Starting Firestore Emulator with command {"binary":"java","args":["-Dgoogle.cloud_firestore.debug_log_level=FINE","-Duser.language=en","-jar","/Users/tim/.cache/firebase/emulators/cloud-firestore-emulator-v1.14.3.jar","--host","localhost","--port",8080,"--seed_from_export","/Users/tim/GitHub/consulting/Strudel/grail-app/functions/db_backup/2022-10-30.overall_export_metadata","--rules","/Users/tim/GitHub/consulting/Strudel/grail-app/firestore.rules"],"optionalArgs":["port","webchannel_port","host","rules","functions_emulator","seed_from_export"],"joinArgs":false} {"metadata":{"emulator":{"name":"firestore"},"message":"Starting Firestore Emulator with command {\"binary\":\"java\",\"args\":[\"-Dgoogle.cloud_firestore.debug_log_level=FINE\",\"-Duser.language=en\",\"-jar\",\"/Users/tim/.cache/firebase/emulators/cloud-firestore-emulator-v1.14.3.jar\",\"--host\",\"localhost\",\"--port\",8080,\"--seed_from_export\",\"/Users/tim/GitHub/consulting/Strudel/grail-app/functions/db_backup/2022-10-30.overall_export_metadata\",\"--rules\",\"/Users/tim/GitHub/consulting/Strudel/grail-app/firestore.rules\"],\"optionalArgs\":[\"port\",\"webchannel_port\",\"host\",\"rules\",\"functions_emulator\",\"seed_from_export\"],\"joinArgs\":false}"}}
i  firestore: Firestore Emulator logging to firestore-debug.log {"metadata":{"emulator":{"name":"firestore"},"message":"Firestore Emulator logging to \u001b[1mfirestore-debug.log\u001b[22m"}}
[2022-10-31T21:10:13.815Z] Picked up JAVA_TOOL_OPTIONS: -Xmx32g
 {"metadata":{"emulator":{"name":"firestore"},"message":"Picked up JAVA_TOOL_OPTIONS: -Xmx32g\n"}}
[2022-10-31T21:10:19.502Z] Oct 31, 2022 5:10:19 PM com.google.cloud.datastore.emulator.firestore.websocket.WebSocketServer start
INFO: Started WebSocket server on ws:https://localhost:59979
 {"metadata":{"emulator":{"name":"firestore"},"message":"Oct 31, 2022 5:10:19 PM com.google.cloud.datastore.emulator.firestore.websocket.WebSocketServer start\nINFO: Started WebSocket server on ws:https://localhost:59979\n"}}
[2022-10-31T21:10:19.514Z] API endpoint: http:https://localhost:8080 {"metadata":{"emulator":{"name":"firestore"},"message":"API endpoint: http:https://localhost:8080"}}
[2022-10-31T21:10:19.514Z] 
If you are using a library that supports the FIRESTORE_EMULATOR_HOST environment variable, run:

   export FIRESTORE_EMULATOR_HOST=localhost:8080

Dev App Server is now running.

 {"metadata":{"emulator":{"name":"firestore"},"message":"\nIf you are using a library that supports the FIRESTORE_EMULATOR_HOST environment variable, run:\n\n   export FIRESTORE_EMULATOR_HOST=localhost:8080\n\nDev App Server is now running.\n\n"}}
[2022-10-31T21:10:19.627Z] Ignoring unsupported arg: auto_download {"metadata":{"emulator":{"name":"ui"},"message":"Ignoring unsupported arg: auto_download"}}
[2022-10-31T21:10:19.627Z] Ignoring unsupported arg: port {"metadata":{"emulator":{"name":"ui"},"message":"Ignoring unsupported arg: port"}}
[2022-10-31T21:10:19.627Z] Starting Emulator UI with command {"binary":"node","args":["/Users/tim/.cache/firebase/emulators/ui-v1.7.0/server.bundle.js"],"optionalArgs":[],"joinArgs":false} {"metadata":{"emulator":{"name":"ui"},"message":"Starting Emulator UI with command {\"binary\":\"node\",\"args\":[\"/Users/tim/.cache/firebase/emulators/ui-v1.7.0/server.bundle.js\"],\"optionalArgs\":[],\"joinArgs\":false}"}}
i  ui: Emulator UI logging to ui-debug.log {"metadata":{"emulator":{"name":"ui"},"message":"Emulator UI logging to \u001b[1mui-debug.log\u001b[22m"}}
[2022-10-31T21:10:19.691Z] Web / API server started at localhost:4000
 {"metadata":{"emulator":{"name":"ui"},"message":"Web / API server started at localhost:4000\n"}}

┌─────────────────────────────────────────────────────────────┐
│ ✔  All emulators ready! It is now safe to connect your app. │
│ i  View Emulator UI at http:https://localhost:4000                │
└─────────────────────────────────────────────────────────────┘

┌───────────┬────────────────┬─────────────────────────────────┐
│ Emulator  │ Host:Port      │ View in Emulator UI             │
├───────────┼────────────────┼─────────────────────────────────┤
│ Firestore │ localhost:8080 │ http:https://localhost:4000/firestore │
└───────────┴────────────────┴─────────────────────────────────┘
  Emulator Hub running at localhost:4400
  Other reserved ports: 4500

Issues? Report them at https://github.com/firebase/firebase-tools/issues and attach the *-debug.log files.
 
[2022-10-31T21:10:21.377Z] Oct 31, 2022 5:10:21 PM io.gapi.emulators.netty.HttpVersionRoutingHandler channelRead
INFO: Detected non-HTTP/2 connection.
 {"metadata":{"emulator":{"name":"firestore"},"message":"Oct 31, 2022 5:10:21 PM io.gapi.emulators.netty.HttpVersionRoutingHandler channelRead\nINFO: Detected non-HTTP/2 connection.\n"}}
[2022-10-31T21:10:22.666Z] Oct 31, 2022 5:10:22 PM com.google.cloud.datastore.emulator.impl.context.EmulatorAuthorization warnAboutSecuredJwt
WARNING: expected an unsecured JWT, the emulator does not validate JWTs and IS NOT SECURE
 {"metadata":{"emulator":{"name":"firestore"},"message":"Oct 31, 2022 5:10:22 PM com.google.cloud.datastore.emulator.impl.context.EmulatorAuthorization warnAboutSecuredJwt\nWARNING: expected an unsecured JWT, the emulator does not validate JWTs and IS NOT SECURE\n"}}
[2022-10-31T21:10:23.497Z] Oct 31, 2022 5:10:23 PM com.google.net.webchannel.server.v8.BackChannel add
WARNING: Failed to send a new message due to too many pending messagings in the back channel (10001). May need enable flow control.
 {"metadata":{"emulator":{"name":"firestore"},"message":"Oct 31, 2022 5:10:23 PM com.google.net.webchannel.server.v8.BackChannel add\nWARNING: Failed to send a new message due to too many pending messagings in the back channel (10001). May need enable flow control.\n"}}
[2022-10-31T21:10:23.498Z] Oct 31, 2022 5:10:23 PM com.google.net.webchannel.server.v8.ChannelInternalImpl handle
WARNING: Server fails to send the message, abort the channel!
Oct 31, 2022 5:10:23 PM com.google.cloud.datastore.emulator.firestore.webchannel.FirestoreV1WebChannelAdapter$FirestoreListenHandler onError
WARNING: [ERROR] NETWORK_ERROR ()
 {"metadata":{"emulator":{"name":"firestore"},"message":"Oct 31, 2022 5:10:23 PM com.google.net.webchannel.server.v8.ChannelInternalImpl handle\nWARNING: Server fails to send the message, abort the channel!\nOct 31, 2022 5:10:23 PM com.google.cloud.datastore.emulator.firestore.webchannel.FirestoreV1WebChannelAdapter$FirestoreListenHandler onError\nWARNING: [ERROR] NETWORK_ERROR ()\n"}}
[2022-10-31T21:10:23.498Z] Oct 31, 2022 5:10:23 PM com.google.net.webchannel.server.v8.BackChannel add
WARNING: Failed to send a new message due to too many pending messagings in the back channel (10001). May need enable flow control.
Oct 31, 2022 5:10:23 PM com.google.net.webchannel.server.v8.ChannelInternalImpl handle
WARNING: Server fails to send the message, abort the channel!
Oct 31, 2022 5:10:23 PM com.google.cloud.datastore.emulator.firestore.webchannel.FirestoreV1WebChannelAdapter$FirestoreListenHandler onError
WARNING: [ERROR] NETWORK_ERROR ()
 {"metadata":{"emulator":{"name":"firestore"},"message":"Oct 31, 2022 5:10:23 PM com.google.net.webchannel.server.v8.BackChannel add\nWARNING: Failed to send a new message due to too many pending messagings in the back channel (10001). May need enable flow control.\nOct 31, 2022 5:10:23 PM com.google.net.webchannel.server.v8.ChannelInternalImpl handle\nWARNING: Server fails to send the message, abort the channel!\nOct 31, 2022 5:10:23 PM com.google.cloud.datastore.emulator.firestore.webchannel.FirestoreV1WebChannelAdapter$FirestoreListenHandler onError\nWARNING: [ERROR] NETWORK_ERROR ()\n"}}
[2022-10-31T21:10:23.498Z] Oct 31, 2022 5:10:23 PM com.google.net.webchannel.server.v8.BackChannel add
WARNING: Failed to send a new message due to too many pending messagings in the back channel (10001). May need enable flow control.
 {"metadata":{"emulator":{"name":"firestore"},"message":"Oct 31, 2022 5:10:23 PM com.google.net.webchannel.server.v8.BackChannel add\nWARNING: Failed to send a new message due to too many pending messagings in the back channel (10001). May need enable flow control.\n"}}
[2022-10-31T21:10:23.498Z] Oct 31, 2022 5:10:23 PM com.google.net.webchannel.server.v8.ChannelInternalImpl handle
WARNING: Server fails to send the message, abort the channel!
Oct 31, 2022 5:10:23 PM com.google.cloud.datastore.emulator.firestore.webchannel.FirestoreV1WebChannelAdapter$FirestoreListenHandler onError
WARNING: [ERROR] NETWORK_ERROR ()
 {"metadata":{"emulator":{"name":"firestore"},"message":"Oct 31, 2022 5:10:23 PM com.google.net.webchannel.server.v8.ChannelInternalImpl handle\nWARNING: Server fails to send the message, abort the channel!\nOct 31, 2022 5:10:23 PM com.google.cloud.datastore.emulator.firestore.webchannel.FirestoreV1WebChannelAdapter$FirestoreListenHandler onError\nWARNING: [ERROR] NETWORK_ERROR ()\n"}}
[2022-10-31T21:10:23.498Z] Oct 31, 2022 5:10:23 PM com.google.net.webchannel.server.v8.BackChannel add
WARNING: Failed to send a new message due to too many pending messagings in the back channel (10001). May need enable flow control.
Oct 31, 2022 5:10:23 PM com.google.net.webchannel.server.v8.ChannelInternalImpl handle
WARNING: Server fails to send the message, abort the channel!
 {"metadata":{"emulator":{"name":"firestore"},"message":"Oct 31, 2022 5:10:23 PM com.google.net.webchannel.server.v8.BackChannel add\nWARNING: Failed to send a new message due to too many pending messagings in the back channel (10001). May need enable flow control.\nOct 31, 2022 5:10:23 PM com.google.net.webchannel.server.v8.ChannelInternalImpl handle\nWARNING: Server fails to send the message, abort the channel!\n"}}
[2022-10-31T21:10:23.498Z] Oct 31, 2022 5:10:23 PM com.google.cloud.datastore.emulator.firestore.webchannel.FirestoreV1WebChannelAdapter$FirestoreListenHandler onError
WARNING: [ERROR] NETWORK_ERROR ()
Oct 31, 2022 5:10:23 PM com.google.net.webchannel.server.v8.BackChannel add
WARNING: Failed to send a new message due to too many pending messagings in the back channel (10001). May need enable flow control.
 {"metadata":{"emulator":{"name":"firestore"},"message":"Oct 31, 2022 5:10:23 PM com.google.cloud.datastore.emulator.firestore.webchannel.FirestoreV1WebChannelAdapter$FirestoreListenHandler onError\nWARNING: [ERROR] NETWORK_ERROR ()\nOct 31, 2022 5:10:23 PM com.google.net.webchannel.server.v8.BackChannel add\nWARNING: Failed to send a new message due to too many pending messagings in the back channel (10001). May need enable flow control.\n"}}
[2022-10-31T21:10:23.498Z] Oct 31, 2022 5:10:23 PM com.google.net.webchannel.server.v8.ChannelInternalImpl handle
WARNING: Server fails to send the message, abort the channel!
 {"metadata":{"emulator":{"name":"firestore"},"message":"Oct 31, 2022 5:10:23 PM com.google.net.webchannel.server.v8.ChannelInternalImpl handle\nWARNING: Server fails to send the message, abort the channel!\n"}}
[2022-10-31T21:10:23.499Z] Oct 31, 2022 5:10:23 PM com.google.cloud.datastore.emulator.firestore.webchannel.FirestoreV1WebChannelAdapter$FirestoreListenHandler onError
WARNING: [ERROR] NETWORK_ERROR ()
 {"metadata":{"emulator":{"name":"firestore"},"message":"Oct 31, 2022 5:10:23 PM com.google.cloud.datastore.emulator.firestore.webchannel.FirestoreV1WebChannelAdapter$FirestoreListenHandler onError\nWARNING: [ERROR] NETWORK_ERROR ()\n"}}
[2022-10-31T21:10:23.499Z] Oct 31, 2022 5:10:23 PM io.gapi.emulators.netty.HttpVersionRoutingHandler channelRead
INFO: Detected non-HTTP/2 connection.
 {"metadata":{"emulator":{"name":"firestore"},"message":"Oct 31, 2022 5:10:23 PM io.gapi.emulators.netty.HttpVersionRoutingHandler channelRead\nINFO: Detected non-HTTP/2 connection.\n"}}
[2022-10-31T21:10:28.246Z] Oct 31, 2022 5:10:28 PM io.gapi.emulators.netty.HttpVersionRoutingHandler channelRead
INFO: Detected non-HTTP/2 connection.
 {"metadata":{"emulator":{"name":"firestore"},"message":"Oct 31, 2022 5:10:28 PM io.gapi.emulators.netty.HttpVersionRoutingHandler channelRead\nINFO: Detected non-HTTP/2 connection.\n"}}
[2022-10-31T21:10:28.256Z] Oct 31, 2022 5:10:28 PM com.google.cloud.datastore.emulator.impl.context.EmulatorAuthorization warnAboutSecuredJwt
WARNING: expected an unsecured JWT, the emulator does not validate JWTs and IS NOT SECURE
 {"metadata":{"emulator":{"name":"firestore"},"message":"Oct 31, 2022 5:10:28 PM com.google.cloud.datastore.emulator.impl.context.EmulatorAuthorization warnAboutSecuredJwt\nWARNING: expected an unsecured JWT, the emulator does not validate JWTs and IS NOT SECURE\n"}}
[2022-10-31T21:10:28.270Z] Oct 31, 2022 5:10:28 PM io.gapi.emulators.netty.HttpVersionRoutingHandler channelRead
INFO: Detected non-HTTP/2 connection.
 {"metadata":{"emulator":{"name":"firestore"},"message":"Oct 31, 2022 5:10:28 PM io.gapi.emulators.netty.HttpVersionRoutingHandler channelRead\nINFO: Detected non-HTTP/2 connection.\n"}}
[2022-10-31T21:10:28.486Z] Oct 31, 2022 5:10:28 PM io.gapi.emulators.netty.HttpVersionRoutingHandler channelRead
INFO: Detected non-HTTP/2 connection.
 {"metadata":{"emulator":{"name":"firestore"},"message":"Oct 31, 2022 5:10:28 PM io.gapi.emulators.netty.HttpVersionRoutingHandler channelRead\nINFO: Detected non-HTTP/2 connection.\n"}}
[2022-10-31T21:10:28.659Z] Oct 31, 2022 5:10:28 PM io.gapi.emulators.netty.HttpVersionRoutingHandler channelRead
INFO: Detected non-HTTP/2 connection.
 {"metadata":{"emulator":{"name":"firestore"},"message":"Oct 31, 2022 5:10:28 PM io.gapi.emulators.netty.HttpVersionRoutingHandler channelRead\nINFO: Detected non-HTTP/2 connection.\n"}}
[2022-10-31T21:10:28.913Z] Oct 31, 2022 5:10:28 PM io.gapi.emulators.netty.HttpVersionRoutingHandler channelRead
INFO: Detected non-HTTP/2 connection.
 {"metadata":{"emulator":{"name":"firestore"},"message":"Oct 31, 2022 5:10:28 PM io.gapi.emulators.netty.HttpVersionRoutingHandler channelRead\nINFO: Detected non-HTTP/2 connection.\n"}}
[2022-10-31T21:10:29.210Z] Oct 31, 2022 5:10:29 PM com.google.net.webchannel.server.v8.BackChannel add
WARNING: Failed to send a new message due to too many pending messagings in the back channel (10001). May need enable flow control.
 {"metadata":{"emulator":{"name":"firestore"},"message":"Oct 31, 2022 5:10:29 PM com.google.net.webchannel.server.v8.BackChannel add\nWARNING: Failed to send a new message due to too many pending messagings in the back channel (10001). May need enable flow control.\n"}}
[2022-10-31T21:10:29.210Z] Oct 31, 2022 5:10:29 PM com.google.net.webchannel.server.v8.ChannelInternalImpl handle
WARNING: Server fails to send the message, abort the channel!
Oct 31, 2022 5:10:29 PM com.google.cloud.datastore.emulator.firestore.webchannel.FirestoreV1WebChannelAdapter$FirestoreListenHandler onError
WARNING: [ERROR] NETWORK_ERROR ()
 {"metadata":{"emulator":{"name":"firestore"},"message":"Oct 31, 2022 5:10:29 PM com.google.net.webchannel.server.v8.ChannelInternalImpl handle\nWARNING: Server fails to send the message, abort the channel!\nOct 31, 2022 5:10:29 PM com.google.cloud.datastore.emulator.firestore.webchannel.FirestoreV1WebChannelAdapter$FirestoreListenHandler onError\nWARNING: [ERROR] NETWORK_ERROR ()\n"}}
[2022-10-31T21:10:29.508Z] Oct 31, 2022 5:10:29 PM io.gapi.emulators.netty.HttpVersionRoutingHandler channelRead
INFO: Detected non-HTTP/2 connection.
 {"metadata":{"emulator":{"name":"firestore"},"message":"Oct 31, 2022 5:10:29 PM io.gapi.emulators.netty.HttpVersionRoutingHandler channelRead\nINFO: Detected non-HTTP/2 connection.\n"}}
[2022-10-31T21:10:29.517Z] Oct 31, 2022 5:10:29 PM io.gapi.emulators.netty.HttpVersionRoutingHandler channelRead
INFO: Detected non-HTTP/2 connection.
 {"metadata":{"emulator":{"name":"firestore"},"message":"Oct 31, 2022 5:10:29 PM io.gapi.emulators.netty.HttpVersionRoutingHandler channelRead\nINFO: Detected non-HTTP/2 connection.\n"}}
[2022-10-31T21:10:29.622Z] Oct 31, 2022 5:10:29 PM io.gapi.emulators.netty.HttpVersionRoutingHandler channelRead
INFO: Detected non-HTTP/2 connection.
 {"metadata":{"emulator":{"name":"firestore"},"message":"Oct 31, 2022 5:10:29 PM io.gapi.emulators.netty.HttpVersionRoutingHandler channelRead\nINFO: Detected non-HTTP/2 connection.\n"}}
[2022-10-31T21:10:29.637Z] Oct 31, 2022 5:10:29 PM com.google.cloud.datastore.emulator.impl.context.EmulatorAuthorization warnAboutSecuredJwt
WARNING: expected an unsecured JWT, the emulator does not validate JWTs and IS NOT SECURE
 {"metadata":{"emulator":{"name":"firestore"},"message":"Oct 31, 2022 5:10:29 PM com.google.cloud.datastore.emulator.impl.context.EmulatorAuthorization warnAboutSecuredJwt\nWARNING: expected an unsecured JWT, the emulator does not validate JWTs and IS NOT SECURE\n"}}
[2022-10-31T21:10:29.918Z] Oct 31, 2022 5:10:29 PM com.google.net.webchannel.server.v8.BackChannel add
WARNING: Failed to send a new message due to too many pending messagings in the back channel (10001). May need enable flow control.
 {"metadata":{"emulator":{"name":"firestore"},"message":"Oct 31, 2022 5:10:29 PM com.google.net.webchannel.server.v8.BackChannel add\nWARNING: Failed to send a new message due to too many pending messagings in the back channel (10001). May need enable flow control.\n"}}
[2022-10-31T21:10:29.918Z] Oct 31, 2022 5:10:29 PM com.google.net.webchannel.server.v8.ChannelInternalImpl handle
WARNING: Server fails to send the message, abort the channel!
Oct 31, 2022 5:10:29 PM com.google.cloud.datastore.emulator.firestore.webchannel.FirestoreV1WebChannelAdapter$FirestoreListenHandler onError
WARNING: [ERROR] NETWORK_ERROR ()
Oct 31, 2022 5:10:29 PM com.google.net.webchannel.server.v8.BackChannel add
WARNING: Failed to send a new message due to too many pending messagings in the back channel (10001). May need enable flow control.
Oct 31, 2022 5:10:29 PM com.google.net.webchannel.server.v8.ChannelInternalImpl handle
WARNING: Server fails to send the message, abort the channel!
Oct 31, 2022 5:10:29 PM com.google.cloud.datastore.emulator.firestore.webchannel.FirestoreV1WebChannelAdapter$FirestoreListenHandler onError
WARNING: [ERROR] NETWORK_ERROR ()
 {"metadata":{"emulator":{"name":"firestore"},"message":"Oct 31, 2022 5:10:29 PM com.google.net.webchannel.server.v8.ChannelInternalImpl handle\nWARNING: Server fails to send the message, abort the channel!\nOct 31, 2022 5:10:29 PM com.google.cloud.datastore.emulator.firestore.webchannel.FirestoreV1WebChannelAdapter$FirestoreListenHandler onError\nWARNING: [ERROR] NETWORK_ERROR ()\nOct 31, 2022 5:10:29 PM com.google.net.webchannel.server.v8.BackChannel add\nWARNING: Failed to send a new message due to too many pending messagings in the back channel (10001). May need enable flow control.\nOct 31, 2022 5:10:29 PM com.google.net.webchannel.server.v8.ChannelInternalImpl handle\nWARNING: Server fails to send the message, abort the channel!\nOct 31, 2022 5:10:29 PM com.google.cloud.datastore.emulator.firestore.webchannel.FirestoreV1WebChannelAdapter$FirestoreListenHandler onError\nWARNING: [ERROR] NETWORK_ERROR ()\n"}}
[2022-10-31T21:10:29.918Z] Oct 31, 2022 5:10:29 PM com.google.net.webchannel.server.v8.BackChannel add
WARNING: Failed to send a new message due to too many pending messagings in the back channel (10001). May need enable flow control.
Oct 31, 2022 5:10:29 PM com.google.net.webchannel.server.v8.ChannelInternalImpl handle
WARNING: Server fails to send the message, abort the channel!
Oct 31, 2022 5:10:29 PM com.google.cloud.datastore.emulator.firestore.webchannel.FirestoreV1WebChannelAdapter$FirestoreListenHandler onError
WARNING: [ERROR] NETWORK_ERROR ()
 {"metadata":{"emulator":{"name":"firestore"},"message":"Oct 31, 2022 5:10:29 PM com.google.net.webchannel.server.v8.BackChannel add\nWARNING: Failed to send a new message due to too many pending messagings in the back channel (10001). May need enable flow control.\nOct 31, 2022 5:10:29 PM com.google.net.webchannel.server.v8.ChannelInternalImpl handle\nWARNING: Server fails to send the message, abort the channel!\nOct 31, 2022 5:10:29 PM com.google.cloud.datastore.emulator.firestore.webchannel.FirestoreV1WebChannelAdapter$FirestoreListenHandler onError\nWARNING: [ERROR] NETWORK_ERROR ()\n"}}
[2022-10-31T21:10:29.918Z] Oct 31, 2022 5:10:29 PM com.google.net.webchannel.server.v8.BackChannel add
WARNING: Failed to send a new message due to too many pending messagings in the back channel (10001). May need enable flow control.
 {"metadata":{"emulator":{"name":"firestore"},"message":"Oct 31, 2022 5:10:29 PM com.google.net.webchannel.server.v8.BackChannel add\nWARNING: Failed to send a new message due to too many pending messagings in the back channel (10001). May need enable flow control.\n"}}
[2022-10-31T21:10:29.919Z] Oct 31, 2022 5:10:29 PM com.google.net.webchannel.server.v8.ChannelInternalImpl handle
WARNING: Server fails to send the message, abort the channel!
Oct 31, 2022 5:10:29 PM io.gapi.emulators.netty.HttpVersionRoutingHandler channelRead
INFO: Detected non-HTTP/2 connection.
 {"metadata":{"emulator":{"name":"firestore"},"message":"Oct 31, 2022 5:10:29 PM com.google.net.webchannel.server.v8.ChannelInternalImpl handle\nWARNING: Server fails to send the message, abort the channel!\nOct 31, 2022 5:10:29 PM io.gapi.emulators.netty.HttpVersionRoutingHandler channelRead\nINFO: Detected non-HTTP/2 connection.\n"}}
[2022-10-31T21:10:29.919Z] Oct 31, 2022 5:10:29 PM com.google.cloud.datastore.emulator.firestore.webchannel.FirestoreV1WebChannelAdapter$FirestoreListenHandler onError
WARNING: [ERROR] NETWORK_ERROR ()
 {"metadata":{"emulator":{"name":"firestore"},"message":"Oct 31, 2022 5:10:29 PM com.google.cloud.datastore.emulator.firestore.webchannel.FirestoreV1WebChannelAdapter$FirestoreListenHandler onError\nWARNING: [ERROR] NETWORK_ERROR ()\n"}}
[2022-10-31T21:10:29.919Z] Oct 31, 2022 5:10:29 PM com.google.net.webchannel.server.v8.BackChannel add
WARNING: Failed to send a new message due to too many pending messagings in the back channel (10001). May need enable flow control.
Oct 31, 2022 5:10:29 PM com.google.net.webchannel.server.v8.ChannelInternalImpl handle
WARNING: Server fails to send the message, abort the channel!
 {"metadata":{"emulator":{"name":"firestore"},"message":"Oct 31, 2022 5:10:29 PM com.google.net.webchannel.server.v8.BackChannel add\nWARNING: Failed to send a new message due to too many pending messagings in the back channel (10001). May need enable flow control.\nOct 31, 2022 5:10:29 PM com.google.net.webchannel.server.v8.ChannelInternalImpl handle\nWARNING: Server fails to send the message, abort the channel!\n"}}
[2022-10-31T21:10:29.919Z] Oct 31, 2022 5:10:29 PM com.google.cloud.datastore.emulator.firestore.webchannel.FirestoreV1WebChannelAdapter$FirestoreListenHandler onError
WARNING: [ERROR] NETWORK_ERROR ()
 {"metadata":{"emulator":{"name":"firestore"},"message":"Oct 31, 2022 5:10:29 PM com.google.cloud.datastore.emulator.firestore.webchannel.FirestoreV1WebChannelAdapter$FirestoreListenHandler onError\nWARNING: [ERROR] NETWORK_ERROR ()\n"}}
[2022-10-31T21:10:30.461Z] Oct 31, 2022 5:10:30 PM io.gapi.emulators.netty.HttpVersionRoutingHandler channelRead
INFO: Detected non-HTTP/2 connection.
 {"metadata":{"emulator":{"name":"firestore"},"message":"Oct 31, 2022 5:10:30 PM io.gapi.emulators.netty.HttpVersionRoutingHandler channelRead\nINFO: Detected non-HTTP/2 connection.\n"}}
[2022-10-31T21:10:30.481Z] Oct 31, 2022 5:10:30 PM com.google.cloud.datastore.emulator.impl.context.EmulatorAuthorization warnAboutSecuredJwt
WARNING: expected an unsecured JWT, the emulator does not validate JWTs and IS NOT SECURE
 {"metadata":{"emulator":{"name":"firestore"},"message":"Oct 31, 2022 5:10:30 PM com.google.cloud.datastore.emulator.impl.context.EmulatorAuthorization warnAboutSecuredJwt\nWARNING: expected an unsecured JWT, the emulator does not validate JWTs and IS NOT SECURE\n"}}
[2022-10-31T21:10:30.802Z] Oct 31, 2022 5:10:30 PM com.google.net.webchannel.server.v8.BackChannel add
WARNING: Failed to send a new message due to too many pending messagings in the back channel (10001). May need enable flow control.
 {"metadata":{"emulator":{"name":"firestore"},"message":"Oct 31, 2022 5:10:30 PM com.google.net.webchannel.server.v8.BackChannel add\nWARNING: Failed to send a new message due to too many pending messagings in the back channel (10001). May need enable flow control.\n"}}
[2022-10-31T21:10:30.802Z] Oct 31, 2022 5:10:30 PM com.google.net.webchannel.server.v8.ChannelInternalImpl handle
WARNING: Server fails to send the message, abort the channel!
Oct 31, 2022 5:10:30 PM com.google.cloud.datastore.emulator.firestore.webchannel.FirestoreV1WebChannelAdapter$FirestoreListenHandler onError
WARNING: [ERROR] NETWORK_ERROR ()
Oct 31, 2022 5:10:30 PM com.google.net.webchannel.server.v8.BackChannel add
WARNING: Failed to send a new message due to too many pending messagings in the back channel (10001). May need enable flow control.
Oct 31, 2022 5:10:30 PM com.google.net.webchannel.server.v8.ChannelInternalImpl handle
WARNING: Server fails to send the message, abort the channel!
 {"metadata":{"emulator":{"name":"firestore"},"message":"Oct 31, 2022 5:10:30 PM com.google.net.webchannel.server.v8.ChannelInternalImpl handle\nWARNING: Server fails to send the message, abort the channel!\nOct 31, 2022 5:10:30 PM com.google.cloud.datastore.emulator.firestore.webchannel.FirestoreV1WebChannelAdapter$FirestoreListenHandler onError\nWARNING: [ERROR] NETWORK_ERROR ()\nOct 31, 2022 5:10:30 PM com.google.net.webchannel.server.v8.BackChannel add\nWARNING: Failed to send a new message due to too many pending messagings in the back channel (10001). May need enable flow control.\nOct 31, 2022 5:10:30 PM com.google.net.webchannel.server.v8.ChannelInternalImpl handle\nWARNING: Server fails to send the message, abort the channel!\n"}}
[2022-10-31T21:10:30.802Z] Oct 31, 2022 5:10:30 PM com.google.cloud.datastore.emulator.firestore.webchannel.FirestoreV1WebChannelAdapter$FirestoreListenHandler onError
WARNING: [ERROR] NETWORK_ERROR ()
Oct 31, 2022 5:10:30 PM com.google.net.webchannel.server.v8.BackChannel add
WARNING: Failed to send a new message due to too many pending messagings in the back channel (10001). May need enable flow control.
Oct 31, 2022 5:10:30 PM com.google.net.webchannel.server.v8.ChannelInternalImpl handle
WARNING: Server fails to send the message, abort the channel!
Oct 31, 2022 5:10:30 PM com.google.cloud.datastore.emulator.firestore.webchannel.FirestoreV1WebChannelAdapter$FirestoreListenHandler onError
WARNING: [ERROR] NETWORK_ERROR ()
 {"metadata":{"emulator":{"name":"firestore"},"message":"Oct 31, 2022 5:10:30 PM com.google.cloud.datastore.emulator.firestore.webchannel.FirestoreV1WebChannelAdapter$FirestoreListenHandler onError\nWARNING: [ERROR] NETWORK_ERROR ()\nOct 31, 2022 5:10:30 PM com.google.net.webchannel.server.v8.BackChannel add\nWARNING: Failed to send a new message due to too many pending messagings in the back channel (10001). May need enable flow control.\nOct 31, 2022 5:10:30 PM com.google.net.webchannel.server.v8.ChannelInternalImpl handle\nWARNING: Server fails to send the message, abort the channel!\nOct 31, 2022 5:10:30 PM com.google.cloud.datastore.emulator.firestore.webchannel.FirestoreV1WebChannelAdapter$FirestoreListenHandler onError\nWARNING: [ERROR] NETWORK_ERROR ()\n"}}
[2022-10-31T21:10:30.803Z] Oct 31, 2022 5:10:30 PM com.google.net.webchannel.server.v8.BackChannel add
WARNING: Failed to send a new message due to too many pending messagings in the back channel (10001). May need enable flow control.
Oct 31, 2022 5:10:30 PM com.google.net.webchannel.server.v8.ChannelInternalImpl handle
WARNING: Server fails to send the message, abort the channel!
Oct 31, 2022 5:10:30 PM com.google.cloud.datastore.emulator.firestore.webchannel.FirestoreV1WebChannelAdapter$FirestoreListenHandler onError
WARNING: [ERROR] NETWORK_ERROR ()
 {"metadata":{"emulator":{"name":"firestore"},"message":"Oct 31, 2022 5:10:30 PM com.google.net.webchannel.server.v8.BackChannel add\nWARNING: Failed to send a new message due to too many pending messagings in the back channel (10001). May need enable flow control.\nOct 31, 2022 5:10:30 PM com.google.net.webchannel.server.v8.ChannelInternalImpl handle\nWARNING: Server fails to send the message, abort the channel!\nOct 31, 2022 5:10:30 PM com.google.cloud.datastore.emulator.firestore.webchannel.FirestoreV1WebChannelAdapter$FirestoreListenHandler onError\nWARNING: [ERROR] NETWORK_ERROR ()\n"}}
[2022-10-31T21:10:30.803Z] Oct 31, 2022 5:10:30 PM com.google.net.webchannel.server.v8.BackChannel add
WARNING: Failed to send a new message due to too many pending messagings in the back channel (10001). May need enable flow control.
Oct 31, 2022 5:10:30 PM com.google.net.webchannel.server.v8.ChannelInternalImpl handle
WARNING: Server fails to send the message, abort the channel!
 {"metadata":{"emulator":{"name":"firestore"},"message":"Oct 31, 2022 5:10:30 PM com.google.net.webchannel.server.v8.BackChannel add\nWARNING: Failed to send a new message due to too many pending messagings in the back channel (10001). May need enable flow control.\nOct 31, 2022 5:10:30 PM com.google.net.webchannel.server.v8.ChannelInternalImpl handle\nWARNING: Server fails to send the message, abort the channel!\n"}}
[2022-10-31T21:10:30.803Z] Oct 31, 2022 5:10:30 PM com.google.cloud.datastore.emulator.firestore.webchannel.FirestoreV1WebChannelAdapter$FirestoreListenHandler onError
WARNING: [ERROR] NETWORK_ERROR ()
 {"metadata":{"emulator":{"name":"firestore"},"message":"Oct 31, 2022 5:10:30 PM com.google.cloud.datastore.emulator.firestore.webchannel.FirestoreV1WebChannelAdapter$FirestoreListenHandler onError\nWARNING: [ERROR] NETWORK_ERROR ()\n"}}
[2022-10-31T21:10:30.804Z] Oct 31, 2022 5:10:30 PM io.gapi.emulators.netty.HttpVersionRoutingHandler channelRead
INFO: Detected non-HTTP/2 connection.
 {"metadata":{"emulator":{"name":"firestore"},"message":"Oct 31, 2022 5:10:30 PM io.gapi.emulators.netty.HttpVersionRoutingHandler channelRead\nINFO: Detected non-HTTP/2 connection.\n"}}
[2022-10-31T21:10:32.522Z] Oct 31, 2022 5:10:32 PM io.gapi.emulators.netty.HttpVersionRoutingHandler channelRead
INFO: Detected non-HTTP/2 connection.
 {"metadata":{"emulator":{"name":"firestore"},"message":"Oct 31, 2022 5:10:32 PM io.gapi.emulators.netty.HttpVersionRoutingHandler channelRead\nINFO: Detected non-HTTP/2 connection.\n"}}
[2022-10-31T21:10:32.525Z] Oct 31, 2022 5:10:32 PM com.google.cloud.datastore.emulator.impl.context.EmulatorAuthorization warnAboutSecuredJwt
WARNING: expected an unsecured JWT, the emulator does not validate JWTs and IS NOT SECURE
 {"metadata":{"emulator":{"name":"firestore"},"message":"Oct 31, 2022 5:10:32 PM com.google.cloud.datastore.emulator.impl.context.EmulatorAuthorization warnAboutSecuredJwt\nWARNING: expected an unsecured JWT, the emulator does not validate JWTs and IS NOT SECURE\n"}}
[2022-10-31T21:10:32.845Z] Oct 31, 2022 5:10:32 PM io.gapi.emulators.netty.HttpVersionRoutingHandler channelRead
INFO: Detected non-HTTP/2 connection.
Oct 31, 2022 5:10:32 PM com.google.net.webchannel.server.v8.BackChannel add
WARNING: Failed to send a new message due to too many pending messagings in the back channel (10001). May need enable flow control.
 {"metadata":{"emulator":{"name":"firestore"},"message":"Oct 31, 2022 5:10:32 PM io.gapi.emulators.netty.HttpVersionRoutingHandler channelRead\nINFO: Detected non-HTTP/2 connection.\nOct 31, 2022 5:10:32 PM com.google.net.webchannel.server.v8.BackChannel add\nWARNING: Failed to send a new message due to too many pending messagings in the back channel (10001). May need enable flow control.\n"}}
[2022-10-31T21:10:32.845Z] Oct 31, 2022 5:10:32 PM com.google.net.webchannel.server.v8.ChannelInternalImpl handle
WARNING: Server fails to send the message, abort the channel!
Oct 31, 2022 5:10:32 PM com.google.cloud.datastore.emulator.firestore.webchannel.FirestoreV1WebChannelAdapter$FirestoreListenHandler onError
WARNING: [ERROR] NETWORK_ERROR ()
Oct 31, 2022 5:10:32 PM com.google.net.webchannel.server.v8.BackChannel add
WARNING: Failed to send a new message due to too many pending messagings in the back channel (10001). May need enable flow control.
Oct 31, 2022 5:10:32 PM com.google.net.webchannel.server.v8.ChannelInternalImpl handle
WARNING: Server fails to send the message, abort the channel!
Oct 31, 2022 5:10:32 PM com.google.cloud.datastore.emulator.firestore.webchannel.FirestoreV1WebChannelAdapter$FirestoreListenHandler onError
WARNING: [ERROR] NETWORK_ERROR ()
 {"metadata":{"emulator":{"name":"firestore"},"message":"Oct 31, 2022 5:10:32 PM com.google.net.webchannel.server.v8.ChannelInternalImpl handle\nWARNING: Server fails to send the message, abort the channel!\nOct 31, 2022 5:10:32 PM com.google.cloud.datastore.emulator.firestore.webchannel.FirestoreV1WebChannelAdapter$FirestoreListenHandler onError\nWARNING: [ERROR] NETWORK_ERROR ()\nOct 31, 2022 5:10:32 PM com.google.net.webchannel.server.v8.BackChannel add\nWARNING: Failed to send a new message due to too many pending messagings in the back channel (10001). May need enable flow control.\nOct 31, 2022 5:10:32 PM com.google.net.webchannel.server.v8.ChannelInternalImpl handle\nWARNING: Server fails to send the message, abort the channel!\nOct 31, 2022 5:10:32 PM com.google.cloud.datastore.emulator.firestore.webchannel.FirestoreV1WebChannelAdapter$FirestoreListenHandler onError\nWARNING: [ERROR] NETWORK_ERROR ()\n"}}
[2022-10-31T21:10:32.845Z] Oct 31, 2022 5:10:32 PM com.google.net.webchannel.server.v8.BackChannel add
WARNING: Failed to send a new message due to too many pending messagings in the back channel (10001). May need enable flow control.
Oct 31, 2022 5:10:32 PM com.google.net.webchannel.server.v8.ChannelInternalImpl handle
WARNING: Server fails to send the message, abort the channel!
 {"metadata":{"emulator":{"name":"firestore"},"message":"Oct 31, 2022 5:10:32 PM com.google.net.webchannel.server.v8.BackChannel add\nWARNING: Failed to send a new message due to too many pending messagings in the back channel (10001). May need enable flow control.\nOct 31, 2022 5:10:32 PM com.google.net.webchannel.server.v8.ChannelInternalImpl handle\nWARNING: Server fails to send the message, abort the channel!\n"}}
[2022-10-31T21:10:32.845Z] Oct 31, 2022 5:10:32 PM com.google.cloud.datastore.emulator.firestore.webchannel.FirestoreV1WebChannelAdapter$FirestoreListenHandler onError
WARNING: [ERROR] NETWORK_ERROR ()
Oct 31, 2022 5:10:32 PM com.google.net.webchannel.server.v8.BackChannel add
WARNING: Failed to send a new message due to too many pending messagings in the back channel (10001). May need enable flow control.
 {"metadata":{"emulator":{"name":"firestore"},"message":"Oct 31, 2022 5:10:32 PM com.google.cloud.datastore.emulator.firestore.webchannel.FirestoreV1WebChannelAdapter$FirestoreListenHandler onError\nWARNING: [ERROR] NETWORK_ERROR ()\nOct 31, 2022 5:10:32 PM com.google.net.webchannel.server.v8.BackChannel add\nWARNING: Failed to send a new message due to too many pending messagings in the back channel (10001). May need enable flow control.\n"}}
[2022-10-31T21:10:32.845Z] Oct 31, 2022 5:10:32 PM com.google.net.webchannel.server.v8.ChannelInternalImpl handle
WARNING: Server fails to send the message, abort the channel!
Oct 31, 2022 5:10:32 PM com.google.cloud.datastore.emulator.firestore.webchannel.FirestoreV1WebChannelAdapter$FirestoreListenHandler onError
WARNING: [ERROR] NETWORK_ERROR ()
 {"metadata":{"emulator":{"name":"firestore"},"message":"Oct 31, 2022 5:10:32 PM com.google.net.webchannel.server.v8.ChannelInternalImpl handle\nWARNING: Server fails to send the message, abort the channel!\nOct 31, 2022 5:10:32 PM com.google.cloud.datastore.emulator.firestore.webchannel.FirestoreV1WebChannelAdapter$FirestoreListenHandler onError\nWARNING: [ERROR] NETWORK_ERROR ()\n"}}
[2022-10-31T21:10:32.845Z] Oct 31, 2022 5:10:32 PM com.google.net.webchannel.server.v8.BackChannel add
WARNING: Failed to send a new message due to too many pending messagings in the back channel (10001). May need enable flow control.
 {"metadata":{"emulator":{"name":"firestore"},"message":"Oct 31, 2022 5:10:32 PM com.google.net.webchannel.server.v8.BackChannel add\nWARNING: Failed to send a new message due to too many pending messagings in the back channel (10001). May need enable flow control.\n"}}
[2022-10-31T21:10:32.846Z] Oct 31, 2022 5:10:32 PM com.google.net.webchannel.server.v8.ChannelInternalImpl handle
WARNING: Server fails to send the message, abort the channel!
Oct 31, 2022 5:10:32 PM com.google.cloud.datastore.emulator.firestore.webchannel.FirestoreV1WebChannelAdapter$FirestoreListenHandler onError
WARNING: [ERROR] NETWORK_ERROR ()
 {"metadata":{"emulator":{"name":"firestore"},"message":"Oct 31, 2022 5:10:32 PM com.google.net.webchannel.server.v8.ChannelInternalImpl handle\nWARNING: Server fails to send the message, abort the channel!\nOct 31, 2022 5:10:32 PM com.google.cloud.datastore.emulator.firestore.webchannel.FirestoreV1WebChannelAdapter$FirestoreListenHandler onError\nWARNING: [ERROR] NETWORK_ERROR ()\n"}}
[2022-10-31T21:10:33.894Z] Oct 31, 2022 5:10:33 PM io.gapi.emulators.netty.HttpVersionRoutingHandler channelRead
INFO: Detected non-HTTP/2 connection.
 {"metadata":{"emulator":{"name":"firestore"},"message":"Oct 31, 2022 5:10:33 PM io.gapi.emulators.netty.HttpVersionRoutingHandler channelRead\nINFO: Detected non-HTTP/2 connection.\n"}}
[2022-10-31T21:10:33.897Z] Oct 31, 2022 5:10:33 PM com.google.cloud.datastore.emulator.impl.context.EmulatorAuthorization warnAboutSecuredJwt
WARNING: expected an unsecured JWT, the emulator does not validate JWTs and IS NOT SECURE
 {"metadata":{"emulator":{"name":"firestore"},"message":"Oct 31, 2022 5:10:33 PM com.google.cloud.datastore.emulator.impl.context.EmulatorAuthorization warnAboutSecuredJwt\nWARNING: expected an unsecured JWT, the emulator does not validate JWTs and IS NOT SECURE\n"}}
[2022-10-31T21:10:34.154Z] Oct 31, 2022 5:10:34 PM com.google.net.webchannel.server.v8.BackChannel add
WARNING: Failed to send a new message due to too many pending messagings in the back channel (10001). May need enable flow control.
Oct 31, 2022 5:10:34 PM com.google.net.webchannel.server.v8.ChannelInternalImpl handle
WARNING: Server fails to send the message, abort the channel!
 {"metadata":{"emulator":{"name":"firestore"},"message":"Oct 31, 2022 5:10:34 PM com.google.net.webchannel.server.v8.BackChannel add\nWARNING: Failed to send a new message due to too many pending messagings in the back channel (10001). May need enable flow control.\nOct 31, 2022 5:10:34 PM com.google.net.webchannel.server.v8.ChannelInternalImpl handle\nWARNING: Server fails to send the message, abort the channel!\n"}}
[2022-10-31T21:10:34.155Z] Oct 31, 2022 5:10:34 PM com.google.cloud.datastore.emulator.firestore.webchannel.FirestoreV1WebChannelAdapter$FirestoreListenHandler onError
WARNING: [ERROR] NETWORK_ERROR ()
Oct 31, 2022 5:10:34 PM com.google.net.webchannel.server.v8.BackChannel add
WARNING: Failed to send a new message due to too many pending messagings in the back channel (10001). May need enable flow control.
Oct 31, 2022 5:10:34 PM com.google.net.webchannel.server.v8.ChannelInternalImpl handle
WARNING: Server fails to send the message, abort the channel!
Oct 31, 2022 5:10:34 PM com.google.cloud.datastore.emulator.firestore.webchannel.FirestoreV1WebChannelAdapter$FirestoreListenHandler onError
WARNING: [ERROR] NETWORK_ERROR ()
Oct 31, 2022 5:10:34 PM com.google.net.webchannel.server.v8.BackChannel add
WARNING: Failed to send a new message due to too many pending messagings in the back channel (10001). May need enable flow control.
Oct 31, 2022 5:10:34 PM com.google.net.webchannel.server.v8.ChannelInternalImpl handle
WARNING: Server fails to send the message, abort the channel!
Oct 31, 2022 5:10:34 PM com.google.cloud.datastore.emulator.firestore.webchannel.FirestoreV1WebChannelAdapter$FirestoreListenHandler onError
WARNING: [ERROR] NETWORK_ERROR ()
 {"metadata":{"emulator":{"name":"firestore"},"message":"Oct 31, 2022 5:10:34 PM com.google.cloud.datastore.emulator.firestore.webchannel.FirestoreV1WebChannelAdapter$FirestoreListenHandler onError\nWARNING: [ERROR] NETWORK_ERROR ()\nOct 31, 2022 5:10:34 PM com.google.net.webchannel.server.v8.BackChannel add\nWARNING: Failed to send a new message due to too many pending messagings in the back channel (10001). May need enable flow control.\nOct 31, 2022 5:10:34 PM com.google.net.webchannel.server.v8.ChannelInternalImpl handle\nWARNING: Server fails to send the message, abort the channel!\nOct 31, 2022 5:10:34 PM com.google.cloud.datastore.emulator.firestore.webchannel.FirestoreV1WebChannelAdapter$FirestoreListenHandler onError\nWARNING: [ERROR] NETWORK_ERROR ()\nOct 31, 2022 5:10:34 PM com.google.net.webchannel.server.v8.BackChannel add\nWARNING: Failed to send a new message due to too many pending messagings in the back channel (10001). May need enable flow control.\nOct 31, 2022 5:10:34 PM com.google.net.webchannel.server.v8.ChannelInternalImpl handle\nWARNING: Server fails to send the message, abort the channel!\nOct 31, 2022 5:10:34 PM com.google.cloud.datastore.emulator.firestore.webchannel.FirestoreV1WebChannelAdapter$FirestoreListenHandler onError\nWARNING: [ERROR] NETWORK_ERROR ()\n"}}
[2022-10-31T21:10:34.155Z] Oct 31, 2022 5:10:34 PM com.google.net.webchannel.server.v8.BackChannel add
WARNING: Failed to send a new message due to too many pending messagings in the back channel (10001). May need enable flow control.
Oct 31, 2022 5:10:34 PM com.google.net.webchannel.server.v8.ChannelInternalImpl handle
WARNING: Server fails to send the message, abort the channel!
Oct 31, 2022 5:10:34 PM com.google.cloud.datastore.emulator.firestore.webchannel.FirestoreV1WebChannelAdapter$FirestoreListenHandler onError
WARNING: [ERROR] NETWORK_ERROR ()
Oct 31, 2022 5:10:34 PM com.google.net.webchannel.server.v8.BackChannel add
WARNING: Failed to send a new message due to too many pending messagings in the back channel (10001). May need enable flow control.
 {"metadata":{"emulator":{"name":"firestore"},"message":"Oct 31, 2022 5:10:34 PM com.google.net.webchannel.server.v8.BackChannel add\nWARNING: Failed to send a new message due to too many pending messagings in the back channel (10001). May need enable flow control.\nOct 31, 2022 5:10:34 PM com.google.net.webchannel.server.v8.ChannelInternalImpl handle\nWARNING: Server fails to send the message, abort the channel!\nOct 31, 2022 5:10:34 PM com.google.cloud.datastore.emulator.firestore.webchannel.FirestoreV1WebChannelAdapter$FirestoreListenHandler onError\nWARNING: [ERROR] NETWORK_ERROR ()\nOct 31, 2022 5:10:34 PM com.google.net.webchannel.server.v8.BackChannel add\nWARNING: Failed to send a new message due to too many pending messagings in the back channel (10001). May need enable flow control.\n"}}
[2022-10-31T21:10:34.155Z] Oct 31, 2022 5:10:34 PM com.google.net.webchannel.server.v8.ChannelInternalImpl handle
WARNING: Server fails to send the message, abort the channel!
Oct 31, 2022 5:10:34 PM com.google.cloud.datastore.emulator.firestore.webchannel.FirestoreV1WebChannelAdapter$FirestoreListenHandler onError
WARNING: [ERROR] NETWORK_ERROR ()
 {"metadata":{"emulator":{"name":"firestore"},"message":"Oct 31, 2022 5:10:34 PM com.google.net.webchannel.server.v8.ChannelInternalImpl handle\nWARNING: Server fails to send the message, abort the channel!\nOct 31, 2022 5:10:34 PM com.google.cloud.datastore.emulator.firestore.webchannel.FirestoreV1WebChannelAdapter$FirestoreListenHandler onError\nWARNING: [ERROR] NETWORK_ERROR ()\n"}}
[2022-10-31T21:10:34.159Z] Oct 31, 2022 5:10:34 PM io.gapi.emulators.netty.HttpVersionRoutingHandler channelRead
INFO: Detected non-HTTP/2 connection.
 {"metadata":{"emulator":{"name":"firestore"},"message":"Oct 31, 2022 5:10:34 PM io.gapi.emulators.netty.HttpVersionRoutingHandler channelRead\nINFO: Detected non-HTTP/2 connection.\n"}}
[2022-10-31T21:10:35.740Z] Oct 31, 2022 5:10:35 PM io.gapi.emulators.netty.HttpVersionRoutingHandler channelRead
INFO: Detected non-HTTP/2 connection.
 {"metadata":{"emulator":{"name":"firestore"},"message":"Oct 31, 2022 5:10:35 PM io.gapi.emulators.netty.HttpVersionRoutingHandler channelRead\nINFO: Detected non-HTTP/2 connection.\n"}}
[2022-10-31T21:10:35.743Z] Oct 31, 2022 5:10:35 PM com.google.cloud.datastore.emulator.impl.context.EmulatorAuthorization warnAboutSecuredJwt
WARNING: expected an unsecured JWT, the emulator does not validate JWTs and IS NOT SECURE
 {"metadata":{"emulator":{"name":"firestore"},"message":"Oct 31, 2022 5:10:35 PM com.google.cloud.datastore.emulator.impl.context.EmulatorAuthorization warnAboutSecuredJwt\nWARNING: expected an unsecured JWT, the emulator does not validate JWTs and IS NOT SECURE\n"}}
[2022-10-31T21:10:36.006Z] Oct 31, 2022 5:10:36 PM com.google.net.webchannel.server.v8.BackChannel add
WARNING: Failed to send a new message due to too many pending messagings in the back channel (10001). May need enable flow control.
Oct 31, 2022 5:10:36 PM com.google.net.webchannel.server.v8.ChannelInternalImpl handle
WARNING: Server fails to send the message, abort the channel!
 {"metadata":{"emulator":{"name":"firestore"},"message":"Oct 31, 2022 5:10:36 PM com.google.net.webchannel.server.v8.BackChannel add\nWARNING: Failed to send a new message due to too many pending messagings in the back channel (10001). May need enable flow control.\nOct 31, 2022 5:10:36 PM com.google.net.webchannel.server.v8.ChannelInternalImpl handle\nWARNING: Server fails to send the message, abort the channel!\n"}}
[2022-10-31T21:10:36.006Z] Oct 31, 2022 5:10:36 PM com.google.cloud.datastore.emulator.firestore.webchannel.FirestoreV1WebChannelAdapter$FirestoreListenHandler onError
WARNING: [ERROR] NETWORK_ERROR ()
Oct 31, 2022 5:10:36 PM com.google.net.webchannel.server.v8.BackChannel add
WARNING: Failed to send a new message due to too many pending messagings in the back channel (10001). May need enable flow control.
Oct 31, 2022 5:10:36 PM com.google.net.webchannel.server.v8.ChannelInternalImpl handle
WARNING: Server fails to send the message, abort the channel!
Oct 31, 2022 5:10:36 PM com.google.cloud.datastore.emulator.firestore.webchannel.FirestoreV1WebChannelAdapter$FirestoreListenHandler onError
WARNING: [ERROR] NETWORK_ERROR ()
Oct 31, 2022 5:10:36 PM com.google.net.webchannel.server.v8.BackChannel add
WARNING: Failed to send a new message due to too many pending messagings in the back channel (10001). May need enable flow control.
Oct 31, 2022 5:10:36 PM com.google.net.webchannel.server.v8.ChannelInternalImpl handle
WARNING: Server fails to send the message, abort the channel!
 {"metadata":{"emulator":{"name":"firestore"},"message":"Oct 31, 2022 5:10:36 PM com.google.cloud.datastore.emulator.firestore.webchannel.FirestoreV1WebChannelAdapter$FirestoreListenHandler onError\nWARNING: [ERROR] NETWORK_ERROR ()\nOct 31, 2022 5:10:36 PM com.google.net.webchannel.server.v8.BackChannel add\nWARNING: Failed to send a new message due to too many pending messagings in the back channel (10001). May need enable flow control.\nOct 31, 2022 5:10:36 PM com.google.net.webchannel.server.v8.ChannelInternalImpl handle\nWARNING: Server fails to send the message, abort the channel!\nOct 31, 2022 5:10:36 PM com.google.cloud.datastore.emulator.firestore.webchannel.FirestoreV1WebChannelAdapter$FirestoreListenHandler onError\nWARNING: [ERROR] NETWORK_ERROR ()\nOct 31, 2022 5:10:36 PM com.google.net.webchannel.server.v8.BackChannel add\nWARNING: Failed to send a new message due to too many pending messagings in the back channel (10001). May need enable flow control.\nOct 31, 2022 5:10:36 PM com.google.net.webchannel.server.v8.ChannelInternalImpl handle\nWARNING: Server fails to send the message, abort the channel!\n"}}
[2022-10-31T21:10:36.006Z] Oct 31, 2022 5:10:36 PM com.google.cloud.datastore.emulator.firestore.webchannel.FirestoreV1WebChannelAdapter$FirestoreListenHandler onError
WARNING: [ERROR] NETWORK_ERROR ()
Oct 31, 2022 5:10:36 PM com.google.net.webchannel.server.v8.BackChannel add
WARNING: Failed to send a new message due to too many pending messagings in the back channel (10001). May need enable flow control.
 {"metadata":{"emulator":{"name":"firestore"},"message":"Oct 31, 2022 5:10:36 PM com.google.cloud.datastore.emulator.firestore.webchannel.FirestoreV1WebChannelAdapter$FirestoreListenHandler onError\nWARNING: [ERROR] NETWORK_ERROR ()\nOct 31, 2022 5:10:36 PM com.google.net.webchannel.server.v8.BackChannel add\nWARNING: Failed to send a new message due to too many pending messagings in the back channel (10001). May need enable flow control.\n"}}
[2022-10-31T21:10:36.006Z] Oct 31, 2022 5:10:36 PM com.google.net.webchannel.server.v8.ChannelInternalImpl handle
WARNING: Server fails to send the message, abort the channel!
Oct 31, 2022 5:10:36 PM io.gapi.emulators.netty.HttpVersionRoutingHandler channelRead
INFO: Detected non-HTTP/2 connection.
 {"metadata":{"emulator":{"name":"firestore"},"message":"Oct 31, 2022 5:10:36 PM com.google.net.webchannel.server.v8.ChannelInternalImpl handle\nWARNING: Server fails to send the message, abort the channel!\nOct 31, 2022 5:10:36 PM io.gapi.emulators.netty.HttpVersionRoutingHandler channelRead\nINFO: Detected non-HTTP/2 connection.\n"}}
[2022-10-31T21:10:36.007Z] Oct 31, 2022 5:10:36 PM com.google.cloud.datastore.emulator.firestore.webchannel.FirestoreV1WebChannelAdapter$FirestoreListenHandler onError
WARNING: [ERROR] NETWORK_ERROR ()
Oct 31, 2022 5:10:36 PM com.google.net.webchannel.server.v8.BackChannel add
WARNING: Failed to send a new message due to too many pending messagings in the back channel (10001). May need enable flow control.
Oct 31, 2022 5:10:36 PM com.google.net.webchannel.server.v8.ChannelInternalImpl handle
WARNING: Server fails to send the message, abort the channel!
 {"metadata":{"emulator":{"name":"firestore"},"message":"Oct 31, 2022 5:10:36 PM com.google.cloud.datastore.emulator.firestore.webchannel.FirestoreV1WebChannelAdapter$FirestoreListenHandler onError\nWARNING: [ERROR] NETWORK_ERROR ()\nOct 31, 2022 5:10:36 PM com.google.net.webchannel.server.v8.BackChannel add\nWARNING: Failed to send a new message due to too many pending messagings in the back channel (10001). May need enable flow control.\nOct 31, 2022 5:10:36 PM com.google.net.webchannel.server.v8.ChannelInternalImpl handle\nWARNING: Server fails to send the message, abort the channel!\n"}}
[2022-10-31T21:10:36.007Z] Oct 31, 2022 5:10:36 PM com.google.cloud.datastore.emulator.firestore.webchannel.FirestoreV1WebChannelAdapter$FirestoreListenHandler onError
WARNING: [ERROR] NETWORK_ERROR ()
 {"metadata":{"emulator":{"name":"firestore"},"message":"Oct 31, 2022 5:10:36 PM com.google.cloud.datastore.emulator.firestore.webchannel.FirestoreV1WebChannelAdapter$FirestoreListenHandler onError\nWARNING: [ERROR] NETWORK_ERROR ()\n"}}
[2022-10-31T21:10:37.575Z] Received signal SIGINT (Ctrl-C) 1
 
i  emulators: Received SIGINT (Ctrl-C) for the first time. Starting a clean shutdown. 
i  emulators: Please wait for a clean shutdown or send the SIGINT (Ctrl-C) signal again to stop right now. 
i  emulators: Shutting down emulators. {"metadata":{"emulator":{"name":"hub"},"message":"Shutting down emulators."}}
i  ui: Stopping Emulator UI {"metadata":{"emulator":{"name":"ui"},"message":"Stopping Emulator UI"}}
⚠  Emulator UI has exited upon receiving signal: SIGINT 
i  firestore: Stopping Firestore Emulator {"metadata":{"emulator":{"name":"firestore"},"message":"Stopping Firestore Emulator"}}
[2022-10-31T21:10:37.583Z] *** shutting down gRPC server since JVM is shutting down
 {"metadata":{"emulator":{"name":"firestore"},"message":"*** shutting down gRPC server since JVM is shutting down\n"}}
[2022-10-31T21:10:37.586Z] *** server shut down
 {"metadata":{"emulator":{"name":"firestore"},"message":"*** server shut down\n"}}
i  hub: Stopping emulator hub {"metadata":{"emulator":{"name":"hub"},"message":"Stopping emulator hub"}}
i  logging: Stopping Logging Emulator {"metadata":{"emulator":{"name":"logging"},"message":"Stopping Logging Emulator"}}

@tnoetzel tnoetzel added the bug label Oct 31, 2022
@tnoetzel
Copy link
Author

tnoetzel commented Nov 1, 2022

Have also tested this with @firebase/firestore: Firestore (9.13.0) and I'm getting the exact same issue.

@tnoetzel
Copy link
Author

tnoetzel commented Nov 3, 2022

@yuchenshi - Saw you worked on a similar issue #4336 ...have any insights here?

@yuchenshi
Copy link
Member

@tnoetzel This is a more complicated issue in the Firestore emulator and we don't have any updates yet.

@tnoetzel
Copy link
Author

tnoetzel commented Nov 3, 2022

@yuchenshi - Any suggested workarounds in the meantime?

@MorenoMdz
Copy link

+1

1 similar comment
@pfreund
Copy link

pfreund commented Nov 21, 2022

+1

@mgomez-getwith
Copy link

+1. After reaching +10k rows on one of the collections, the emulator stopped working properly 😭

@JFGHT
Copy link

JFGHT commented Jan 3, 2023

Bump since I am getting this error too.

Any status on this? I believe it's pretty blocking issue.

@christhompsongoogle
Copy link
Contributor

christhompsongoogle commented Jan 18, 2023

Repro testing: I'm able to insert 125,000 rows via the batch interface without issue. After 10k rows though the Emualtor Suite UI seems to have problems.

I'm using the modular API - does switching to modular help when the UI is not open?

for (let z = 0; z < 250; z++) {
  // Get a new write batch
  let batch = writeBatch(firestore);

  for (let i = 0; i < 500; i++) {
    let nycRef = doc(firestore, "cities", "NYC" + z +"." + i);
    batch.set(nycRef, {name: "New York City"});
  }
  // Commit the batch
  await batch.commit();
  console.log(`batch ${z} complete`)
}

import/expert of the 125k rows appears to work fine also.

I'm not able to reproduce the querysnapshot issue without the UI.

I'll continue investigating the UI issue - can anyone confirm this is reproducible without the UI (as in, no browser is open with the Emulator Suite UI, but it is still running).

@MidnightLightning
Copy link

I encountered a similar issue (hundreds of repetitions of this error series over and over in the debug log):

Mar 22, 2023 3:43:27 AM com.google.net.webchannel.server.v8.BackChannel add
WARNING: Failed to send a new message due to too many pending messagings in the back channel (10001). May need enable flow control.
Mar 22, 2023 3:43:27 AM com.google.net.webchannel.server.v8.ChannelInternalImpl handle
WARNING: Server fails to send the message, abort the channel!

I encountered this error while doing bulk setting of documents into a Firebase Emulator instance. If no browser windows are open to look at the Firestore UI, doing the following (chunks of parallel writes) operates blazingly-fast:

const BATCH_SIZE = 20
;(async () => {
  for (let i = 0; i < sampleData.length; i += BATCH_SIZE) {
    console.log(`Batch starting at ${i}...`)

    // Create a set of parallelized individual writes
    let promises = sampleData.slice(i, i + BATCH_SIZE).map((dataBlob) => {
      return db.collection('mydata').doc(String(dataBlob.myKey)).set(dataBlob, { merge: true })
    })

    // Commit the batch
    await Promise.all(promises)
  }
})()

But after that process concludes, if I open the Emulator UI window to look at the new data, the web UI just gets a "loading" indicator, and the debug log floods with those BackChannel errors.

If I run the data importing script while the Emulator UI is open, it goes relatively quickly through the first few batches, but once it's past about 1,500 records, it slows down, and the debug log floods with those BackChannel errors. The inserts do continue to go in, but go slower and slower with each batch.

So this seems to be an issue with the Emulator suite trying to communicate over websockets; when it knows there's a client waiting for all messages it's unable to serve them up fast-enough to keep the backlog clear?

@eliezedeck
Copy link

I am no longer able to continue development on my project because I need live data to develop the next feature. At least, please provide us with a work-around, it seems to be an issue with gRPC. My data is just about 20 MB, yeah! that small! But one collection (the one that crashes) has about 16k entries in it.

I have repeatedly been disappointed with the Emulators Suite lately. It usually takes ages before any viable fix, no work-around, nothing. I'm seriously starting to consider other alternatives.

@MorenoMdz
Copy link

I am no longer able to continue development on my project because I need live data to develop the next feature. At least, please provide us with a work-around, it seems to be an issue with gRPC. My data is just about 20 MB, yeah! that small! But one collection (the one that crashes) has about 16k entries in it.

I have repeatedly been disappointed with the Emulators Suite lately. It usually takes ages before any viable fix, no work-around, nothing. I'm seriously starting to consider other alternatives.

I know the pain, we ended up going thru a months long project to migrate to postgres.

@christhompsongoogle
Copy link
Contributor

Thank you for the feedback.

Some possible workarounds here:

  • Limit the number of documents in a single collection to 10,000.
  • Don't use the emulator UI to view a collection with more than 10k documents, as this seems to be the cause of the issue.

I'll look at putting in a short term fix soon, but essentially the UI needs to handle data windowing better.

@eliezedeck
Copy link

@christhompsongoogle I'm glad to hear someone is going to do something about it, at last. But I'm sad for all the people that have been here since November 1st, 2022 because of this. I'm equally sad for other persons who have invested in Firebase, not knowing it wasn't their program that had bug, but it's the Emulators Suite, I do feel their pain on this one.
Last week, I was about to suggest to my boss to invest on Firebase, thank God I shut my mouth.

To be honest, I'm looking forward for a real fix, not a short term fix. I hear that Google Developers are pretty thorough when it comes to requirements for correct, efficient and fast algorithms.
To me, it doesn't sound like a problem that should be UI related. It sounds more like a problem in how the backend handles the requests to list more data. But it's just a guess, could be completely wrong.

Anyway, I feel like there are too many tradeoffs that have been made on the Emulators Suite, not just on this one problem, but on different bugs as well. Please give us some real fix, please 🥹

@christhompsongoogle
Copy link
Contributor

christhompsongoogle commented Mar 28, 2023

Last week, I was about to suggest to my boss to invest on Firebase, thank God I shut my mouth.

This is not constructive. If you want to rant take it elsewhere please.

10k documents in a single collection is outside what I would consider "typical" use for an emulator and the UI - this is not a production scaled product and so there will necessarily be scalability limits.

The project is [mostly] open source - if anyone would like to improve anything I'd be happy to collaborate on or review any PRs.

@tnoetzel
Copy link
Author

@christhompsongoogle - While I agree about the ranting, I strongly disagree about it being an atypical use for an emulator. Many companies use emulators to test locally with production copies of data. It's an extremely common use case.

FWIW, best I can tell this has nothing to do with the emulator UI per se... even if you don't open the emulator UI the issue still occurs (though I suppose it could be because the emulator UI is still technically running... is there a flag to prevent the emulator UI from running to test whether that's really the issue?)

...

As a sidebar, while I again agree that ranting isn't constructive, I can understand the frustration. Given that a) Firebase is a Google product, b) vague references to "internal bugs" are common in many of these issues, and c) @yuchenshi said this is "a more complicated issue in the Firestore emulator", suggesting somebody contribute to the repo because it's "mostly open source" feels less like a genuine suggestion and more like slapping the customer. As I'm sure. you know, Google is rapidly developing a reputation for abandoning its products. It'd be a shame to have that happen with Firebase.

@christhompsongoogle
Copy link
Contributor

christhompsongoogle commented Mar 28, 2023

The only reproducible case I'm able to find is having over 10k documents while the UI is open in the browser. There's another possibly-related bug where having the UI open in the browser slows down batch inserts significantly.

For clarity, I'm not able to reproduce the bug by inserting ~15k documents and then listening via onSnapshot to the collection. This leads me to the conclusion that this is just the UI fetching all documents in a single page and listening on each of them.

Improving the behavior between onSnapshot and the emulator might be necessary but I don't have any working example to test it or even demonstrate that it's a problem.

To test without the UI, try the following:

firebase emulators:start --only=firestore[,auth,database,etc] --debug

@MidnightLightning
Copy link

MidnightLightning commented Mar 28, 2023

This leads me to the conclusion that this is just the UI fetching all documents in a single page and listening on each of them.

I think slight correction to this: I agree it seems to be the presence of a front-end visitor is triggering the issue, but the issue is happening on the back-end. Since the front-end is listening on a websocket connection, I think the issue arises when the front-end connects and sends some "I'm here listening; let me know of any updates", and then the back-end tries to bundle up 10,000+ messages and send them all at once to the websocket connection. The error from the back-end seems the buffer/queue on the back-end is getting over-filled; that it cannot clear the queue fast enough. Not sure if the back-end when it hears the "someone is listening on the front-end" message checks the state of that collection and then sends notifications for all the records at once (as opposed to paginating/chunking the notifications to the websocket handler), and the socket handler can't handle ingesting messages in chunks larger than 10,000 at once?

Or is it that the front-end as part of the initial handshake over the socket is "I'm interested in collection FOO; send me all the records in that collection" (and it should be paginating instead)?

@MidnightLightning
Copy link

@christhompsongoogle - While I agree about the ranting, I strongly disagree about it being an atypical use for an emulator. Many companies use emulators to test locally with production copies of data. It's an extremely common use case.

As a developer, my key desire is to have a well-documented way to test on non-production environments. Whether that's a clear way to have a real Firebase separate project for each developer of a project to do local development off of, without the risk of affecting the production Firebase project's data, or having locally-running emulated Firebase features. If the Emulator tools are only going to be targeting 10,000 or less records, I think that's fine (useful for "toy" projects or proof of concepts), but then there needs to be a separate means to do production development/testing safely too.

The "hosting" feature has the ability to create "Preview channels" which serve this need. If the "Firestore" feature had a similar option, I think that would be fine too. But until that's the case, having clear direction on whether Google's going to consider the Emulated tools as only targeting small/toy implementations, or meant to be robust pre-prod testing tools would be good.

@christhompsongoogle
Copy link
Contributor

The emulators are a tool, but right now they are not a complete replacement for a preprod environment.

There are some key differences in behavior that should still be tested with a live project like indexes, transactions, and load testing:
https://firebase.google.com/docs/emulator-suite/connect_firestore#how_the_emulator_differs_from_production

@MidnightLightning
Copy link

MidnightLightning commented Mar 28, 2023

The emulators are a tool, but right now they are not a complete replacement for a preprod environment.

Is there a guide somewhere that lays out how to (safely, cheaply) use a "preprod environment" within Firebase? I presume it's just "create a new Firebase project" (probably with a second billing plan), but then the code repository needs to have two different projects in its Firebase config file, and it's just one accidental firebase use flip away from accidentally deploying untested code to production instead of pre-prod? Also, if there's a better place to have this sort of developer discussion/feedback, please let me know!

@christhompsongoogle
Copy link
Contributor

Terraform is a tool that we've recently added support for:
https://firebase.google.com/docs/projects/terraform/get-started

@MidnightLightning
Copy link

MidnightLightning commented Mar 28, 2023

Terraform is a tool that we've recently added support for: https://firebase.google.com/docs/projects/terraform/get-started

"Recently added support for" and "is a robust tool we recommend for production use" are two very different things. For clarity, for developers making infrastructure choices for their projects, is Terraform the suggested/default/most-supported tool that the Firebase team recommends using for this functionality, that will be fully-supported going forward?

@christhompsongoogle
Copy link
Contributor

christhompsongoogle commented Mar 28, 2023

Terraform is an industry standard that Google has long supported and Firebase is prioritizing support for Terraform going forward. Not all features are supported in Firebase yet so be sure to check that it will meet your needs before starting.

@MidnightLightning
Copy link

So, summarizing the current state of things that I see (please correct me if I'm wrong):

  • This issue has not been marked as a duplicate of firestore emulator ui: some collections will not show data, error in console #4578, though several other cases that also were related to "back channel" errors from the Emulator with collections in an emulated Firestore over 10,000 records have been closed as duplicates of that other one. Is there a clear difference between this one and firestore emulator ui: some collections will not show data, error in console #4578 ?
  • This issue seems most active with information about potential fixes (a mention from @christhompsongoogle that he'll "look at putting in a short term fix soon")
  • However the view of the maintaining team is that they are fine calling this a limitation of the Emulator and not a bug (for developing against larger data sets, using a separate real Firebase instance as staging/pre-prod, using Terraform as suggested tooling to define those environments, is their suggestion)

So, from that I gather that "soon" could be a very long time (for the maintaining team to prioritize this), and if the community wants to prioritize it, they have to develop the change themselves. I have not done development on the core Firebase Tools core repo, but will look into that (I've done library development using npm link to verify changes in consuming clients, but not with one that is intended to be installed as a global package; I'll need to read up on that). Given that it seems likely to be at its core an issue with "windowing"/"paging" data on the back-end, anyone have any tips where in the code that application logic is likely to be at?

@tnoetzel
Copy link
Author

FWIW, I still think there's a completely valid use case for supporting more than 10K rows locally... developing with production data is useful in many contexts and developers are substantially more likely to catch issues if they're using that data locally rather than just in a preproduction environment where they test before a final deployment. Given that Firebase is geared so heavily towards startups I wouldn't expect most Firebase users to have the types of sophisticated development / testing processes necessary to catch a high percentage of bugs on staging...

It's also substantially faster if you're dealing with fixing an issue that only occurs with large amounts of data (but doesn't have to do with Firebase directly) to not have to try to fix it and then deploy to staging to see if your changes actually worked. This was literally my case where I was trying to debug an issue related to client-side virtualization of large lists, but was prevented because the emulator couldn't handle it.

It also sounds like a "temporary" fix is at least within reach, so @MidnightLightning maybe let's not write off the improvement just yet.

@christhompsongoogle - if the "short-term fix" is obvious to you but you don't have time to implement, might be useful to at least point @MidnightLightning in the right direction...

@MidnightLightning
Copy link

@christhompsongoogle Thanks for getting firebase/firebase-tools-ui#935 in! I see that change got merged into that project's main branch, but the firebase-tools-ui repository has no "releases" or tagged versions. How does that change become live/available? For those on this thread who wish to see if that solves this error we've been seeing, how do we "upgrade" our local installation's version of the firebase-tools-ui?

@christhompsongoogle
Copy link
Contributor

The latest UI version was picked up by firebase-tools last week, see:
https://github.com/firebase/firebase-tools/releases/tag/v11.25.3

I created a release in the firebase-tools-ui repo so it's clear what version we're on - thanks for pointing it out.

@MidnightLightning
Copy link

I've now updated my local installation to use firebase-tools v11.25.3, and that version seems to fix at least part of the issue.

With the new version, for data that's at rest (a collection that already has 10,000+ items), visiting the Emulator page for Firestore loads properly now (rather than showing a loading spinner on the front-end and the "back channel error" messages on the back-end), and for both unfiltered and filtered views of the collection, it maxes out at 10,000 items listed.

For data that's in motion, there still seems to be an issue though. If there is a script that's doing a large series of inserts updates (using the Admin SDK to seed an initial data set or sync data from another source), if during the mass inserts a browser tab is open to the Emulator Firestore page, the back-end starts throwing the same "too many pending messages in the back channel" errors about sending more than 10,000 messages, and the web browser tab doesn't show any obvious loading indicators, but I did experience it crashing due to an "out of memory" exception if I let it run long enough.

So it seems this fix corrects the front-end calling the back-end, but when the back-end is calling the front-end through the websocket connection, this issue can still arise?

@MidnightLightning
Copy link

Is anyone else listening in on this ticket able to confirm or not if this fully fixes the problem in your development environment, or you still get the "too many pending messagings in the back channel (10001)" errors in some circumstances?

@MidnightLightning
Copy link

Checking in @christhompsongoogle; are you able to verify on your end whether this change fixed both querying at-rest collections, and sending update messages to the front-end?

@christhompsongoogle
Copy link
Contributor

There are still some ways to trigger this, notably with very large firestore imports. My fix was to resolve the issue with the UI becoming unusable after 10k rows in a single collection, but a future follow-up change will still be needed to resolve the issue completely.

@perret123
Copy link

@christhompsongoogle @MidnightLightning
Yep, I can reproduce this Error still;

I get hundreds of these messages:

Sep 03, 2023 10:32:30 PM com.google.net.webchannel.server.v8.BackChannel add
WARNING: Failed to send a new message due to too many pending messagings in the back channel (10001). May need enable flow control.
Sep 03, 2023 10:32:30 PM com.google.net.webchannel.server.v8.ChannelInternalImpl handle
WARNING: Server fails to send the message, abort the channel!
Sep 03, 2023 10:32:30 PM com.google.cloud.datastore.emulator.firestore.webchannel.FirestoreV1WebChannelAdapter$FirestoreListenHandler onError
WARNING: [ERROR] NETWORK_ERROR ()

A bit later I get:

WARNING: An exceptionCaught() event was fired, and it reached at the tail of the pipeline. It usually means the last handler in the pipeline did not handle the exception.
java.net.SocketException: Connection reset
        at java.base/sun.nio.ch.SocketChannelImpl.throwConnectionReset(SocketChannelImpl.java:394)
        at java.base/sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:426)
        at io.netty.buffer.PooledByteBuf.setBytes(PooledByteBuf.java:259)
        at io.netty.buffer.AbstractByteBuf.writeBytes(AbstractByteBuf.java:1132)
        at io.netty.channel.socket.nio.NioSocketChannel.doReadBytes(NioSocketChannel.java:357)
        at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:151)
        at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:788)
        at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:724)
        at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:650)
        at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:562)
        at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:997)
        at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
        at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
        at java.base/java.lang.Thread.run(Thread.java:833)

And if I use transactions I get this:

Sep 03, 2023 11:12:47 PM io.grpc.internal.SerializingExecutor run
SEVERE: Exception while executing runnable io.grpc.internal.ServerImpl$JumpToApplicationThreadServerStreamListener$1MessagesAvailable@69e0199
com.google.cloud.datastore.emulator.impl.util.StreamTransportClosedException: java.lang.IllegalStateException: call is closed
        at com.google.cloud.datastore.emulator.impl.util.WrappedStreamObserver.onNext(WrappedStreamObserver.java:30)
        at com.google.cloud.datastore.emulator.impl.CloudFirestoreV1ListenStream.notify(CloudFirestoreV1ListenStream.java:117)
        at com.google.cloud.datastore.emulator.impl.CloudFirestoreV1ListenStream.addTarget(CloudFirestoreV1ListenStream.java:297)
        at com.google.cloud.datastore.emulator.impl.CloudFirestoreV1ListenStream.onNext(CloudFirestoreV1ListenStream.java:164)
        at com.google.cloud.datastore.emulator.impl.CloudFirestoreV1ListenStream.onNext(CloudFirestoreV1ListenStream.java:57)
        at io.grpc.stub.ServerCalls$StreamingServerCallHandler$StreamingServerCallListener.onMessage(ServerCalls.java:262)
        at io.grpc.ForwardingServerCallListener.onMessage(ForwardingServerCallListener.java:33)
        at io.grpc.Contexts$ContextualizedServerCallListener.onMessage(Contexts.java:76)
        at io.grpc.ForwardingServerCallListener.onMessage(ForwardingServerCallListener.java:33)
        at io.grpc.Contexts$ContextualizedServerCallListener.onMessage(Contexts.java:76)
        at io.grpc.internal.ServerCallImpl$ServerStreamListenerImpl.messagesAvailableInternal(ServerCallImpl.java:324)
        at io.grpc.internal.ServerCallImpl$ServerStreamListenerImpl.messagesAvailable(ServerCallImpl.java:309)
        at io.grpc.internal.ServerImpl$JumpToApplicationThreadServerStreamListener$1MessagesAvailable.runInContext(ServerImpl.java:833)
        at io.grpc.internal.ContextRunnable.run(ContextRunnable.java:37)
        at io.grpc.internal.SerializingExecutor.run(SerializingExecutor.java:133)
        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
        at java.base/java.lang.Thread.run(Thread.java:833)
Caused by: java.lang.IllegalStateException: call is closed
        at com.google.common.base.Preconditions.checkState(Preconditions.java:522)
        at io.grpc.internal.ServerCallImpl.sendMessageInternal(ServerCallImpl.java:157)
        at io.grpc.internal.ServerCallImpl.sendMessage(ServerCallImpl.java:151)
        at io.grpc.stub.ServerCalls$ServerCallStreamObserverImpl.onNext(ServerCalls.java:380)
        at com.google.cloud.datastore.emulator.impl.util.WrappedStreamObserver.onNext(WrappedStreamObserver.java:28)
        ... 17 more

From my point of view, this has nothing to do with the UI - as I didn't have it open and it happens to me quite soon after starting the emulator. I have a relatively large database (around 1GB) and maybe it is special that I have subscribed to around 100 collection streams from several test-devices in my Flutter project. I run the emulator separately on a server like workstation - I assigned the Java Process 24GB RAM - which the process uses right after start.

Thank you for renewed interest in this issue, I am sorry that I can't provide a reproducible example - but I hope my trail of exceptions leads you in the right direction.

To add to the topic about what the emulator should or should not support:
I, as a single developer who tries to operate on a very low cost basis, can't afford to have a pre-production online Firestore environment to run my tests if I want to stay profitable in the long term, as my tests can run at higher usage/costs than the productive working environment of my clients. I know the costs because I mostly tested online anyway, as in the last few years of Firestore development, I never really made the emulator work without any occasional strange behavior.

I can imagine it is probably hard to port a very scalable cloud database into a "not so scalable but still usable"-local database without actually releasing the sourcecode of Firestore itself - but I still I feel the local development copy is a very important part of the development cycle which I always found a rather frustrating expericene with Firestore. But I really enjoy the rest of the product, so yeah, thank you anyway :-)

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