Firebase-tools: functions shell, params for db event doesn't work?

Created on 26 Sep 2017  路  2Comments  路  Source: firebase/firebase-tools

Version info

3.12.0

Steps to reproduce

logReadyBooking({before: '', after: ''}, {params:{bookingId: '-KtG5mEmYfi-G8rQK3S8'}})

Expected behavior

Function logReadyBooking() should run with bookingId param set.

Actual behavior

bookingId is undefined:

logReadyBooking({before: '', after: ''}, {params:{bookingId: '-KtG5mEmYfi-G8rQK3S8'}}) 'Successfully invoked function.' info: User function triggered, starting execution info: { eventId: '090032cb-56ab-407a-ab4d-cdcddb7ef575', timestamp: '2017-09-26T17:22:59.629Z', data: DeltaSnapshot { app: FirebaseApp { firebaseInternals_: [Object], services_: [Object], isDeleted_: false, name_: '__admin__', options_: [Object], database: [Function: bound ], auth: [Function: bound ], messaging: [Function: bound ], INTERNAL: [Object] }, adminApp: FirebaseApp { firebaseInternals_: [Object], services_: [Object], isDeleted_: false, name_: '__admin__', options_: [Object], database: [Function: bound ], auth: [Function: bound ], messaging: [Function: bound ], INTERNAL: [Object] }, _path: '/bookings/-KtG5mEmYfi-G8rQK3S8/priv/ready/status', _data: '', _delta: '', _newData: '' }, eventType: 'providers/google.firebase.database/eventTypes/ref.write', resource: 'projects/_/instances/booknclimb-dev/refs/bookings/-KtG5mEmYfi-G8rQK3S8/priv/ready/status', auth: { admin: true }, params: {} } info: Function crashed info: Booking undefined doesn't exist

Most helpful comment

@laurenzlong Sorry Lauren, upgraded from 0.6.1 to 0.6.3 and now it works properly. 馃憤

All 2 comments

Please ensure you have the latest firebase-functions, and reopen if the issue still persists.

@laurenzlong Sorry Lauren, upgraded from 0.6.1 to 0.6.3 and now it works properly. 馃憤

Was this page helpful?
0 / 5 - 0 ratings