0

When I try to load an unpacked extension into chrome that is on Chrome Extension Manifest v3 and uses a service worker (including chrome's sample extensions), I get an error message:

Service worker registration failed. Status code: 2

Service worker registration failed. Status code: 2

I can't find anywhere that lists these status codes or what they mean (without diving into the source code).

I downloaded Chrome Canary and the sample extensions work when loaded unpacked.

So, what does status code 2 mean? How is one supposed to recover from it?

1 Answers1

1

Status Code 2 means that operation aborted - it gave up trying to load the service worker. If the same extensions are working on the same device with a different version of Chrome, it may be an issue with the chrome profile - try creating a new chrome profile (or using the guest profile) in your main browser to see if the problem is fixed.

Patrick
  • 13,872
  • 5
  • 35
  • 53
  • Is there a list of error codes somewhere that I could look at? For this to be a fix, I should be able to say what the issue is, so that I can change the profile to allow service workers - idealy it would be something as easy as a setting, but I don't know where to look. – samuelfullerth Mar 23 '23 at 23:46
  • I don't know of documentation for these error codes, but "operation aborted" is a general grab bag of "something bad happened". If it _does_ work with another profile, then it would be indicative of there being a problem with the profile. The next step would be to bisect whatever is installed until you find a cause. More than likely, there is some kind of corruption in the profile, and deleting it then resyncing the account would solve it. – Patrick Mar 26 '23 at 00:51