ChrisNZL / Fauxbar

An alternative to Chrome's Omnibox.
https://chrome.google.com/webstore/detail/fauxbar/hibkhcnpkakjniplpfblaoikiggkopka
MIT License
89 stars 13 forks source link

Issue with reapplyKeywords #27

Closed ChrisNZL closed 6 years ago

ChrisNZL commented 6 years ago

From https://github.com/ChrisNZL/Fauxbar/issues/13#issuecomment-345238905

https://github.com/ChrisNZL/Fauxbar/blob/master/Fauxbar/js/background-new.js#L1634 Looks like a bug with Fauxbar's reapplyKeywords function for keywords/tags that you can manually assign to results. Seems it's trying to delete a tag for a URL that is no longer in your history while iterating over the retrieved tags which is throwing an out-of-range issue since the results array has changed due to the delete (but never gets committed due to the error being thrown, so the bug frequently happens).

Temporary fix

Until I roll out a new version, temporary fix involves deleting your keywords. If you want to backup your keywords first, export Fauxbar's options via:

To delete your keywords:

  1. Open a Fauxbar tab.
  2. Press F12 to open Chrome's dev panel.
  3. Click the Console sub-tab.
  4. Paste in:
    if (openDb()) {
    window.db.transaction(function(tx){
        tx.executeSql('DELETE FROM tags');
    }, function(t){
        errorHandler(t, getLineInfo());
    });
    delete localStorage.backup_tags;
    }
  5. Press Enter. This will clear the SQLite tags table, and delete LocalStorage's tags.
  6. Lastly, go Fauxbar > Options > Management > Database > Rebuild button. The database will be rebuilt without any tags.
fhoshino commented 6 years ago

After clearing the tags, rebuild the database, and import the settings back, the problem still exist.

ChrisNZL commented 6 years ago

Don't import the settings back yet - that's for after when once the bug is fixed. Reimporting the settings adds the tags back which is part of the bug at the moment.

ChrisNZL commented 6 years ago

Should be fixed now for v1.7.1.