SvelteKit previews not working? 404 not found

Hi Prismic team!

I'm just trying to set up draft previews for a SvelteKit site I'm working on, the Slice previews are working really well, but the draft preview is giving me a 404 not found when I try to use them.

I followed the section of this page to set up previews (most of it is done when SliceMachine is set up, pretty straight forward):

I also added the site url which is currently sitename.netlify.app — and the /api/preview as the preview route.

When I try to use the preview in Prismic dashboard, I get this url:

https://sitename.netlify.app/preview/?token=https%3A%2F%2Freponame.prismic.io%2Fpreviews%2FZ_p25hEAACEA_hRl%3FwebsitePreviewId%3DZ_qCJxEAACMA_iZ2&documentId=Z_Z3rREAACIA97pU

Is this correct? It's strange that the slice previews are working but not the draft previews.

Thank you for any help.

Edit: this is what appears in console on the preview url:

script.js:1 
            Failed to load resource: net::ERR_BLOCKED_BY_CLIENT
preview/:1 
            Failed to load resource: the server responded with a status of 404 ()
preview/:1 
            The resource https://sitename.netlify.app/_app/immutable/assets/0.DITGXp8X.css was preloaded using link preload but not used within a few seconds from the window's load event. Please make sure it has an appropriate `as` value and it is preloaded intentionally.

`

Hi @andrew4,

Have you had a look at our Troubleshooting: Content Previews guide? Your preview toolbar needs to be added to your 404 page :slight_smile: Let me know if that works for you!