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
Cannot call scheduled function from emulated functions shell #3490
I am calling this a bug because I am pretty sure I was using this functionality a few weeks ago. I had actually used the emulators in combination with the functions shell to test a scheduled function. However, some google searching leads me to believe maybe this isn't implemented and I am just confused. Hopefully someone here knows. 😅
[REQUIRED] Steps to reproduce
There are two functions defined: helloWorld and helloPubSub.
cd functions
npm run serve
Calling helloWorld() gives the expected output (function runs)
Calling helloPubSub() gives the following error:
Uncaught FirebaseError: Could not find trigger helloPubSub
at FunctionsEmulatorShell.getTrigger (/Users/jonsakas/.cache/firebase/tools/lib/node_modules/firebase-tools/lib/emulator/functionsEmulatorShell.js:52:19)
at FunctionsEmulatorShell.call (/Users/jonsakas/.cache/firebase/tools/lib/node_modules/firebase-tools/lib/emulator/functionsEmulatorShell.js:25:30)
at LocalFunction._call (/Users/jonsakas/.cache/firebase/tools/lib/node_modules/firebase-tools/lib/localFunction.js:186:29) {
children: [],
context: undefined,
exit: 1,
original: undefined,
status: 500
}
Activity
ryor1986 commentedon Jun 15, 2021
Same issue from
firebase functions:shell.Trigger should be found with 'id' but found with 'name' now.
parameter id's value is name now.
call(id: string, data: any, opts: any): void { const trigger = this.getTrigger(id); ....https://github.com/firebase/firebase-tools/blob/master/src/emulator/functionsEmulatorShell.ts
As workaround, you can update firebase-tools to v9.11.0 until fix.
samtstern commentedon Jun 15, 2021
Seems similar to this one:
#3427
I'll check it out.
jsakas commentedon Jun 15, 2021
Confirming this works, thank you.