google-chromegoogle-chrome-extensionchrome-web-store

Corrupt chrome extensions and user retention


I have a decently popular Chrome extension, and yesterday I accidentally released a corrupted version of it, and didn't catch it for 10 hours. Within those 10 hours, the extension was updated for most users and I lost about half of them over the night based off of my Google Analytics reports (I had about 600 pageviews every 30 minutes, and now I only have 285). When I found out about my mistake I quickly reverted to an older version that works, but now, about 30 hours after an update that fixes the corruption, my pageviews are still the same.

My questions are:

Any insight would be fantastic. As you can imagine, losing half your users over night because of 1 line of code is difficult to process.


Solution

  • What could have happened?

    Well, this isn't a really clear situation, but, based on your information, there are a few possible scenarios:

    1. Your users have uninstalled your extension because of this corrupt version. In this case (the worst one), it's pretty impossible to bring your users back, unfortunately.

    2. Your "corrupted" version had issues with the update handling. For example issues with chrome.runtime.onInstalled to check the update and add new features, or issues with the Analytics part. This means that:

      1. Your extension worked fine before the update.
      2. It has been updated with a broken update handling function/method.
      3. The new update (rollback to a working version) didn't solve anything, because your already corrupted extension is now unable to apply updates and/or send page views to analytics.
    3. Your users disabled your extension in an attempt to narrow the issues (that's very uncommon, an edge case).

    4. Your users didn't get the new update yet (which after thirty hours is also pretty uncommon).

    What could you do?

    Again, let's split the situation up:

    1. In the first case, you cannot really do anything, unfortunately. That was a bad mistake! Learn from it and always test a thousand times before pushing updates.

    2. Thinking about the second case? You should test your corrupted version on your machine, maybe using Chrome Canary to make things faster. This obviously means that you should have the previous versions stored somewhere; if you haven't got them, then it gets pretty hard, and for the future: always keep backups of your previous versions. Installing the old version, then manually updating to the corrupted one, and finally to the last one, can really help you understand what's going on. You should meticulously check the update method and see if there's something wrong.

      Note: if you're not listening to chrome.runtime.onUpdateAvalilable and manually calling chrome.runtime.reload() to update your extension immediately, a Chrome restart may be necessary for it to update.

    3. Just wait, although that's uncommon for this situation to happen, but this also is the only thing you can do in such cases.

    4. Well, same as case #3.


    If an extension is corrupt does it still check for updates or do the users have to press repair?

    Well, there's no such thing as a "corrupted extension". Chrome will always check for updates (at least if the user didn't disable them in the chrome://flags), even if your extension is just a bunch of SyntaxErrors. Don't worry about this.

    Extreme fix

    In case that you're not sure about what to do, a re-design of your extension and a drastical purge from all the to-dos and bad practices is always a good thing. Just backup your previous version first, and start working on the 2.0 beta! Possibly, updating and improving the extension will bring much more users to it than just solving an existing issue. Personally, I almost always experienced an installation increase performing drastic restyles and re-writing better code from scratch.


    I wish you to find the problem and bring your users back ASAP.

    As you can imagine, losing half your users over night because of 1 line of code is difficult to process.

    Yes, I do imagine. As an extension developer I really suffered for similar mistakes when I was learning update handling. So... well, break a leg! Wish you the best.