ChrisNZL / Fauxbar

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

Tiles not loading. Uncaught TypeError #45

Closed SirBlackWolf closed 5 years ago

SirBlackWolf commented 5 years ago

It seems I've run into a slight problem Fauxbar's tiles today. Everything was working today until I added a new tile. After adding that new tile, I get a blank page every time I open Fauxbar with it telling me that Fauxbar has encountered an Uncaught TypeError: Cannot read property 'length' of undefined. js/fauxbar.js, line 59. Initially, I thought reindexing, rebuilding, and/or retrieving the saved file from the cloud would work, but they've done nothing to change the current situation. I've tried searching for clues or answers to what was happening, but could find nothing, and it doesn't seem this issue has been posted here.

ChrisNZL commented 5 years ago

fauxbar.js, line 59, sounds like url is null for a tile for some reason.

if (url.length > 8 ...

I don't have any option/button in place to automatically reset manual tiles at the moment.

To manually fix this, you'll need to export your options, edit a line containing "sitetiles", and then reimport:

  1. Go Fauxbar > Options > Management > Export to file...

  2. Copy all the text from the textbox into a text file (I suggest using Sublime Text, Notepad, or similar). The text is a large JSON string.

  3. In your text editor, search for a line starting with "siteTiles".

  4. Replace the line, so that it looks something like this:

    "showintro":"0",
    "siteTiles":"[]",
    "unreadErrors":"2"},

(note: if you don't have any unreadErrors, the siteTiles line might need }, on the end, rather than just ,)

"showintro":"0",
"siteTiles":"[]"},
  1. Import the new JSON string with the Reimport from file button.

If, however, your options are set to use top site tiles automatically, rather than manual tiles you've hand-entered, then that's a pretty annoying bug that I'll try to see if I can get a fix out for. I have a few bugs that have been around a while, I just haven't tackled updating Fauxbar in a long while 😬

ChrisNZL commented 5 years ago

Fixed in v1.8.0. Added a null check, which has the method return an empty string if the url does not exist.

I'll upload to the Chrome Web Store soon once I tackle some of the other bugs.