ChrisNZL / Fauxbar

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

Stopped working in Chrome 75 #48

Closed e14mattc closed 5 years ago

e14mattc commented 5 years ago

Started seeing errors when bringing up a new Fauxbar tab after upgrading to Chrome 75 today;

  1. | 2019-06-05 13:44:03 | 1.8.0 | html/fauxbar.html | js/fauxbar-1.js | 2166 | SQL error: "the statement callback raised an exception or statement error callback did not return false" | 1
  2. | 2019-06-05 13:44:03 | 1.8.0 | html/fauxbar.html | js/fauxbar-1.js | 2092 | Uncaught TypeError: Cannot read property 'length' of undefined | 1
  3. | 2019-06-05 13:44:03 | 1.8.0 | html/fauxbar.html | js/fauxbar-1.js | 2166 | SQL error: "the statement callback raised an exception or statement error callback did not return false" | 1
  4. | 2019-06-05 13:44:03 | 1.8.0 | html/fauxbar.html | js/fauxbar-1.js | 2092 | Uncaught TypeError: Cannot read property 'length' of undefined | 1
  5. | 2019-06-05 13:44:03 | 1.8.0 | html/fauxbar.html | js/fauxbar-1.js | 2166 | SQL error: "the statement callback raised an exception or statement error callback did not return false" | 1
  6. | 2019-06-05 13:44:03 | 1.8.0 | html/fauxbar.html | js/fauxbar-1.js | 2092 | Uncaught TypeError: Cannot read property 'length' of undefined | 1
  7. | 2019-06-05 13:44:03 | 1.8.0 | html/fauxbar.html | js/fauxbar-1.js | 2166 | SQL error: "the statement callback raised an exception or statement error callback did not return false" | 1
  8. | 2019-06-05 13:47:04 | 1.8.0 | html/fauxbar.html | js/fauxbar-1.js | 1271 | SQL database error: "unable to read version (3850 disk I/O error)"
ChrisNZL commented 5 years ago

fauxbar-1.js line 2092 contains:

