-
Notifications
You must be signed in to change notification settings - Fork 969
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
firebase serve
doesn't pick up .runtimeconfig.json
#711
Comments
Updated the original issue to include that this doesn't work on 3.17.7, either.
|
Can you run |
As listed in my comment above, my functions folder is already on |
I have a minimum repro for this issue: https://github.com/MLoughry/firebase-functions-serve-repro Hitting the deployed function at https://us-central1-fir-tools-711-repro.cloudfunctions.net/helloWorld:
Error while trying to serve locally:
|
@MLoughry I'm not sure how you created .runtimeconfig.json, but there's weird characters in front of it when you run
You test that this is an issue by launching a node repl:
Once I replaced your .runtimeconfig.json with another one that contained the same info, but without weird characters, both |
I've narrowed down the issue to Windows Powershell. Running I've managed to sort it out by running Hope this helps. |
@MLoughry Did you find a solution for your issue? getting the same error message |
@denisyilmaz You can use @amnrzv's suggestion, or just opening a text editor and manually creating a .runtimeconfig.json by typing it out may also work if you don't have too many variables. Seems like Windows adds weird characters when you simply run |
I'm on Mac and having same issues as @MLoughry described. I tested the .runtimeconfig.json file if it contains the weird character which it doesn't. |
How did you go about testing it? And can you ensure that the file is in the functions folder? (not the project root folder) |
hah. ok. sorry. moving .runtimeconfig.json solved the problem… |
No worries! Glad you figured it out! |
@laurenzlong PowerShell is not outputting incorrect/badly formatted JSON. Instead, by default, PowerShell redirects output as UCS-2 Little Endian encoding. i assume firebase serve expects UTF-8 encoding. there's probably not much that can be done on your end. anyhow |
This solution works to this day. Cheers |
* Add publisher to registry file fields (#686) * Migrate ext:update ref-based flow to include update warnings + min extension version guard (#684) * Migrate ext:install flow to install via extension reference and remove EAP gating (#679) * Remove EAP-specific copy in ext:dev:register and ext:dev:publish command (#691) * Warn user that unpublishing is final in ext:dev:unpublish command (#693) * Add extMinVersion flag to ext:dev:unpublish command (#698) * Migrate ext:info flow to retrieve spec from Registry API (#683) * Migrate "author" terminology to use "publisher" in Extensions CLI commands (#694) * Fix bug in confirmInstallByReference and refactor ext:install error messages (#702) * Fix local path detection logic and refactor warnings logic in ext:update flow (#703) * Migrate extensions warnings relating to audiences to use (backend) launch stage and visibility fields (#705) * Only infer firebase if publisher not provided as part of user input in ext:info flow (#708) * Adds new warning prompt for non-trusted publishers during ext:install (#707) * add new warning prompt for non-trusted publishers during ext:install * clean up param namne * clean up comment * switch from author ulr to sourceUrl * no please * Update copy to link user to documentation on ext:install flow if input not found (#711) * Adds console install link to ext:dev:publish (#709) * Adds console install link to ext:dev:publish * formats * Add firebase ext:dev:delete command to CLI (#712) * adds changelog * formats Co-authored-by: huangjeff5 <[email protected]> Co-authored-by: Jeff Huang <[email protected]> Co-authored-by: Elvis Sun <[email protected]>
* Add publisher to registry file fields (firebase#686) * Migrate ext:update ref-based flow to include update warnings + min extension version guard (firebase#684) * Migrate ext:install flow to install via extension reference and remove EAP gating (firebase#679) * Remove EAP-specific copy in ext:dev:register and ext:dev:publish command (firebase#691) * Warn user that unpublishing is final in ext:dev:unpublish command (firebase#693) * Add extMinVersion flag to ext:dev:unpublish command (firebase#698) * Migrate ext:info flow to retrieve spec from Registry API (firebase#683) * Migrate "author" terminology to use "publisher" in Extensions CLI commands (firebase#694) * Fix bug in confirmInstallByReference and refactor ext:install error messages (firebase#702) * Fix local path detection logic and refactor warnings logic in ext:update flow (firebase#703) * Migrate extensions warnings relating to audiences to use (backend) launch stage and visibility fields (firebase#705) * Only infer firebase if publisher not provided as part of user input in ext:info flow (firebase#708) * Adds new warning prompt for non-trusted publishers during ext:install (firebase#707) * add new warning prompt for non-trusted publishers during ext:install * clean up param namne * clean up comment * switch from author ulr to sourceUrl * no please * Update copy to link user to documentation on ext:install flow if input not found (firebase#711) * Adds console install link to ext:dev:publish (firebase#709) * Adds console install link to ext:dev:publish * formats * Add firebase ext:dev:delete command to CLI (firebase#712) * adds changelog * formats Co-authored-by: huangjeff5 <[email protected]> Co-authored-by: Jeff Huang <[email protected]> Co-authored-by: Elvis Sun <[email protected]>
Version info
3.17.4, 3.17.7
Platform Information
Windows 10 (10.0,6299)
NodeJS v 8.8.0
Steps to reproduce
index.ts:
Expected behavior
The locally-served functions would pick up the local
.runtimeconfig.json
file.Actual behavior
No local (or remote) config is picked up.
The text was updated successfully, but these errors were encountered: