-
-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
Failing to set <svelte:head>
element with getAttribute is not a function
#15337
Comments
Especially if it happens seemingly randomly it's very important to provide a reproduction. I know it's hard but without a reproduction we would have no way to know if something else in your setup is causing this problem. At very minimum we need a repo where you know it could happen from time time, even better if you have a clear reproduction steps. |
I've forgot to add the disclaimer from the previous issue. I know reproductions are important, I would have loved to create an MRE, but it was just impossible. This issue is more for documentation, hoping that someone else or future-self can benefit from. Will add one if viable. Thanks for the comment. You can close both as off-topic if you desire. |
If the bug is there we need to fix it...we just need a jump start to not waste hours on something that might not be an issue. |
@hyunbinseo some things that might help you narrow down the reproduction Can you
|
<!-- [ -->
<!-- seems to exist here in-between the comment and the link element -->
<link rel="icon" href="/src/lib/static/logo.svg?no-inline">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<!--[--><script type="text/javascript" nonce="e27035d7e842472f84c3ac211fa" src="//local.adguard.org?ts=1740104669736&type=content-script&dmn=localhost:5173&url=http%3A%2F%2Flocalhost%3A5173%2Fblank&app=firefox.exe&css=2&js=1&rel=1&rji=1&sbe=0&stealth=1&st-loc&st-dnt"></script>
<script type="text/javascript" nonce="e27035d7e842472f84c3ac211fa" src="//local.adguard.org?ts=1740104669736&name=AdGuard%20Extra&name=AdGuard%20Popup%20Blocker&type=user-script"></script><link rel="icon" href="/src/lib/static/logo.svg?no-inline"><!--]-->
</head>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<!--[-->
<script
type="text/javascript"
nonce="e27035d7e842472f84c3ac211fa"
src="//local.adguard.org?ts=1740104669736&type=content-script&dmn=localhost:5173&url=http%3A%2F%2Flocalhost%3A5173%2Fblank&app=firefox.exe&css=2&js=1&rel=1&rji=1&sbe=0&stealth=1&st-loc&st-dnt"
></script>
<script
type="text/javascript"
nonce="e27035d7e842472f84c3ac211fa"
src="//local.adguard.org?ts=1740104669736&name=AdGuard%20Extra&name=AdGuard%20Popup%20Blocker&type=user-script"
></script><link rel="icon" href="/src/lib/static/logo.svg?no-inline" />
<!--]-->
</head> |
It looks like AdGuard injects two scripts with |
I still don't get why this happens randomly though. I've only experienced this 3 times at 10/10, 10/15, and 2/19. I did not modifying the source code at all as mentioned above. I am curious if @bobvork is an Adguard user #15336 (comment) |
Ever since moving to Svelte 5, I have also been seeing this error appear in sentry.io for an extremely small portion of users. The stack traces point to the first line inside a I haven't been able to reproduce at all so far. I tried installing AdGuard and it didn't trigger it for me. There is nothing special about my code. It's effectively the official SvelteKit template with TS, Tailwind, and a meta tag that uses a variable, like in OP's post. |
Describe the bug
This Svelte code randomly causes the following issue:
Caution
Uncaught (in promise) TypeError: element2.getAttribute is not a function
Reproduction
Failed to create a reproduction.
It suddenly happens without changing a single-line of code in an existing, working, error free code-base.
Attempt for debugging documented in this issue:
TypeError: element2.getAttribute is not a function
#15336Logs
System Info
Severity
annoyance
The text was updated successfully, but these errors were encountered: