Hi, I'm having this error while fetching documents using a permanent access token, If I generate a new token the fetch works fine
message: 'The provided ref is no longer accessible, it has expired. Master ref is: ZQsdphAAACEA2FjG'
Thanks for sharing your use case
Indeed, each time you get this type of error, you should use a valid and up-to-date ref when fetching documents using a permanent access token.
I am having this exact issue, what exactly is causing this to occur? It actually took me a while to figure out what token was incorrect. Building my site locally works fine, but as soon as it is deployed to Vercel I get the error message?
We're looking into some issues around caching in Next.js.
@alain00.alvarez and @jon1 are you both using the App Router?
In the meantime, you can see if there's any helpful information here:
Dear Prismic team
I set up a new Next.js App Router project using your setup command npx @slicemachine/init@latest and walking trough your step by step setup guide.
In previous versions, I never had issues deploying the site to Vercel and setting up Prismic Webhooks to trigger redeploys.
With this new project it seems like there are some caching issues with Vercel:
If I push a new commit to Github or if I edit content on Prismic, it triggers a new deploy correctly.
Unfortunately those deplo…
@samlittlefair, I am using the app router yes. Thanks for the link to this topic!
Hey, I am also having this issue with Nuxt and Vue when deploying on netlify. Is there any update to this issue?
I feel like I was getting this issue among other strange cache issues. Adding the following to my package.json build script helped with Vercel build issues. Locally, I just nuked the .next folder entirely and ran a build and no issues:
"build": "rm -rf .next/cache/fetch-cache && next build"
Anyone else want to test this?
@ngiusti If you're having this issue on Nuxt and Vue, it might be a separate error. Could you open a new thread and post your error message?
We have opened a thread on the Next.js GitHub repository. Feel free to upvote and subscribe to follow along: