You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Local Function Emulator Triggering wrong function #4189
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
Reacted by Jasim Khan Afridi, roobd, Guilherme Girotto, Guilherme C. Matuella, Jeroen Kroese, spicemix, iwatachan, Kshitij Chauhan and Onur Var
I have the same issue that my function triggers are not working anymore after the upgrade to 10.2.1.
There is only one onCreate function triggered all the time, even a creation on a completely different document path is triggering this one function.
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.
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? :)
Reacted by Kshitij Chauhan, roobd, markdagraca and doo.gl
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.
The first bad firebase-tools version is 10.2.0.
The issue only happens, when the functions emulator is in debug mode.
I removed the --inspect-functions flag and everything seems to work just fine. If I add it in I can confirm that the issue occurs again. Hopefully that helps in tracking down the fix!
Activity
markdagraca commentedon Feb 17, 2022
Downgraded to 10.1.5 and it appears to be working properly but I'm now missing env variables features found in 10.2
Albertbol commentedon Feb 19, 2022
exactly the same issue for the node js environment, all latest libraries
roobd commentedon Feb 20, 2022
I have the same issue that my function triggers are not working anymore after the upgrade to 10.2.1.
There is only one onCreate function triggered all the time, even a creation on a completely different document path is triggering this one function.
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.
taeold commentedon Feb 22, 2022
We are taking a look at the issue. Sorry for the inconvenience!
ggirotto commentedon Feb 22, 2022
We were facing the same issue but it stopped happening yesterday.
gustavrannestig commentedon Feb 24, 2022
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? :)
haroldadmin commentedon Feb 24, 2022
Can confirm, facing the same issue that @gustavrannestig described. It keeps triggering the first triggered function for any subsequent API calls.
taeold commentedon Feb 24, 2022
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.
zebreus commentedon Feb 24, 2022
I also have the same issue. The first triggered function is called for any subsequent API calls.
The first bad firebase-tools version is 10.2.0.
The issue only happens, when the functions emulator is in debug mode.
taeold commentedon Feb 24, 2022
@zebreus Thanks for a very helpful pointer.
Is everyone reporting the issue also starting the emulator with
--inspect-functionsflag?markdagraca commentedon Feb 24, 2022
markdagraca commentedon Feb 24, 2022
What @gustavrannestig said is exactly what I was experiencing
gustavrannestig commentedon Feb 25, 2022
@taeold yes I'm also running the emulators with
--inspect-functionsnikgavalas commentedon Feb 25, 2022
I removed the
--inspect-functionsflag and everything seems to work just fine. If I add it in I can confirm that the issue occurs again. Hopefully that helps in tracking down the fix!doo-gl commentedon Feb 28, 2022
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.
Dynamically invoke correct trigger when running functions emulator wi…
taeold commentedon Mar 3, 2022
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.