#amy_code
1 messages ยท Page 1 of 1 (latest)
๐ Welcome to your new thread!
โฒ๏ธ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.
โฑ๏ธ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.
๐ This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1351491679474946088
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.
- amy_code, 22 hours ago, 40 messages
What's the actual error you see?
Webhook received: POST /api/webhook
Raw body received, length: 3036 bytes
โ
Stripe signature verified for event: checkout.session.expired, id: evt_1R3thACLoBz9jXRljxumawj4
Error processing webhook: TypeError: Cannot read properties of undefined (reading 'length')
at initializeFirebaseDirectly (/vercel/path0/api/webhook.ts:12:43)
at handler (/vercel/path0/api/webhook.ts:153:22)
at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
at async Server.<anonymous> (/opt/rust/nodejs.js:2:11025)
at async Server.<anonymous> (/opt/rust/nodejs.js:16:5674)
Unclear how that is related to addig text to a Checkout page?
WHat are you trying to do that throws that error?
im trying to check out
I mean, the actual code/API request that throws that error
so i have 2 types of models
simple 3d models and complex ones
checkout works for simple
doesnt work for complex (bigger file)
that smy hypothesis
OK, but that means nothing to me unfortunately. Can you share the code that you run that throws this error: TypeError: Cannot read properties of undefined (reading 'length')
I guess it's on this file/line: api/webhook.ts:12:43
I'd guess it's this line then:
if (!firebaseInitialized && !admin.apps.length) {
So admin.apps is nullish, and can't check the length of it. Maybe add a chaining operator to conditionally check it exists before you check the length:
if (!firebaseInitialized && !admin?.apps?.length) {
hmmm ok