firebase / firebase/functions-samples

TypeError: Cannot read property 'customer_id' of undefined

Open
#507 3 comments 0 reactions 0 assignees View on GitHub
type: bug
Dominant language
JavaScript
Stars
12.2k
Forks
3.8k
Avg merge
3d 23h
Merged PRs (30d)
1

Description

Deployed as per the example. But keep on getting these errors from calling the functions from index.html:

createStripeCharge
```
TypeError: Cannot read property 'customer_id' of undefined
at exports.createStripeCharge.functions.firestore.document.onCreate (/srv/index.js:35:34)
at
at process._tickDomainCallback (internal/process/next_tick.js:228:7)
```

addPaymentSource
```
TypeError: Cannot read property 'customer_id' of undefined
at exports.addPaymentSource.functions.firestore.document.onCreate (/srv/index.js:73:38)
at
at process._tickDomainCallback (internal/process/next_tick.js:228:7)
```
To exclude any rules issues, I've allowed read and write firestore.rules to anyone with uid.

Any idea what could be causing these errors?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.