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

Why you forcing update firebase-tools and NOW our system is not working!! #5407

Closed
rendomnet opened this issue Jan 9, 2023 · 4 comments
Closed

Comments

@rendomnet
Copy link

rendomnet commented Jan 9, 2023

Our system was perfectly fine and in working condition.

Firebase forced update us (because of this issue #5334) to latest version of firebase-tools
and now it is giving us error

i  functions: Watching "C:\....\functions\dist" for Cloud Functions...
The system cannot find the path specified.

Error: An unexpected error has occurred.

(because of this issue #4952)

My system was working, and now you are forcing us to upgrade firebase-tools.
and new firebase-tools FORCED us to update firebase-admin and firebase-functions(package.json indicates an outdated version of firebase-functions. Please upgrade using npm install --save firebase-functions@latest in your functions directory.)!
But your new version is NOT WORKING and cant event run.

It's just insane, why we cant use working version of firebase?

[debug] [2023-01-09T06:39:03.107Z] Building nodejs source
[debug] [2023-01-09T06:39:03.108Z] Could not find functions.yaml. Must use http discovery
[debug] [2023-01-09T06:39:03.123Z] Error: spawn ./node_modules/.bin/firebase-functions ENOENT
    at notFoundError ***\AppData\Roaming\nvm\v16.19.0\node_modules\firebase-tools\node_modules\cross-spawn\lib\enoent.js:6:26)
    at verifyENOENT ***\AppData\Roaming\nvm\v16.19.0\node_modules\firebase-tools\node_modules\cross-spawn\lib\enoent.js:40:16)
    at ChildProcess.cp.emit ***\AppData\Roaming\nvm\v16.19.0\node_modules\firebase-tools\node_modules\cross-spawn\lib\enoent.js:27:25)
    at Process.ChildProcess._handle.onexit (node:internal/child_process:293:12)
[error] 
[error] Error: An unexpected error has occurred.

[REQUIRED] Environment info

firebase-tools:
[email protected] pre update
and firebase-tools@latest after update

Mac, Windows

Platform:

Mac, Windows

[REQUIRED] Steps to reproduce

We have a working system on [email protected] and "firebase-admin": "10.3.0" "firebase-functions": "3.24.1". And now it is giving error when we deploy

i  functions: packaged ***\functions\dist (207.71 KB) for uploading

Error: Failed to fetch Run service undefined
error Command failed with exit code 1.

[REQUIRED] Expected behavior

Successfull deploy

[REQUIRED] Actual behavior

Forcing us to update firebase-tools and not working after the update

@JFGHT
Copy link

JFGHT commented Jan 9, 2023

This was indeed a problem for us too, but keep in mind there are features that have been releasing on Firebase which weren't supported by Firebase-tools (like TTL for example).

Keep an eye on the features you are using, even tho I believe this is a general issue.

@dfidalg0
Copy link

Same issue... I'm using npm workspaces. It seems like the firebase CLI is trying to use the firebase-functions CLI from functions/node_modules/.bin, which doesn't exist, since dependencies are installed in the root node_modules.

A possible workaround is creating a symlink to node_modules/.bin inside functions/node_modules/.bin. This solved the problem for me. Gonna try to open a PR to fix this asap.

@dfidalg0
Copy link

dfidalg0 commented Jan 11, 2023

Aparently, this is solved by #5391, but it doesn't seem to made to npm yet.

@bkendall
Copy link
Contributor

@rendomnet thanks for sharing your experience. From what you described, it looks like making a jump from a v10 to v11 of firebase-tools caused some turmoil, which can definitely be difficult. And it's a tough balance to strike - updating any tooling to a new version to be able to use the New Hotness (like gen2 functions) means having to adapt to the rest of the changes as well, breaking or not.

We don't put warnings or full-stopping error conditions into the Firebase CLI lightly either. With the newer versions of the CLI, the way Functions are discovered and deploy changed, which may require updating dependencies in the code being deployed. The Functions team did put in a bunch of work to make sure they could still fall back to the original way of discovery as well. The note to upgrade is there to help continue to make sure you get the latest fixes and make sure the deployment has the best chance of succeeding.

There are other issues in this repo that we are addressing around functions discovery and deployment, especially with workspaces setups (@dfidalg0). It's difficult to write software that can accommodate vast variations of setups, so we have to tackle problems as they come up and try to make sure we don't regress. We work hard on it, but sometimes things fall through the cracks or we have to make tradeoffs.

As for this particular open issue, there's not enough information about your setup to accurately debug. I'd ask that you provide a minimal, reproducible example that can help us narrow down your issues (if #5391 isn't what your facing). Without a specific issue to track down here, I'm going to close this bug, but I ask that you open a new bug with more details and a way for us to reproduce the issue.

And please, keep in mind the community guidelines. I understand the frustration, but this issue was difficult to approach and correctly address. We're happy to help out where we can, but we all must keep conversation constructive and productive.

Thanks!

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

6 participants