4.3.1 stop working on production
See original GitHub issueHi, Since yesterday our projects that use Comlink stop working.
Downgrading the package solved the problem:
Is there anything in this 4.3.1 release that I should do for the workers?
Here’s a simple example that was not working:
importScripts("https://unpkg.com/comlink/dist/umd/comlink.js");
const ApiWorker = {
fetch: async (url, options = {}) => {
try {
const res = await fetch(url, options)
const json = await res.json()
return [json, !res.ok]
} catch (error) {
console.warn('At api.worker.js -> ', error, url)
return [error, true]
}
}
}
Comlink.expose(ApiWorker)
Debugging it looked like this promise never ended. No error, no feedback. Just didn’t end. I tried the same code without the worker and it worked perfectly.
Thanks,
Edit: Changing to 4.3.0 did also work
Issue Analytics
- State:
- Created 2 years ago
- Reactions:4
- Comments:12 (2 by maintainers)
Top Results From Across the Web
Doctor's Report of MMI/Permanent Partial Impairment
Use this form: 1. When rendering an opinion on MMI and/or permanent partial impairment; or 2. In response to a request by the...
Read more >EF 4.3.1 Migration - how to downgrade a production database?
I have been looking at how to produce a downgrade in EF 4.3.1 ... I avoid running a SQL script if I want...
Read more >4.3 Attribution of depreciation and amortization
Units-of-production depreciation is based on the premise that depreciation of a productive asset is a function of usage, not time.
Read more >dafi36-2406.pdf - Air Force
By Order of the Secretary of the Air Force, this Guidance Memorandum immediately implements changes to Air Force Instruction (AFI) 36-2406, ...
Read more >Aquatic Food Production (ESS 4.3.1 - .4.3.3) - YouTube
The "Big Ideas" to this section are: * Aquatic systems provide a source of food production.* Unsustainable use of aquatic ecosystems can ...
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 FreeTop 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
Top GitHub Comments
hi, @dy-byron I had similar problem. in my case, worker was running with comlink@4.3.1, but main was running with 4.3.0. After I update comlink version on main, worker works fine. So you might need to update version on main.
I hope this helps.
I have a case when a worker wrapped with comlink lives in a separate npm package and uses comlink
4.3.0
, and I have a library that uses that worker with comlink. The library had a range version^4.3.0
. So when a client app installs that library, it fetches comlink 4.3.1 and everything got broken 🙃@surma but breaking changes are supposed to change major version… Though #475 looks innocent and doesn’t change API itself, it is still a literally breaking change as this issue shows.