ChrisNZL / Fauxbar

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

can't edit tiles #71

Closed fadster closed 2 years ago

fadster commented 2 years ago

For some reason, my saved tiles disappeared so I tried adding them back manually. When I try to enter the page URL for a tile, nothing happens. Pressing enter or clicking the + button have no effect. I see this error message repeating several times in the console:

Error in event handler: TypeError: Error in invocation of history.search(object query, function callback): Error at parameter 'query': Error at property 'maxResults': Invalid type: expected integer, found number.
    at refreshHistoryMenu (chrome-extension://hibkhcnpkakjniplpfblaoikiggkopka/js/menubar.js:704:17)

Also, wasn't there a way to pin or delete tiles when they are generated automatically? I don't see these options anymore.

ChrisNZL commented 2 years ago

With Fauxbar 1.8.1, menubar.js, line 704:

function refreshHistoryMenu() {
    chrome.history.search({text:'', maxResults:parseInt(localStorage.option_historyMenu_numberOfItems)}, function(historyItems){
        $('menu[history]').html('<menuName>History</menuName><items><group></group></items>');

I'm guessing Fauxbar's localStorage.option_historyMenu_numberOfItems is null or not an "integer" for some reason, or some JavaScript issue with parseInt returning the wrong value type that Chrome's API is expecting.

Easiest fix is probably:

  1. Open a Fauxbar tab.
  2. Press F12 to open Chrome's developer tools.
  3. Click the Console tab.
  4. Paste in localStorage.option_historyMenu_numberOfItems = 15; and press Enter.
  5. Refresh the Fauxbar tab (and/or disable Fauxbar and re-enable Fauxbar, or quit and relaunch Chrome), and see if that fixes things.

(15 is the default amount for Fauxbar's Options > Menu Bar > History > Display x recent history items)


Automatic tiles have an option to not show tiles for pinned tabs, but that's it.

Manual tiles are the way to go for full customisation.


If errors still happen, please try opening chrome-extension://hibkhcnpkakjniplpfblaoikiggkopka/html/fauxbar.errorlog.html and see what else is amiss. Wonder if Fauxbar's LocalStorage got corrupted.

fadster commented 2 years ago

Thanks for the reply. Unfortunately, this didn't fix the problem. I ran out of space on the disk not long before this happened so perhaps the local storage was indeed corrupted. Could you please let me know where this is located on disk? I can try restoring it from a recent backup. Thanks!

EDIT: The only recent entry in the error log is the following (from around the time I lost my tiles)

17. 2022-05-02 20:04:31 1.8.1   html/fauxbar.html#newTab    js/fauxbar-2.js 193 SQL database error: "could not execute statement (20 datatype mismatch)"    1
ChrisNZL commented 2 years ago

SQL database error

That doesn't sound good. You will likely need to uninstall Fauxbar, then download and install Fauxbar again.


If you can access Fauxbar's Options > Management section, the Rebuild... button should rebuild the WebSQL database.

If you happened to be signed into Chrome with extension sync enabled, you could also try clicking the Retrieve from cloud... button.


Fauxbar doesn't control files directly. Chrome extensions have a few folders that hold data for different things (WebSQL database, LocalStorage, synced storage...).

If the above buttons don't work (sounds like things are quite corrupted)... try restoring files from the folders below if you have a full harddrive backup somewhere (make sure Chrome is fully quit before overwriting):

WebSQL / SQLite database:

C:\Users\YOUR_USERNAME\AppData\Local\Google\Chrome\User Data\Default\databases\chrome-extension_hibkhcnpkakjniplpfblaoikiggkopka_0

LocalStorage?

C:\Users\YOUR_USERNAME\AppData\Local\Google\Chrome\User Data\Default\Local Extension Settings\hibkhcnpkakjniplpfblaoikiggkopka

Synced storage?

Maybe leave this one alone...

C:\Users\YOUR_USERNAME\AppData\Local\Google\Chrome\User Data\Default\Sync Extension Settings\hibkhcnpkakjniplpfblaoikiggkopka

If you do get things back up and running, once your options are set how you like them (tiles, settings, etc), you can export to a file via Fauxbar > Options > Management > Export to file...

fadster commented 2 years ago

Neither rebuilding the database nor restoring it from a backup worked. I didn't find the extension's directory in Local Extension Settings and I don't use synced storage. I ended up uninstalling and reinstalling the extension then manually adding my tiles back. Everything seems to be back to normal now. Thanks a lot for your help!