Closed e14mattc closed 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
.
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:
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);
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;
Opening a new tab now often results in no search engines being listed;
Here are the latest set of errors from today;
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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.
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:
See if I'm able to check whether the database is "busy" before performing a transaction (not sure if this is possible with an existing method, I'll have to check SQLite's API).
Attempt to implement my own locking status manager... The database's transaction
and readtransaction
methods use the third parameter as a success callback, so I think it would be possible to manually declare if the db is in use or not. I can't remember if it's easy for extension tab pages to access the background page's JavaScript variables or not... otherwise there's message-passing, or using localStorage.
I could attempt to file a bug on the Chromium issue tracker, but since WebSQL is deprecated, I doubt it would amount to much.
On a side note, Apple is removing WebSQL support in Safari 13.
The Chromium team reaffirmed in March 2019 that they still want to deprecate and remove WebSQL.
If WebSQL is ever removed from Chromium, the next best thing is IndexedDB, which is basically "NoSQL", eg just a basic key/value storage like localStorage without any fancy querying. I remember looking into IndexedDB years ago and deemed it inferior to WebSQL/SQLite. Looking at Mozilla's IndexedDB API page, there are links to various wrappers (like PouchDB) that seem to try and recreate the spirit of SQL.
On a personal note, this is bad timing for Fauxbar because I am on the verge of getting my Tallowmere 2 game shipped, and refactoring Fauxbar on this scale (even if it's just attempting to implement my own database locking checks) is not something I'm willing to tackle right now, as I don't see it as being a quick/easy fix; would take me a lot of time to implement and test.
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.
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.
Woo hoo! You rock!!
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.
Thank you for the quick fix. This is my favorite extension!
Started seeing errors when bringing up a new Fauxbar tab after upgrading to Chrome 75 today;