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
when a button has a target property AND when the frame does not have a postUrl property, Framegear will throw a Uncaught (in promise) SyntaxError: Unexpected end of JSON input error in the browser console. In the server console you get TypeError: Cannot read properties of undefined (reading 'toString') and POST /api/postFrame 500
in app/page.tsx delete the postUrl: `${NEXT_PUBLIC_URL}/api/frame`, and add a target to the first button like this: { label: 'Story time', target: `${NEXT_PUBLIC_URL}/api/frame`, },
run framegear and the frame server, paste url in framegear, press the button
you should see the same errors
I believe it has something to do framegear/app/api/postFrame/route.ts. If I hardcode the url in this line: const postUrl = frameData.url; so like this: const postUrl = "http://localhost:3000/api/frame" there is no error. So frameData.url is undefined. In a previous version of framegear that I cloned months ago (I'm not sure which version) I did not have this issue. I updated everything the other day and I started getting this error.
Note: if you delete the const { isValid, message } = await getFrameMessage() line and everything that uses isValid and message the frame will work in the frames.js debugger with the button target. So it seems like a framegear issue.
What's the expected behavior?
Framegear should not throw an error and a button click with a target should work.
What version of the libraries are you using?
onchainkit - 0.14.1
most recent framegear
The text was updated successfully, but these errors were encountered:
Describe the bug and the steps to reproduce it
when a button has a
target
property AND when the frame does not have apostUrl
property, Framegear will throw aUncaught (in promise) SyntaxError: Unexpected end of JSON input
error in the browser console. In the server console you getTypeError: Cannot read properties of undefined (reading 'toString')
andPOST /api/postFrame 500
to reproduce:
app/page.tsx
delete thepostUrl: `${NEXT_PUBLIC_URL}/api/frame`,
and add atarget
to the first button like this:{ label: 'Story time', target: `${NEXT_PUBLIC_URL}/api/frame`, },
I believe it has something to do framegear/app/api/postFrame/route.ts. If I hardcode the url in this line:
const postUrl = frameData.url;
so like this:const postUrl = "http://localhost:3000/api/frame"
there is no error. So frameData.url is undefined. In a previous version of framegear that I cloned months ago (I'm not sure which version) I did not have this issue. I updated everything the other day and I started getting this error.Note: if you delete the
const { isValid, message } = await getFrameMessage()
line and everything that usesisValid
andmessage
the frame will work in the frames.js debugger with the buttontarget
. So it seems like a framegear issue.What's the expected behavior?
Framegear should not throw an error and a button click with a target should work.
What version of the libraries are you using?
onchainkit - 0.14.1
most recent framegear
The text was updated successfully, but these errors were encountered: