0

I recently made a Chrome extension that I assumed worked fine. However, when I tried to use it in another Chrome window under another Chrome account, it didn't work.

I then tried loading the unpacked version in both windows under the two chrome accounts. The first account/window it worked fine.

The second one I got an error saying it couldn't register the service worker. See below.

firstuser@gmail.com

enter image description here

seconduser@gmail.com

enter image description here

When I look closer at the error, it simply says it cannot register the service worker.

enter image description here

I am confused because it's the same unpacked code base but for one user it doesn't load. The other user it works normal. Any ideas why this would happen?

The source code for the extension can be found here.

I also looked at these answers and this one but they didn't help much.

EDIT

I checked both chrome policies and they are identicial. Is there another place/set of properties that I should look for?

firstuser@gmail.com

enter image description here

seconduser@gmail.com

enter image description here

Matt Croak
  • 2,788
  • 2
  • 17
  • 35
  • Code 2 means "operation was aborted". Maybe there's an antivirus or a disk problem or a bug in Chrome. A workaround is to remove the background script and use default_popup instead. If you don't want to show a UI then just close it immediately after executeScript via window.close(). – wOxxOm Mar 21 '23 at 22:18
  • @wOxxOm so I had to include a custom pop up bc the default pop up actually defocuses the document which prevents copying to the clipboard. I’m guessing the disk is ok since the separate accounts are operating in the same machine just different windows. Maybe it’s a setting in the other account? – Matt Croak Mar 22 '23 at 01:51
  • I'm not aware of any setting that breaks SW registration. Try comparing `chrome://policy` contents. – wOxxOm Mar 22 '23 at 11:51
  • @wOxxOm I checked the chrome://policy for each window and they appear the same :/ I added them to the question. Are there other policies I should look for? – Matt Croak Mar 23 '23 at 15:09
  • There are no policies in the screenshots. I have no more ideas. – wOxxOm Mar 23 '23 at 15:37

0 Answers0