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.

4.3.1 stop working on production

See original GitHub issue

Hi, Since yesterday our projects that use Comlink stop working.

Downgrading the package solved the problem: Screenshot 2021-05-13 at 09 54 34

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 Screenshot 2021-05-13 at 10 37 01

Issue Analytics

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

github_iconTop GitHub Comments

2reactions
igutocommented, May 17, 2021

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.

1reaction
maksnestercommented, May 26, 2021

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 🙃

this to be a minor version bump

@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.

Read more comments on GitHub >

github_iconTop 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 >

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