... && suggestUrl != "null" && suggestUrl != "" && suggestUrl.length > 0) {

I'm going to assume that suggestUrl is null for some reason. I'll add an extra null check before trying to access .length.

I haven't been able to reproduce this error, but I'm guessing this error happens when typing a search query in the Search Box? Which search engine were you trying to use; a custom one or one of the built-in ones?

For now, if the error is too annoying, try going Fauxbar's Options > Search Engines > Untick Show suggestions from the selected search engine if possible.

ChrisNZL commented 5 years ago

Additionally, are there other errors logged?

Looking at fauxbar-1.js line 1271, it's an error catcher for the populateOpenSearchMenu method that starts on line 1215. Are there any errors logged between lines 1215-1271?

I see the line 1271 error myself, but nothing else near it.

On another note after updating to Chrome 75, I'm seeing other SQL errors:

e14mattc commented 5 years ago

It's odd.. sometimes the search box will work.. sometimes it doesn't (it doesn't show suggestions, history, or work when I hit return);

image

Looking in Options > Search Engines.. it all looked fine to begin with. But I hit 'Restore Google' anyway.. now when I go back into Options, it keeps forgetting what engines are configured;

image

Opening a new tab now often results in no search engines being listed;

image

Here are the latest set of errors from today;

  1. 2019-06-06 09:22:37 1.8.0 html/fauxbar.html js/fauxbar-1.js 1271 SQL database error: "unable to read version (3850 disk I/O error)" 1
  2. 2019-06-06 09:28:49 1.8.0 html/fauxbar.html js/fauxbar-1.js 1271 SQL database error: "unable to read version (3850 disk I/O error)" 1
  3. 2019-06-06 10:27:55 1.8.0 html/fauxbar.html js/fauxbar-1.js 1271 SQL database error: "unable to read version (3850 disk I/O error)" 1
  4. 2019-06-06 10:55:25 1.8.0 html/fauxbar.html js/fauxbar-1.js 2092 Uncaught TypeError: Cannot read property 'length' of undefined 1
  5. 2019-06-06 10:55:25 1.8.0 html/fauxbar.html js/fauxbar-1.js 2166 SQL error: "the statement callback raised an exception or statement error callback did not return false" 1
  6. 2019-06-06 10:55:25 1.8.0 html/fauxbar.html js/fauxbar-1.js 2092 Uncaught TypeError: Cannot read property 'length' of undefined 1
  7. 2019-06-06 10:55:25 1.8.0 html/fauxbar.html js/fauxbar-1.js 2166 SQL error: "the statement callback raised an exception or statement error callback did not return false" 1
  8. 2019-06-06 10:55:25 1.8.0 html/fauxbar.html js/fauxbar-1.js 2092 Uncaught TypeError: Cannot read property 'length' of undefined 1
  9. 2019-06-06 10:55:26 1.8.0 html/fauxbar.html js/fauxbar-1.js 2166 SQL error: "the statement callback raised an exception or statement error callback did not return false" 1
  10. 2019-06-06 10:55:26 1.8.0 html/fauxbar.html js/fauxbar-1.js 2092 Uncaught TypeError: Cannot read property 'length' of undefined 1
  11. 2019-06-06 10:55:26 1.8.0 html/fauxbar.html js/fauxbar-1.js 2166 SQL error: "the statement callback raised an exception or statement error callback did not return false" 1
  12. 2019-06-06 10:55:26 1.8.0 html/fauxbar.html js/fauxbar-1.js 2092 Uncaught TypeError: Cannot read property 'length' of undefined 1
  13. 2019-06-06 10:55:26 1.8.0 html/fauxbar.html js/fauxbar-1.js 2166 SQL error: "the statement callback raised an exception or statement error callback did not return false" 1
  14. 2019-06-06 10:55:26 1.8.0 html/fauxbar.html js/fauxbar-1.js 2092 Uncaught TypeError: Cannot read property 'length' of undefined 1
  15. 2019-06-06 10:55:26 1.8.0 html/fauxbar.html js/fauxbar-1.js 2166 SQL error: "the statement callback raised an exception or statement error callback did not return false" 1
  16. 2019-06-06 10:55:26 1.8.0 html/fauxbar.html js/fauxbar-1.js 2092 Uncaught TypeError: Cannot read property 'length' of undefined 1
  17. 2019-06-06 10:55:26 1.8.0 html/fauxbar.html js/fauxbar-1.js 2166 SQL error: "the statement callback raised an exception or statement error callback did not return false" 1
  18. 2019-06-06 10:55:26 1.8.0 html/fauxbar.html js/fauxbar-1.js 2092 Uncaught TypeError: Cannot read property 'length' of undefined 1
  19. 2019-06-06 10:55:26 1.8.0 html/fauxbar.html js/fauxbar-1.js 2166 SQL error: "the statement callback raised an exception or statement error callback did not return false" 1
  20. 2019-06-06 10:55:27 1.8.0 html/fauxbar.html js/fauxbar-1.js 2092 Uncaught TypeError: Cannot read property 'length' of undefined 1
  21. 2019-06-06 10:55:27 1.8.0 html/fauxbar.html js/fauxbar-1.js 2166 SQL error: "the statement callback raised an exception or statement error callback did not return false" 1
  22. 2019-06-06 10:55:27 1.8.0 html/fauxbar.html js/fauxbar-1.js 2092 Uncaught TypeError: Cannot read property 'length' of undefined 1
  23. 2019-06-06 10:55:27 1.8.0 html/fauxbar.html js/fauxbar-1.js 2166 SQL error: "the statement callback raised an exception or statement error callback did not return false" 1
  24. 2019-06-06 10:55:27 1.8.0 html/fauxbar.html js/fauxbar-1.js 2092 Uncaught TypeError: Cannot read property 'length' of undefined 1
  25. 2019-06-06 10:55:27 1.8.0 html/fauxbar.html js/fauxbar-1.js 2166 SQL error: "the statement callback raised an exception or statement error callback did not return false" 1
  26. 2019-06-06 10:57:12 1.8.0 html/fauxbar.html#options=1 js/options.js 347 SQL database error: "unable to read version (3850 disk I/O error)" 1
  27. 2019-06-06 10:57:12 1.8.0 html/fauxbar.html#options=1 js/options.js 565 SQL database error: "unable to read version (3850 disk I/O error)" 1
  28. 2019-06-06 10:59:16 1.8.0 html/fauxbar.html#options=1 js/fauxbar-1.js 1271 SQL database error: "unable to read version (3850 disk I/O error)" 1
  29. 2019-06-06 10:59:16 1.8.0 _generated_background_page.html js/background-new.js 682 SQL database error: "unable to begin transaction (3850 disk I/O error)" 1
  30. 2019-06-06 11:00:14 1.8.0 _generated_background_page.html js/background-new.js 852 SQL database error: "unable to begin transaction (3850 disk I/O error)" 2
  31. 2019-06-06 11:01:39 1.8.0 _generated_background_page.html js/background-new.js 852 SQL database error: "unable to begin transaction (3850 disk I/O error)" 1
  32. 2019-06-06 11:01:59 1.8.0 _generated_background_page.html js/background-new.js 852 SQL database error: "unable to begin transaction (3850 disk I/O error)" 1
  33. 2019-06-06 11:02:10 1.8.0 _generated_background_page.html js/background-new.js 852 SQL database error: "unable to begin transaction (3850 disk I/O error)" 1
  34. 2019-06-06 11:02:10 1.8.0 html/fauxbar.html#options=1 js/options.js 347 SQL database error: "unable to read version (3850 disk I/O error)" 1
  35. 2019-06-06 11:02:10 1.8.0 html/fauxbar.html#options=1 js/options.js 565 SQL database error: "unable to read version (3850 disk I/O error)" 1
  36. 2019-06-06 11:02:15 1.8.0 html/fauxbar.html js/fauxbar-1.js 2092 Uncaught TypeError: Cannot read property 'length' of undefined 1
  37. 2019-06-06 11:02:15 1.8.0 html/fauxbar.html js/fauxbar-1.js 2166 SQL error: "the statement callback raised an exception or statement error callback did not return false" 1
  38. 2019-06-06 11:02:15 1.8.0 html/fauxbar.html js/fauxbar-1.js 2092 Uncaught TypeError: Cannot read property 'length' of undefined 1
  39. 2019-06-06 11:02:15 1.8.0 html/fauxbar.html js/fauxbar-1.js 2166 SQL error: "the statement callback raised an exception or statement error callback did not return false" 1
  40. 2019-06-06 11:02:16 1.8.0 html/fauxbar.html js/fauxbar-1.js 2092 Uncaught TypeError: Cannot read property 'length' of undefined 1
  41. 2019-06-06 11:02:16 1.8.0 html/fauxbar.html js/fauxbar-1.js 2166 SQL error: "the statement callback raised an exception or statement error callback did not return false" 1
  42. 2019-06-06 11:02:16 1.8.0 html/fauxbar.html js/fauxbar-1.js 2092 Uncaught TypeError: Cannot read property 'length' of undefined 1
  43. 2019-06-06 11:02:16 1.8.0 html/fauxbar.html js/fauxbar-1.js 2166 SQL error: "the statement callback raised an exception or statement error callback did not return false"

Hope some of this helps.

ChrisNZL commented 5 years ago

Thanks for the further details. I've been investigating this for a couple hours now.

I've fixed that .length undefined/null error on my local test build.

However, I believe the underlying issue for all these other errors is that Chrome 75 has introduced some SQLite/WebSQL database locking. The 3850 disk I/O errors are SQLite's (3850) SQLITE_IOERR_LOCK.

Would also explain why your search engines aren't loading sometimes; Fauxbar retrieves them from its SQLite database, but database errors are occurring.

On Windows 10, Chrome 75, Chrome Dev 76, and Chrome Canary 77 are all giving these I/O errors for me. On macOS with Chrome 75, no errors at all. Haven't been able to update my version of Chrome on Ubuntu to test there.

I believe Fauxbar's background page and its tab pages are fighting with each other for database access. Even though Fauxbar's openDb method is returning true (meaning it successfully opened the SQLite database), attempting to perform a transaction, whether reading or writing, seems to have a chance to fail, on all aspects of the extension.

I've experimented with adding a setTimeout delay to certain transactions, and this seems to help, yet is not 100% reliable. But it gives me insight that using the database asynchronously seems to be the issue, even though it's been fine for years.

But yes, right now, Chrome 75 breaks Fauxbar on Windows due to this asynchronous database locking from what I can tell.


Thoughts for going forward:

I feel like right now, it is probably best to disable Fauxbar on Windows. I might see if I can produce a small test extension to submit to the Chromium team as a bug (this is quite possibly an unintended bug that Chromium introduced... or maybe it's a feature, who knows), but I don't see Fauxbar being usable for a while for now.

ChrisNZL commented 5 years ago

I've replaced all instances of window.db with chrome.extension.getBackgroundPage().db and it seems to have resolved the locking errors. (getBackgroundPage documentation here)

I'll try to get this packaged and uploaded tomorrow after some sleep and some final testing.

e14mattc commented 5 years ago

Woo hoo! You rock!!

ChrisNZL commented 5 years ago

v1.8.1 is live now on the Chrome Web Store.

You can force an update by going to chrome://extensions, enable Developer Mode in the top-right corner, then click the Update button.

pbajorek commented 5 years ago

Thank you for the quick fix. This is my favorite extension!