404 error with my Prismic CDN

I googled and found a topic that it's about preview session.
Before today, I just go back to Prismic and press preview and it will work again.
But now it doesn't work, all pages 404.

The topic I found recommend to clear the cookie, but it's annoying. Clear cookie affect a lot of my logged in websites, it should be solve in other ways. If I use Prismic everyday, I have to clear my cookie everyday, really annoying...

Do we have other solution?

Hello @taker.wu,

Thanks for reaching out to us.

I understand your concern, but you can clear only one cookie(io.prismic.preview) without touching your browser's other cookies(where you are logged in or so).

Here is the process for clearing the "io.prismic.preview" cookie from google chrome:

On your website, open Dev Tools(right-click on the page and click on inspect), then in Dev tools, go to the "Application" tab and click "Cookies" in the side menu. Click on the domain ( your production domain), and scroll to find any domains that include io.prismic.preview. Delete all of those.

Finally, refresh everything and try opening a preview from the writing room again.

Currently, we recommend this solution to clearing cookies when "Preview" fails to work again.

Let me know if you have any other doubts.

Thanks,
Priyanka

1 Like

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Hello ! Stuck with the same issue. I am working on a Ruby Project and the code was working on my local. Out of nowhere it is now throwing 404 from yesterday and Net::ReadTimeout with #TCPSocket:(closed). Need help !!

Hi Megha,

I'm sorry about the late reply on this one.

Are you still seeing this issue? Did you try clearing your cookies?

Thanks.

Hello Phil,

I did clear my cookies but that did not work. Eventually I created another repo as we were creating a demo.

Also, right now we are extracting html content in Ruby directly in our views as below
<h1><%#= @documents[0]['privacy_policy.page_title'].as_text() %></h1>

Is there a better way where we can get the content more dynamically ? The document doesn't mention this and will be really helpful to have more information on ruby code.

Hey @megha.rana ,

Yes, you can output the content as HTML instead of as_text which removes styling.

Thanks.

Thank you, using the HTML Serializer it worked !

1 Like