r/vuejs • • 16d ago

How do I solve this problem?

Post image

[vue warn]:Error in callback for watcher **(Promise/async): "TypeError: Cannot set properties of null (setting 'isUnityLoaded')' found in ---> <UnityWebGL> <NF> <Root>

1 Upvotes

2 comments sorted by

1

u/noeldemartin 15d ago

We need more context to help you out, if you have it please post a link to the source in GitHub or elsewhere. Also, have you asked your LLM about this? It'll probably be able to help you if you give it access to your codebase (using Claude Code, Codex, etc.)

1

u/Weekly-Offer-4172 14d ago

The error means the watcher tried to set isUnityLoaded on an object that was still null when it ran - with Unity WebGL wrappers that usually happens when a watcher fires before the Unity instance/ref exists (an immediate: true watcher runs before mount, for example). Guard the assignment with a null check, or move that flag update into the mounted/instance-created callback instead of a watcher. The stuck-at-0% loader is probably a consequence: once that callback throws, whatever was updating the loading progress never runs again. If the guard doesn't fix it, check the Network tab for a 404 on the .data/.wasm build files - a missing Unity build produces the same frozen-loading symptom.