Skip to content
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

Error on macos Chrome - Uncaught TypeError: Cannot read properties of null (reading 'appendChild') #232

Open
leafOfTree opened this issue Sep 24, 2024 · 4 comments · May be fixed by #233
Open
Labels
bug Issue that confirms something is incorrect

Comments

@leafOfTree
Copy link

leafOfTree commented Sep 24, 2024

image

"document.head" is null at the runtime. Not sure if it only occurs on macos. I've created a PR to fix it #233

Reproduce steps

  1. Open Chrome on macos
  2. Load this extension
  3. Launch a new project created by svelte-kit
  4. Open devtools Svelte tab
  5. Click on reload
  6. See the error in console, Svelte tab is not reloaded

Expected behavior
No error, Svelte tab should show components

Environment

  • Browser with version [macos, chrome128]
  • Devtools version [chrome extension store and built from master]
  • Svelte version [^4.2.7]
@leafOfTree leafOfTree linked a pull request Sep 24, 2024 that will close this issue
@ignatiusmb
Copy link
Member

Hey, thanks for reporting this! According to MDN, document.head should never be null, so this might have something to do the chrome.scripting.executeScript() method.

I did turn on injectImmediately back then but I can't seem to remember what problems I encountered without it. Unfortunately, I don't have any access to any macOS machine, it would be great if you could try turning this setting off and see if the error still occurs. I'll try to check back here after I can verify the expected behaviors

@leafOfTree
Copy link
Author

Thanks for your reply.
It does work if I turn the setting off.

@ignatiusmb ignatiusmb added the bug Issue that confirms something is incorrect label Sep 24, 2024
@jalalmanafi
Copy link

jalalmanafi commented Oct 9, 2024

I am using this extension on MacOS machine and with Google Chrome , it works properly

@gabrielstellini
Copy link

I am getting this issue on Linux Mint in Chrome 129.0.6668.100 (Official Build) (64-bit). I have no other chrome extensions enabled. Hard reloads do not fix the issue.
The extension fails to load, even on the "SvelteKit demo app" (default app when creating a new project)

Interestingly enough, when I try it on firefox, the extension works - so it does not seem to be project related.
This is what the extension looks like after the error:

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue that confirms something is incorrect
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants