-
Notifications
You must be signed in to change notification settings - Fork 441
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
404 error for the resource "/~partytown/debug/partytown-sandbox-sw.html?1665944529123" when integrating with Nextjs #283
Comments
Almost all developers have this problem and there is no solution for it apparently. |
@baharmf93 Check out this reply #107 (comment), maybe you will find it helpful. |
I came across the same 404 error for the resource "/~partytown/debug/partytown-sandbox-sw.html." In my case, this issue was not related to any specific integration type, such as Next.js, but seemed to be caused by a setting in the browser's developer tools. Here's what worked for me to resolve this issue: Navigate to the Inspector.
By unchecking "Bypass for network," I allowed the service worker to handle the self.fetch request for the HTML file. This made sense in my situation, as the file is not meant to exist outside of the service worker. When the service worker called "/~partytown/debug/partytown-sandbox-sw.html," it provided a response. I observed this behavior in the partytown-sw.js file. Additionally, I noticed comments mentioning incorrect service worker registration. Ensuring that the service worker is registered correctly is essential for proper functionality. Double-check your registration process to avoid potential issues. This solution may not work for everyone, but it did work for me so I wanted to share it. Maybe even this explanation could be added to the documentation to help others facing similar issues. |
Getting the same issue with 404 in GSC. |
nope |
any workarounds? |
Describe the bug
Hi team, this is a great library, but when I try to integrate Partytown to my nextjs Project, I've got some bugs on Chrome, Safari still works fine.
Specifically, on Chrome,
with the first load of the page, everything works fine
but when I reload the page 2nd I get a 404 not found error sending a request to get file partytown-sandbox-sw.html(http:// localhost:3000/_next/static/~partytown/debug/partytown-sandbox-sw.html?1665944529123). In Partytown's documentation it mentioned that if this request fails, then the service worker is not installed correctly:
To Reproduce
Steps to reproduce the behavior:
npm install && npm run dev
Reproduction link
My codesandbox here but it has
cross-origin frame
issueExpected behavior
it should not error everytime I reload the page
Partytown version
What version of Partytown you are using, e.g.
0.7.1
Screenshots
Additional context
components/HeadLayout.js
:pages/index.js
:11.1.4
The text was updated successfully, but these errors were encountered: