Preview mode issue Firefox

We’re trying to get our pages set up to support preview and are running into issues, specifically with Firefox (Chrome works fine). I’m getting this error in the Firefox console:

Cookie "io.prismic.preview" has been rejected for invalid domain.

Is there something we have to do to allow the prismic.js file to set the io.prismic.preview cookie? We've gone through all the documentation on how to set up previews and none of the Troubleshooting steps seem to help either.

Thanks!
David

Hey David,

You might need to enable 3rd party cookies.

https://support.mozilla.org/en-US/kb/third-party-cookies-firefox-tracking-protection

Thanks.

Unfortunately, that doesn't seem to help. I tried disabling cookie blocking entirely as well as adding our prismic site to the exception list. I'm still getting the same error.

OK, in that case, I'm not sure what the issue is, but it might be to do with Firefox changing their cookie settings. I'll report this to the team to get more information about what could be happening.

Also, I can't seem to replicate the issue on my side with the latest Firefox, I get some warnings about lots of different cookies with the samesite tag, but the previews work. What version of Firefox are you using?

Thanks

I was using Firefox 94.0.1

I tested with that version of Firefox and while I get the same warning (Cookie "io.prismic.preview" has been rejected for invalid domain.), previews are still working for me.

Can you try with these settings?

I finally figured out the issue with Firefox! I have the Firefox Multi-Account Containers extension installed so that I can isolate our local dev, staging, and production environments from each other. When I go to preview a Prismic document, it opens the site in one of those environment specific containers, apparently losing any cookies that were set by the Prismic dashboard. When I disable the extension, previews work correctly in Firefox.

Awesome thanks for sharing your solution :slight_smile: