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.

Failed to construct 'URL': Invalid URL

See original GitHub issue

Problem

In rare circumstances, the fcl-js constructs an invalid URL (with an undefined prefix), which prevents users from using some functionality (e.g. sending transactions).

Initially, I thought that this issue was on our side - e.g. we were accidentally calling fcl.set with an undefined value. Although now that I’ve managed to reproduce it this doesn’t seem likely, as the values that we pass in are valid (see “setting fcl-js config” console logs).

Here is a demo video where I managed to reproduce it consistently. Notice the “setting fcl-js config” logs in the console (also evident in the below screenshot) - these logs are emitted every time we update our fcl-js config in the application code.

https://user-images.githubusercontent.com/36109955/195868158-49928f2c-37f9-450c-8128-ddca93f551e9.mov

Screenshot of all console logs:

Screenshot 2022-10-14 at 16 09 48

Steps to Reproduce

This error is hard to reproduce (managed to reproduce it once), so I’m not sure about the context or possible causes.

Acceptance Criteria

The service URL should have a valid value.

Context

We are working on the first Flowser desktop app release.

Issue Analytics

  • State:open
  • Created a year ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
huyndocommented, Nov 10, 2022

@bartolomej I saw this during my fix of the caching issue as well. Do you mind double checking but this should fix it.

1reaction
gregsantoscommented, Oct 14, 2022

Ok, feel free to keep me posted here and good luck. Need to make sure those values are defined before setting via config, AND config is updated before attempting to use them elsewhere (i.e. when calling fcl.authnenticate)

Read more comments on GitHub >

github_iconTop Results From Across the Web

DevTools Error: Failed to construct 'URL': Invalid URL #6145
Initial URL: https://www.bbc.com/sport ; Chrome Version: 69.0.3497.100 ; Error Message: Failed to construct 'URL': Invalid URL ; Stack Trace:.
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 ...
So, i see the possible solution(how to get real error message). I've set breakpoint on failed line and check the runtimeError message.
Read more >
Errors in the sharepoint framework application? - Microsoft Q&A
We can keep the server's URL in the extension's storage to fix Failed to construct 'URL': Invalid URL . The code looked something...
Read more >
error extensions.js:2897 Uncaught TypeError: Failed to ...
chrome extension: error extensions.js:2897 Uncaught TypeError: Failed to construct 'URL': Invalid URL.
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