Worker: true error Failed to execute 'open' on 'XMLHttpRequest': Invalid URL
See original GitHub issueFull error:
Uncaught DOMException: Failed to execute 'open' on 'XMLHttpRequest': Invalid URL
at l._readChunk (blob:http://localhost:8080/0b8053c6-ba21-4708-8fbe-cf0ee7c7f2ed:1:7241)
at l._nextChunk (blob:http://localhost:8080/0b8053c6-ba21-4708-8fbe-cf0ee7c7f2ed:1:6870)
at l.stream (blob:http://localhost:8080/0b8053c6-ba21-4708-8fbe-cf0ee7c7f2ed:1:6977)
at Object.parse (blob:http://localhost:8080/0b8053c6-ba21-4708-8fbe-cf0ee7c7f2ed:1:1097)
at f.onmessage (blob:http://localhost:8080/0b8053c6-ba21-4708-8fbe-cf0ee7c7f2ed:1:18176)
The code - which works fine when I don’t include worker: true
:
function downloadWeather(location: string) {
weather[location] = [];
let rowNumber = 0;
Papa.parse(`/data/WeatherRaw${location}.csv`, {
download: true,
dynamicTyping: true,
header: true,
worker: true,
step(row: any) {
weather[location].push(row.data as RawWeatherType);
},
complete() {
console.log('Weather downloaded for ' + location);
},
});
}
The only two things I can think of are a bug in the library (unlikely), or that I need to set up something special in webpack to work with webworkers? Here’s my webpack file: https://github.com/toddmedema/electrify/blob/master/shared/webpack.shared.js
Issue Analytics
- State:
- Created 4 years ago
- Reactions:2
- Comments:5 (1 by maintainers)
Top Results From Across the Web
Failed to execute 'open' on 'XMLHttpRequest': Invalid URL
This is an invalid URL (just like the error message says). If you have a : after the hostname, it must be followed...
Read more >Failed to execute 'open' on 'XMLHttpRequest': Invalid URL
When trying to connect to RethinkDB through Node's REPL, I have no issue. However, when running the exact same code in my React...
Read more >Failed to execute 'open' on 'XMLHttpRequest' : invalid URL
Hi, I'm new in ionic 3 , I try to make a login post to API, here is my api provider export class...
Read more >failed to execute 'open' on 'xmlhttprequest': invalid url - You.com
I get this error : DOMException: Failed to execute 'open' on 'XMLHttpRequest': Invalid URL. I read I need to replace the port by...
Read more >Invalid URL / Uncaught SyntaxError: Failed to execute 'open ...
Description. Malformed URIs occur when you run encodeURIComponent on something that cannot be encoded.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I’m experiencing the same error, @toddmedema how did you fix/workaround it?
since download and workers don’t work together, I opted for using the fetch api like this:
Don’t know if this is a good solution, but hope it helps someone.