-
Notifications
You must be signed in to change notification settings - Fork 115
Can't serve firebase-functions locally #173
Comments
I have a very similar issue, get error message:
Running node 6.11.1 via nvm. The log file does not add anything. I have also run the command suggested above and tried all suggestions on the page: https://github.com/GoogleCloudPlatform/cloud-functions-emulator/wiki/Troubleshooting
I am able to deploy the functions fine and they work? This is really frustrating, Thanks. |
same issue here: Win7 Ent x64
No errors in the
|
same issue with:
console messages:
|
Similar issue in a fresh project macOS@10.13.2 output:
|
Guys, I seemed to fix my issue, I am not quite sure which command fixed it but below are some that I ran.
Like I said I I don't know which of the above was the fix and the order is not correct but just putting here as it may help someone else. I think that getting the terminal using 6.11.5 is the key. |
Using |
In my case moving to v6.12.3 fixed the problem, I think the main problem is that the official documentation isn't up to date and is pointing to a wrong version |
I tried using |
Okay so what finally worked for me is going into this dir: ~/.config/configstore/ and then deleting everything to do with @Google-Cloud and firestore*.json. Then I went back into the console and did a firebase login, I think what's happening is the token is expiring and it's not refreshing it our your user it getting dropped, something in that universe. Very annoying. |
Okay so just another note, I am able to repeat the cause and fix here. So in my case I am trying to debug the functions in VS Code, so I followed this guide: When I run
And then if I then try to run:
I get:
And at this point I go into ~/.config/configstore/ and delete the @Google-Cloud folder and firestore json file, then drop back into the console and run:
Hope this helps someone and I hope this gets fixed, I would really like to use VSCode to debug this stuff. Thanks! June-04-2018 UPDATE: I ran into this issue again when trying to run an API that was enabled, in this case it was the natural language API, I got the error:
Of course that project ID doesn't go any where and of course the API was enabled, turns out this fix also works for this error, just wanted to add it since apparently you get here at least 2 different ways. |
Thanks @shaunc869 -- fixed my issue. |
I deleted |
What is Windows 10 equivalent folder path to |
@paritosh149 c:\users<your username.config\configstore@google-cloud Anyway, in my case deleting this folder did not resolve the problem |
I just discovered the
I tried to update cli tools,
Then the situation is more wrong than before
|
Why firebase cli make us much trouble always? I'm tired of errors, switching to azure |
Try AWS too. |
@realtebo have you tried the patch here? firebase/firebase-tools#770 (comment) that fixed this node 10 error for me:
|
@alexlouden : I'll try. If works, I'll try to open a PR into the related repo |
I had the same problem for a different reason than the one mentionned above. In my case, I had a console running Killing the process of I did try the workaround in #173 (comment) before, so it may or may not have changed something. |
@google-admin : please, trash this dependency ! it's still using
|
@realtebo I've updated my comment to be clearer. Problem is solved for me. I'm not sure if deleting the |
Had same error. It appears that it was happening for me because I had another functions process running. After closing it I could run the other functions process fine |
I still have this issue locally, deploying to firebase cloud works fine(remote).
What is causing this issue? Any suggestions, advises ? Thanks. |
I think after a day struggle it magically started working. I am not sure what really helped, I believe it is mostly related to reinstalling firebase functions and node versions. I still have some minor issues like port locked.
|
@prakis look for other processes using the same ports (5001, 5002). |
Thats right @jberube, the previous node process is still running in the background and locking those ports. |
Node 6.11.5 is the only version which is working for me. Strangely other firebase project works fine with latest node version. |
I tried many ways. The only one that worked was switching to node version 6.11.5$ nvm use 6.11.5
i functions: Preparing to emulate functions. |
I have added sudo before command and then works fine |
For anyone encountering this issue (including future me): Error:
Solution
Now functions should work, as somehow this refreshes the authentication... I think
when this inevitably happens again, I'll update this comment. |
use sudo before serve ! |
I deleted the files inside of |
macOS@10.12.4
firebase-tools@3.16.0
firebase-admin@5.4.3
firebase-functions@0.7.3
node@8.*
run
firebase serve --only functions
output:
while if i switch to node@6.*
when i go to
/usr/local/lib/node_modules/firebase-tools/node_modules/grpc/src/node/extension_binary
i only gotnode-v57-darwin-x64-unknown
instead ofnode-v48-darwin-x64-unknown
The text was updated successfully, but these errors were encountered: