[email protected] with emulator causes StringDecoder$DecodeBuffer error

Created on 4 Apr 2019  Â·  6Comments  Â·  Source: firebase/firebase-tools

[REQUIRED] Environment info


firebase-tools:
6.5.1


Platform:
macOS

[REQUIRED] Test case


Setup very similar to example here:
https://github.com/firebase/quickstart-nodejs/blob/master/firestore-emulator/typescript-quickstart/test/test.ts

[REQUIRED] Steps to reproduce

yarn global upgrade [email protected]
firebase setup:emulators:firestore
firebase serve --only firestore

Then run tests against local emulator

[REQUIRED] Expected behavior

Tests are passing with [email protected]

[REQUIRED] Actual behavior


lots of failures and in the local emulator console I see:

com.google.cloud.datastore.emulator.impl.util.WrappedStreamObserver onError
INFO: operation failed: com/google/api/tools/expr/parser/StringDecoder$DecodeBuffer

With the --debug flag I see basically the same thing with some more details at the top:

> firebase serve --only firestore --debug
[2019-04-03T22:15:25.755Z] ----------------------------------------------------------------------
[2019-04-03T22:15:25.758Z] Command:       /usr/local/bin/node /usr/local/bin/firebase serve --only firestore --debug
[2019-04-03T22:15:25.759Z] CLI Version:   6.5.1
[2019-04-03T22:15:25.759Z] Platform:      darwin
[2019-04-03T22:15:25.759Z] Node Version:  v8.14.0
[2019-04-03T22:15:25.759Z] Time:          Wed Apr 03 2019 15:15:25 GMT-0700 (PDT)
[2019-04-03T22:15:25.759Z] ----------------------------------------------------------------------

API endpoint: http://[::1]:8080
API endpoint: http://127.0.0.1:8080
If you are using a library that supports the FIRESTORE_EMULATOR_HOST environment variable, run:

   export FIRESTORE_EMULATOR_HOST=[::1]:8080,127.0.0.1:8080

Dev App Server is now running.

âš   firestore: Apr 03, 2019 3:15:31 PM io.gapi.emulators.grpc.GrpcServer$3 operationComplete
INFO: Adding handler(s) to newly registered Channel.

âš   firestore: Apr 03, 2019 3:15:31 PM io.gapi.emulators.netty.HttpVersionRoutingHandler channelRead
INFO: Detected HTTP/2 connection.

âš   firestore: Apr 03, 2019 3:15:31 PM com.google.cloud.datastore.emulator.impl.util.WrappedStreamObserver onError
INFO: operation failed: com/google/api/tools/expr/parser/StringDecoder$DecodeBuffer
firestore

Most helpful comment

More details:

  • the v6.5.1 Firestore emulator will blow up on rulesets containing string or bytestring literals
  • we'll roll out a bugfix for this ASAP
  • until that release goes live you can downgrade to v6.5.0

All 6 comments

This error is in the security rules parser. Are you using custom rules? Would you mind attaching them so I can take a look?

I can reproduce this and am working on a fix.

Oh great, let me know if you need anything else!

More details:

  • the v6.5.1 Firestore emulator will blow up on rulesets containing string or bytestring literals
  • we'll roll out a bugfix for this ASAP
  • until that release goes live you can downgrade to v6.5.0

That's awesome! Thanks for the quick response and fix for this @ryanpbrewster 🚀 🎉

released :)

thanks for raising this issue

Was this page helpful?
0 / 5 - 0 ratings

Related issues

FluorescentHallucinogen picture FluorescentHallucinogen  Â·  3Comments

nareshbhatia picture nareshbhatia  Â·  4Comments

SJAnderson picture SJAnderson  Â·  4Comments

jkeys089 picture jkeys089  Â·  3Comments

roosi picture roosi  Â·  3Comments