Failed to construct 'URL': Invalid URL
See original GitHub issueProblem
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.
Screenshot of all console logs:
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:
- Created a year ago
- Comments:6 (3 by maintainers)

Top Related StackOverflow Question
@bartolomej I saw this during my fix of the caching issue as well. Do you mind double checking but this should fix it.
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)