# Preview Resolver 404

**URL:** <https://community.prismic.io/t/preview-resolver-404/723>\
**Category:** Developing with Prismic\
**Tags:** nextjs\
**Created:** [June 8, 2020, 11:02pm UTC](https://community.prismic.io/t/preview-resolver-404/723 "2020-06-08T23:02:16Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![jerry.nummi](https://dub1.discourse-cdn.com/flex013/user_avatar/community.prismic.io/jerry.nummi/32/197_2.png) [@jerry.nummi](https://community.prismic.io/u/jerry.nummi)\
**Post date:** [June 8, 2020, 11:02pm UTC](https://community.prismic.io/t/preview-resolver-404/723/1 "2020-06-08T23:02:16Z")

</div>

Hello, (I don't think this is Next.js specific)

I had previews working locally and in production with my Next.js site for a while now but today they stopped working. _Did anything change recently on the Prismic side?_

Here relevant code from `/api/preview.js`:

```auto
export default async function preview(request, response) {
  const token = request.query.token
  const documentId = request.query.documentId
  const previewResolver = await Client(request).getPreviewResolver(token, documentId)

  const url = await previewResolver.resolve(linkResolver, '/')
  ^ 💥

```

Error:  
`{ Error: Unexpected status code [404] on URL https://[repo].cdn.prismic.io/api/v2/documents/search?integrationFieldsRef=...} at .../node_modules/prismic-javascript/dist/prismic-javascript.min.js`

Thanks!

---

<div class="post-metadata">

**Author:** ![Phil](https://dub1.discourse-cdn.com/flex013/user_avatar/community.prismic.io/phil/32/14_2.png) [@Phil](https://community.prismic.io/u/Phil)\
**Post date:** [June 9, 2020, 9:48am UTC](https://community.prismic.io/t/preview-resolver-404/723/2 "2020-06-09T09:48:59Z")

</div>

Hey Jerry,

We are aware of some Preview issues with the updated Next.js kit. We are working hard to get a fix for this.

If we have any updates or need any more info we’ll let you know here.

Thanks.

---

<div class="post-metadata">

**Author:** ![Phil](https://dub1.discourse-cdn.com/flex013/user_avatar/community.prismic.io/phil/32/14_2.png) [@Phil](https://community.prismic.io/u/Phil)\
**Post date:** [June 23, 2020, 9:32am UTC](https://community.prismic.io/t/preview-resolver-404/723/3 "2020-06-23T09:32:40Z")

</div>

Split this topic on June 23, 2020, 9:32am UTC

5 posts were split to a new topic: [Preview error (expired token, 404)](https://community.prismic.io/t/preview-error-expired-token-404/951)

---

<div class="post-metadata">

**Author:** ![Phil](https://dub1.discourse-cdn.com/flex013/user_avatar/community.prismic.io/phil/32/14_2.png) [@Phil](https://community.prismic.io/u/Phil)\
**Post date:** [June 9, 2020, 3:02pm UTC](https://community.prismic.io/t/preview-resolver-404/723/5 "2020-06-09T15:02:02Z")

</div>

@jerry.nummi Can you send me your documentID and the full token in private message so I can test this?

---

<div class="post-metadata">

**Author:** ![Phil](https://dub1.discourse-cdn.com/flex013/user_avatar/community.prismic.io/phil/32/14_2.png) [@Phil](https://community.prismic.io/u/Phil)\
**Post date:** [June 11, 2020, 11:18am UTC](https://community.prismic.io/t/preview-resolver-404/723/7 "2020-06-11T11:18:31Z")

</div>

@jerry.nummi Can you send me the code for your project in a zip or with a link to the github in a private message? We’ll try and debug this.

---

<div class="post-metadata">

**Author:** ![Phil](https://dub1.discourse-cdn.com/flex013/user_avatar/community.prismic.io/phil/32/14_2.png) [@Phil](https://community.prismic.io/u/Phil)\
**Post date:** [June 12, 2020, 9:28am UTC](https://community.prismic.io/t/preview-resolver-404/723/8 "2020-06-12T09:28:39Z")

</div>

@jerry.nummi Can you tell me if you updated your Next.js version before this issue? Can you also confirm that if it’s not working in both your local and production?

Thanks.

---

<div class="post-metadata">

**Author:** ![jerry.nummi](https://dub1.discourse-cdn.com/flex013/user_avatar/community.prismic.io/jerry.nummi/32/197_2.png) [@jerry.nummi](https://community.prismic.io/u/jerry.nummi)\
**Post date:** [June 12, 2020, 6:46pm UTC](https://community.prismic.io/t/preview-resolver-404/723/9 "2020-06-12T18:46:32Z")

</div>

Hey @Phil, Previews are working again. ¯\_(ツ)\_/¯

---

<div class="post-metadata">

**Author:** ![Phil](https://dub1.discourse-cdn.com/flex013/user_avatar/community.prismic.io/phil/32/14_2.png) [@Phil](https://community.prismic.io/u/Phil)\
**Post date:** [June 15, 2020, 9:02am UTC](https://community.prismic.io/t/preview-resolver-404/723/11 "2020-06-15T09:02:59Z")

</div>

Weird haha

Let me know if you see any other issues.

---

<div class="post-metadata">

**Author:** ![Phil](https://dub1.discourse-cdn.com/flex013/user_avatar/community.prismic.io/phil/32/14_2.png) [@Phil](https://community.prismic.io/u/Phil)\
**Post date:** [June 23, 2020, 9:35am UTC](https://community.prismic.io/t/preview-resolver-404/723/15 "2020-06-23T09:35:46Z")

</div>

Unlisted on June 23, 2020, 9:35am UTC



---

<div class="post-metadata">

**Author:** ![Phil](https://dub1.discourse-cdn.com/flex013/user_avatar/community.prismic.io/phil/32/14_2.png) [@Phil](https://community.prismic.io/u/Phil)\
**Post date:** [June 23, 2020, 9:35am UTC](https://community.prismic.io/t/preview-resolver-404/723/16 "2020-06-23T09:35:53Z")

</div>

Archived on June 23, 2020, 9:35am UTC



---

<div class="post-metadata">

**Author:** ![Phil](https://dub1.discourse-cdn.com/flex013/user_avatar/community.prismic.io/phil/32/14_2.png) [@Phil](https://community.prismic.io/u/Phil)\
**Post date:** [September 15, 2020, 4:46pm UTC](https://community.prismic.io/t/preview-resolver-404/723/17 "2020-09-15T16:46:12Z")

</div>

closed on September 15, 2020, 4:46pm UTC, flag & select 'Something Else' to reopen.



---

<div class="post-metadata">

**Author:** ![Pau](https://dub1.discourse-cdn.com/flex013/user_avatar/community.prismic.io/pau/32/5422_2.png) [@Pau](https://community.prismic.io/u/Pau)\
**Post date:** [December 15, 2022, 6:25pm UTC](https://community.prismic.io/t/preview-resolver-404/723/18 "2022-12-15T18:25:45Z")

</div>

Listed on December 15, 2022, 6:25pm UTC


