Skip to content

[🐞] Race condition with atomics (TypeError: can't access property "$location$", env is undefined) #688

@briancarbone

Description

@briancarbone

Describe the bug

Every other hard refresh encounters this error when loading scripts. Randomly, assets will take an extra 5 seconds to load as well... I'm not sure what the relation between this issue and that timeout.

00:00:53.650 Main 🌎 Created Partytown web worker (0.11.2) partytown-atomics.js:221:23
00:00:53.737 InstallTrigger is deprecated and will be removed in the future. partytown-atomics.js:665:17
00:00:53.737 onmozfullscreenchange is deprecated. partytown-atomics.js:665:17
00:00:53.737 onmozfullscreenerror is deprecated. partytown-atomics.js:665:17
00:00:53.747 Partytown 🎉 Initialized web worker partytown-ww-atomics.js:403:31
00:00:53.747 Main 🌎 Registered top window 1 partytown-atomics.js:221:23
00:00:58.557 TypeError: can't access property "$location$", env is undefined
    resolveBaseLocation https://example.com/~partytown/debug/partytown-ww-atomics.js?v=0.11.2:833
    resolveToUrl https:/example.com/~partytown/debug/partytown-ww-atomics.js?v=0.11.2:844
    receiveMessageFromSandboxToWorker https://example.com/~partytown/debug/partytown-ww-atomics.js?v=0.11.2:1948
    receiveMessageFromSandboxToWorker https://example.com/~partytown/debug/partytown-ww-atomics.js?v=0.11.2:1978
    EventHandlerNonNull* https://example.com/~partytown/debug/partytown-ww-atomics.js?v=0.11.2:2075
    <anonymous> https://example.com/~partytown/debug/partytown-ww-atomics.js?v=0.11.2:2077
partytown-ww-atomics.js:1969:37
00:00:58.564 TypeError: can't access property Symbol(), instance is undefined partytown-ww-atomics.js:188:59
00:00:58.701 Worker (1) 🎉 Created top window 1 environment partytown-ww-atomics.js:403:31
00:00:58.721 Main 🌎 Executed top window 1 environment scripts in 4973.6ms partytown-atomics.js:221:23
00:00:58.721 Worker (1) 🎉 Initialized top window 1 environment 🎉 partytown-ww-atomics.js:403:31

Reproduction

https://www.unifyr.com/

Steps to reproduce

Hard refresh (ctrl + shift + R).

Browser Info

Firefox 143.0.3

Additional Information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions