june07/NiM

Users reports of 'This extension has been corrupted' on install...?!

june07 opened this issue ยท 19 comments

I've not been able to duplicate on my end. Maybe someone has an idea about what this might be and would like to lend a hand...

First of all this extension is real time server.
Second I got This extension has been corrupted every time I click on the toolbar icon.

  • My operating system is Linux Mint 18 Sarah
  • Node version is v8.9.0
  • NIM version is 0.14.2

If you need more information or some logs I will provide them.

tl;dr temporary workaround:
If the user never clicks on the extension toolbar icon, NiM functions correctly and can be configured via the Options link in the chrome://extensions interface.

I get this error consistently on my Linux (Ubuntu 17.10) Chrome with no other extensions installed.

details from chrome://version:
Google Chrome: 61.0.3163.79 (Official Build) (64-bit)
Revision: 2bd57c7d956c47bc51eff132dd114136ec0a6db7-refs/branch-heads/3163@{#1092}

Steps to reproduce:

  • Install extension v0.14.2 from the chrome web store
  • The NiM icon appears in the extension toolbar
  • Click on the icon in the toolbar
  • The icon disappears (presumably because something happened to make Chrome mark the extension 'corrupted')
  • Navigate to chrome://extensions
  • The error message reads: This extension may have been corrupted in red
  • Click Repair -> Popup -> Repair extension and the extension is re-downloaded and re-enabled
  • Attempts to debug via the inspect views: background.html fail. When the toolbar icon is clicked and the extension is "corrupted" the debug window is immediately closed.
  • After the extension is repaired: Click on Options and the options.html opens fine (thus, the temporary workaround mentioned at the top of this post)

This is nigh impossible to debug as installing it from an unpacked local dir works fine.
My steps:

  • From the command line:
cp -r ~/.config/google-chrome/Default/Extensions/gnhhdgbaldcilmgcpfddgdbkhjohddkj/0.14.2_0 /tmp/nim
rm -rf /tmp/nim/_metadata # chrome won't load extension w/ _metadata dir
  • Navigate to chrome://extensions
  • Enable the Developer mode checkbox
  • Make sure no existing NiM extension is installed
  • Click the Load unpacked extension... button
  • In the Select the extension directory. dialog open the /tmp/nim dir

Everything works fine now...(i.e. clicking the extension toolbar icon does not cause chrome to mark the extension 'corrupted')

I have no idea...

@mckaydavis THANKS for your work on this!

ga-tb commented

I see the same problem.

My operating system is Ubuntu 17.10
Node version is v8.8.1
NIM version is 0.14.3
Chrome version is 62.0.3202.94 (Official Build) (64-bit)

The workaround from @mckaydavis wasn't enough for me because my app uses a custom port and url, and I couldn't see a way to set these from the options page.

I made an attempt to debug it... Alas; the problem disappeared when I attempted to observe it! (Edit: just saw the same steps were made by mckaydavis)

Steps

  • Enable Developer Mode for chrome extensions
  • Disable the extension
  • Click Load Unpacked Extension
  • Navigate to the extension directory, for me that's ~/.config/google-chrome/Default/Extensions/gnhhdgbaldcilmgcpfddgdbkhjohddkj/0.14.3_0
  • Open and Enable

Now everything works as expected... ๐Ÿ˜•

There is one warning that appeared on the extension page during developer mode. Not sure if it's relevant:

There were warnings when trying to install this extension:
_metadata is a reserved directory that will not be allowed at the time of Chrome Web Store upload.

For a temporary workaround, installing the CRX https://github.com/june07/NiM/releases file directly should work. Can anyone confirm...

@june07 ๐Ÿ‘ confirmed the CRX works.

I just downloaded NiM-0.14.5.crx and dragged the CRX file onto the Chrome window to install. Everything appears to work fine and clicking on the icon shows the options menu. ๐Ÿ’ฏ

To further verify, I uninstalled NiM and installed it from the chrome web store. It still shows the same 'This extension may have been corrupted' message in chrome://extensions. ๐Ÿ˜ข

Yeah, I spent more time that I would have liked trying to track down the root cause!? For now I hope the majority of users experiencing the problem will find this workaround!

@mckaydavis THANK YOU for your continued support and feedback on this! Helped a ton having someone to work with on it.

Just in case anyone trying to drag and drop, do this within the chrome://extensions

jnv commented

I wonder, it looks like only Linux is affected? I used to get this error on Ubuntu 17.04 some time ago, now on macOS with Canary NiM works fine from WebStore.

@hellsinglord22 Thanks. Will update install page to reflect that important tidbit!

@jnv No, I'm seeing reports from every OS including macOS and Windows, and I had it happen to me in ChromeOS.

Happens for me. Ubuntu, Drag Drop does the same thing as normal store install, crashes when you press the icon. Can use options from the chrome://extensions tab

Same as Kamshak :(

Same issue here - works in Chromium, but in Chrome, the icon disappears as soon as I click it.

Not sure, Chromium is unstable and crashes on occasion when a new window/tab is opened automatically by NIM. It also starts to accumulate higher and higher CPU usage to the point of slowing everything down. This running on an 8700K. Definitely not NIM's fault - but I would like to have used it in the stable release of Chrome - which I can't.

I'm appalled at how debugging in Node is treated as an afterthought - whereas in any other mature language debugging is a core part of the developer experience. But that's a topic for another thread...

Can you guys retry? I think this is fixed on chrome extension v2.0.2.