#BinaryWritter - bugs

1 messages ยท Page 1 of 1 (latest)

hidden ginkgo
#

Hello, what bugs are you running in to here?

normal falcon
#

hello, this is one of them, it appears this message when i run the web site

#

I have also bugs when i click Checkout button, Stripe dashboard says checkout its not completed

hidden ginkgo
#

I don't see any Stripe calls in that stack. Did you see some stripe code throw an error or something when debugging?

normal falcon
#

For example when i click in the checkout button this error is displayed

hidden ginkgo
#

It looks like something there is undefined. Have you debugged to check that response and response.id are defined as you expect them?

normal falcon
#

Here it is the component when that error is comming from

#

But dont know how to fix it

hidden ginkgo
#

Do you know how to debug your javascript? I would reccommend putting a breakpoint on your code that fetches this info from your server

#

It sounds like either your server is not sending back the data you expect, in which case you will need to debug the server code. Or something is happening on your client side after the server has responded

#

Unfortunately I can't tell just from looking at that code

normal falcon
#

I have placed a console log in the response.id and yes it throws a id

#

Dont know how to explain you about the bugs

#

I have this in console

#

A non-serializable value was detected in an action, in the path: register. Value: [Function: register]
Take a look at the logic that dispatched this action: {
type: 'persist/PERSIST',
register: [Function: register],
rehydrate: [Function: rehydrate]
}

hidden ginkgo
#

What is the ID that you get back in your response?

normal falcon
#

SessionId : cs_test_b1lHV3it2XFVVIbYOVs1Npe04OOtt0e4ja8p28zVp2V6uAzJ14AUK5KfVO

#

Thank you

shadow vapor
#

๐Ÿ‘‹ @normal falcon Pompey had to step away earlier. Are you still around and needing help on this? If so I'm happy to look

normal falcon
#

Hello @shadow vapor the problem i think i have seems to be more complicated than i thought because i grabbed the code from a vercel/stripe example, but the typescript doesnt work very well in next.js

#

The code has errors in short

shadow vapor
#

I haven't read the whole thread, are the errors above or could you summarize for me?

normal falcon
#

Yes, lots of them, im tired of fixing them and reading the documentation

#

For example here

#

import React from 'react'

type Props = {
content: object
}

const PrintObject = ({content}:Props) => {
const formattedContent: string = JSON.stringify(content, null, 2)
return <pre>{formattedContent}</pre>
}

export default PrintObject

#

It throws a error parsing error unexpected token Props

shadow vapor
#

None of that is Stripe specific though, no?

normal falcon
#

Yes because is for a checkout with typescript there is returning a Json with all store data

#

But im not a expert in Typescript

shadow vapor
#

The content: object is the Checkout Session object?

normal falcon
#

I think its what the json is returning but they want it to be formatted