partytown
partytown copied to clipboard
Every calls in workers seem to be triggered twice in Firefox
In Firefox:
In Chrome or Safari:
Also, browing in private mode with Firefox seems to disable workers: "In Firefox, Service Worker APIs are also hidden and cannot be used when the user is in private browsing mode" https://developer.mozilla.org/en-US/docs/Web/API/Service_Worker_API Can we handle it and how should we?
hey @mathieuh - we've just created an issue template, could you update your issue here to provide all the information the template asks for? it'll help us look into your issue https://github.com/BuilderIO/partytown/issues/new?assignees=&labels=&template=bug_report.md&title=
pasting below to make things easier:
Describe the bug A clear and concise description of what the bug is.
To Reproduce Steps to reproduce the behavior:
- Go to '...'
- Click on '....'
- Scroll down to '....'
- See error
Reproduction link Please include a link to a Stackblitz or Codesandbox reproducing the issue. We will need to see the issue reproduced with hand-written code - we can't debug giant minified third party scripts directly. If you do not include a clean and simple reproduction of your issue, we won't be able to look into it until you do.
Expected behavior A clear and concise description of what you expected to happen.
Screenshots If applicable, add screenshots to help explain your problem.
Additional context Add any other context about the problem here.
I can replicate the issue in both Chromium 108 and Firefox 108. Maybe because of the double DOMContentLoaded
/ load
listeners here: https://github.com/BuilderIO/partytown/blob/main/src/lib/main/snippet.ts#L137
Chromium:
Firefox:
Closing this issue since it has become stale, or has been addressed in recent releases and docs updates. If you feel this is still an issue please reopen a new issue. Thanks.