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
Issue Summary:
I'm using Frog + Next.js to host a website where the main url when shared on FC would render the default frame state (working fine.). When sharing /profile/:username URLs it should render the frame with the username passed in to fetch the data and render a different first frame (working fine locally and on supercast.xyz.). This DOES NOT work currently on Warpcast. I have tried many different things but feel i'm missing something entirely after days of trying to debug this. My current project is pretty far built so I'm trying to avoid sharing huge chunks of code but I'll share the most relevant parts.
It's rendering the metadata fine (i think) when I console.log it.:
import{headers}from'next/headers'importtype{Metadata}from'next'import{getFrameMetadata,isFrameRequest}from'frog/next'import{SuspendedComponent}from'../../suspense-component';exportasyncfunctiongenerateMetadata(props: any): Promise<Metadata>{consturl=process.env.NEXT_PUBLIC_URL||'http://localhost:3000'constframeMetadata=awaitgetFrameMetadata(`${url}/api?username=${props.params.id}`);console.log('meta',frameMetadata);return{other: frameMetadata,}}exportdefaultfunctionPage(props: any){const{ id }=props.params;if(isFrameRequest(headers()))returnnullconsole.log('we failed being a frame');// <-- this fires on /profile/username - does NOT fire on just / or /apireturn<SuspendedComponentid={id.toString()}/>}
Again i've tried a ton of things but it seems like either i'm missing some core understanding of how this should work or dynamic variables for co-location may be off.
Semi-unrelated, I saw a few people struggling with co-location so I made an example that works well for non-dynamic variables being passed in here: Co-Location x Frog
Minimal reproductions are required as they save us a lot of time reproducing your config & environment, and trying to reproduce your issue. See Why reproductions are required.
Please reopen this issue when a reproduction is added.
Describe the bug
Issue Summary:
I'm using Frog + Next.js to host a website where the main url when shared on FC would render the default frame state (working fine.). When sharing /profile/:username URLs it should render the frame with the username passed in to fetch the data and render a different first frame (working fine locally and on supercast.xyz.). This DOES NOT work currently on Warpcast. I have tried many different things but feel i'm missing something entirely after days of trying to debug this. My current project is pretty far built so I'm trying to avoid sharing huge chunks of code but I'll share the most relevant parts.
It's rendering the metadata fine (i think) when I console.log it.:
But it shows up as "not a valid frame"
/profile/[id]/page.tsx:
main route:
image handler for the dynamic part:
Again i've tried a ton of things but it seems like either i'm missing some core understanding of how this should work or dynamic variables for co-location may be off.
Semi-unrelated, I saw a few people struggling with co-location so I made an example that works well for non-dynamic variables being passed in here: Co-Location x Frog
Link to Minimal Reproducible Example
https://github.com/thebreadcat/coloco-frog-with-args
Steps To Reproduce
Frog Version
0.12.3
TypeScript Version
5.5.3
Check existing issues
Anything else?
Love Frog! Thanks for all you all do!
The text was updated successfully, but these errors were encountered: