-
Notifications
You must be signed in to change notification settings - Fork 906
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
Local Function Emulator Triggering wrong function #4189
Comments
Downgraded to 10.1.5 and it appears to be working properly but I'm now missing env variables features found in 10.2 |
exactly the same issue for the node js environment, all latest libraries
|
I have the same issue that my function triggers are not working anymore after the upgrade to 10.2.1. A downgrade to 10.2.0. does not fix the issue. I use firebase-functions at version 3.18.1 A downgrade to 10.1.5 is fixing the issue and all triggers are working as expected again. |
We are taking a look at the issue. Sorry for the inconvenience! |
We were facing the same issue but it stopped happening yesterday. |
I have the same issue. From what I can see the patterin is that it seems to be stuck on the first called function. So when I restart the emulators, I can choose what function to use for that "session" by firing that first. But then I can't switch and call another function without restarting. So I'm guessing some sort of cache bug? :) |
Can confirm, facing the same issue that @gustavrannestig described. It keeps triggering the first triggered function for any subsequent API calls. |
Been investigating the issue, and @gustavrannestig's description helps a ton. Will post an update here once I get a sense of the bug - apologies to everyone for the inconvenience. |
I also have the same issue. The first triggered function is called for any subsequent API calls. |
@zebreus Thanks for a very helpful pointer. Is everyone reporting the issue also starting the emulator with |
Yes im using the following command to launch the tool firebase
emulators:start --inspect-functions --export-on-exit=./saved-data
--import=./saved-data
…On Thu, Feb 24, 2022 at 10:56 AM Daniel Lee ***@***.***> wrote:
@zebreus <https://github.com/Zebreus> Thanks for a very helpful pointer.
Is everyone reporting the issue also starting the emulator with
--inspect-functions flag?
—
Reply to this email directly, view it on GitHub
<#4189 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AGGKAPPFMK7PTZU7POUSQS3U4Z5PBANCNFSM5OV6YPSQ>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
What @gustavrannestig said is exactly what I was experiencing |
@taeold yes I'm also running the emulators with |
I removed the |
Similar issue, starting the emulator, it will repeatedly run whatever was the initial function regardless of what path is used. Downgrading to 10.1.5 resolves the issue for now. For those looking for what to do, run:
check your running version is 10.1.5 using
If it is still 10.2.x, restart your terminal. |
…th --inspect-functions flag (#4232) In #4149, we made large refactor of the Functions Runtime. Namely: 1) We no longer relied on Functions Runtime to parse triggers. Instead, we use [`RuntimeDelegate`](https://github.com/firebase/firebase-tools/blob/2a56d9520241ab9897a59aac22c9fd016251a7cd/src/deploy/functions/runtimes/index.ts#L114), the same procedure used to parse trigger in `firebase deploy` command. 2) Each process running the Functions Runtime was bound to a specific trigger. Unfortunately, this change broke support for `--inspect-function` where users can attach Node Debugger to step through their function when triggered. The debugging experience supported w/ `--inspect-function` relies on the fact that a single process executes all function triggers. This is drastically different to how functions run in Production environment, but it is a very useful feature that makes it easy to step through all functions in a single debug session. I wasn't aware of the debugging capabilities when making the refactor. Unfortunately, the debug feature cuts across a strong assumption I've made for the future of Functions Emulator. This is a rather hasty rollback - I'm going to have to think more deeply about how we want the evolve this feature. Fixes #4189, #4166
Hi folks. The patch for this issue was released today in firebase-tools v10.2.2. Please give it a spin and let us know if things are working expected. |
Trying to run my react typescript project using Local Emulator and it is triggering the wrong function when called from the front end. Code is working perfectly in the production and test environment but not in Local
The text was updated successfully, but these errors were encountered: