Garbage characters in approved Chrome Extension

Viewed 42

Trying to solve a mystery here... Submitted an extension update and it was approved last night and I rolled it out shortly after. I discovered that a JS error was thrown in the newly rolled out release...

Invalid or unexpected token

This error was not thrown in the build submitted for review. After inspecting the compiled js in the rolled out version, I discovered a bunch of garbage characters that were not present in the uploaded extension...

enter image description here

I'm wondering if the extension was got corrupted in the review process? Has this happened to anyone else? I've submitted a new build for review with no changes and am hoping that this one will not have these garbage characters.

enter image description here

1 Answers

Someone don't want to admit it, but it happens more than you want to believe.

There are certain characters that are not always digested by the publication / review process.
The same character once passes and another time it gets busted.
It happened to me with the character §
In short, I suggest you to avoid these characters or use their escape sequence instead (i.e. space =   =  )
If this translation has had persistent implications, such as having incorrectly set items of some storage system (localStorage, chrome.storage indexedDB etc.), after replacing your character with the corresponding escape sequence, you will also have to try to put a patch on it to restore the expected value of such variables \ objects.
In my specific case I had to insert some code inside the onInstalled event handler checking if the user is updating from that "faulty" version.

Related