question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

TypeError: Failed to construct 'URL': Invalid URL

See original GitHub issue

This is for the chrome extension “axe - Web Accessibility Testing” which I believe is also developed by dequelabs. I was unsure where else to post this error.

Expectation: Not console error

Actual:

Uncaught (in promise) TypeError: Failed to construct 'URL': Invalid URL
    at y (content.bundle.js:33)

Motivation: So I can read more important console errors relating to development


axe - Web Accessibility Testing version: 4.8.4

Browser and Assistive Technology versions
Browser: Chrome 88.0.4324.190 (Official Build) (64-bit)
Operating System: Windows 10

This occurs on any page, even Google. The error usually occurs image image

multiple times.

Thanks.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:2
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
stephenmathiesoncommented, Mar 3, 2021

Close, but not quite!

We were trying to construct an instance of a URL for communicating with the axe API server (https://axe.deque.com) before the server’s URL is set. We keep the server’s URL in the extension’s storage. The code looked something like this:

var stored_url = await get_from_browser_storage('axe_server_url')
var url = new URL(stored_url)

The fix resembles:

var stored_url = await get_from_browser_storage('axe_server_url')
var url = new URL(stored_url || DEFAULT_SERVER_URL)
1reaction
LouiseWoodhams24commented, Mar 3, 2021

Thanks for letting me know the fix 😄 and super thanks for looking into fixing it so quickly ❤️

Read more comments on GitHub >

github_iconTop Results From Across the Web

DevTools Error: Failed to construct 'URL': Invalid URL #6145
Error Message: Failed to construct 'URL': Invalid URL Stack Trace: TypeError: Failed to construct 'URL': Invalid URL at new URLShim ...
Read more >
TypeError: Failed to construct 'URL': Invalid URL - Treehouse
Hello, I'm attempting to use images and videos in my react component and I'm receiving one of two errors. Where I try the...
Read more >
Failed to construct 'URL': Invalid URL in chrome extension v3 ...
javascript - Uncaught TypeError: Failed to construct 'URL': Invalid URL in chrome extension v3 when using messages - Stack Overflow. Stack ...
Read more >
Uncaught TypeError: Failed to construct 'URL': Invalid base ...
I'm trying to develop my first android app using ionic 6 and vue 3, but I'm having this problem: “Uncaught TypeError: Failed to...
Read more >
error extensions.js:2897 Uncaught TypeError: Failed to ...
chrome extension: error extensions. js:2897 Uncaught TypeError: Failed to construct 'URL': Invalid URL : r/learnjavascript.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found