freeCodeCamp / devdocs

API Documentation Browser
https://devdocs.io
Mozilla Public License 2.0
35.06k stars 2.33k forks source link

Although your browser supports IndexedDB, DevDocs couldn't open the database. #584

Open edouard-lopez opened 7 years ago

edouard-lopez commented 7 years ago

Can't get it to works, I tried to enable some option without success (didn't restart)

selection_004

Env

Firefox 52.0b6 (64-bit)

Question

Could you tell me what option are relevant here?

Hamza5 commented 7 years ago

This problem happens to me also from time to time ! Firefox clearly shows that devdocs.io is storing some offline data, but DevDocs still complaining about his database.

xgears commented 7 years ago

Been having this issue also from FF49 with all the relevant settings ticked. Tried a couple of things such as removing all database data, app.db.reset(), nothing seems to work. screenshot-devdocs io 2017-02-23 09-57-13

adelowo commented 7 years ago

I also have this issue.. Well, i always have this issue on firefox, #403 helps me out a lot of time

Thibaut commented 7 years ago

Haven't had a chance to investigate this yet. I'll give it a go soon.

Unfortunately without being able to replicate (even though I use Firefox as my main browser), it's a hard one. I've been fighting browser bugs in IndexedDB since I first started using IDB in DevDocs, and this bears all the hallmarks of a browser bug…

To help debug, please run indexedDB.open('docs') in the console and post a screenshot of the result.

Hamza5 commented 7 years ago

After the last update, It is working now, thanks 😄.

Here is the output of your instruction :

IDBOpenDBRequest { onblocked: null, onupgradeneeded: null, source: null, transaction: null, readyState: "pending", onsuccess: null, onerror: null }
Thibaut commented 7 years ago

@edouard-lopez @xgears could you reload/update DevDocs and post a screenshot of the offline page please? The error page should now say what actual error occurred when trying to open the database.

xgears commented 7 years ago

@Thibaut screen shot 2017-03-09 at 23 53 50-fullpage

Console errors: IDB error DOMError { name: "UnknownError", message: "The operation failed for reasons un…" }

IDBOpenDBRequest { onblocked: null, onupgradeneeded: null, source: null, transaction: null, readyState: "pending", onsuccess: null, onerror: null }

I can also see enabled entries in "Local Storage" but nothing under "Indexed DB"

Thibaut commented 7 years ago

@xgears Thanks for the info. Do you have multiple versions of Firefox installed on your system?

xgears commented 7 years ago

@Thibaut Not until recently; I've been using Firefox Developer Edition few weeks now which seems to work fine, the issue however still persist on the default Firefox. Been using devdocs from somewhere around FF30+, the issue started, if i remember correctly between FF48-FF49

edouard-lopez commented 7 years ago

Same error, I'm now on Firefox 53.0b1 (desktop).

screen shot 2017-03-14 at 14 06 55

I did run firefox-52.0a2.en-US.linux-x86_64.tar.bz2 to test lesspass.com addon otherwise I use a single firefox version.

scheinercc commented 7 years ago

Note: Although I still see the same error on current DevEdition 54.0a2 (2017-04-18) (64-bit) it is now working on Nightly 55.0a1 (2017-04-23) (64-bit) for me.

clarkbw commented 7 years ago

I'm seeing this right now. I've tried Nightly and I can't quite reproduce it yet, but on DevEdition 54 I'm not able to use the offline mode. Here's the stack trace I get in the console:

IDB error DOMError { name: "UnknownError", message: "The operation failed for reasons un…" }  application.js:7339:11
    DB.prototype.fail http://localhost:9292/assets/application.js:7339:11
    DB.prototype.onOpenError http://localhost:9292/assets/application.js:7328:11
    bind/< http://localhost:9292/assets/application.js:7248:58
    (Async: EventHandlerNonNull)
    DB.prototype.db http://localhost:9292/assets/application.js:7282:9
    DB.prototype.versions http://localhost:9292/assets/application.js:7570:14
    Docs.prototype.getInstallStatuses http://localhost:9292/assets/application.js:9021:7
    Docs.prototype.updateInBackground http://localhost:9292/assets/application.js:9055:7
    UpdateChecker.prototype.checkDocs http://localhost:9292/assets/application.js:8785:9
    bind/< http://localhost:9292/assets/application.js:8745:58
    (Async: setTimeout handler)
    UpdateChecker http://localhost:9292/assets/application.js:8756:7
    welcomeBack http://localhost:9292/assets/application.js:6985:35
    start/</< http://localhost:9292/assets/application.js:6903:13
    (Async: setTimeout handler)
    start http://localhost:9292/assets/application.js:6900:7
    app.start http://localhost:9292/assets/debug.js:24:5
    (Async: setTimeout handler)
    Doc.prototype._loadFromCache http://localhost:9292/assets/application.js:9286:7
    Doc.prototype.load http://localhost:9292/assets/application.js:9252:32
    Docs.prototype.load/next</< http://localhost:9292/assets/application.js:8975:13
    Doc.prototype._loadFromCache/callback</< http://localhost:9292/assets/application.js:9283:11
    (Async: setTimeout handler)
    Doc.prototype._loadFromCache http://localhost:9292/assets/application.js:9286:7
    Doc.prototype.load http://localhost:9292/assets/application.js:9252:32
    Docs.prototype.load/next</< http://localhost:9292/assets/application.js:8975:13
    Docs.prototype.load http://localhost:9292/assets/application.js:8992:9
    bootAll http://localhost:9292/assets/application.js:6874:7
    init http://localhost:9292/assets/application.js:6793:9
    app.init http://localhost:9292/assets/debug.js:14:5
    (Async: EventListener.handleEvent)
    <anonymous> http://localhost:9292/assets/application.js:14475:3
    <anonymous> http://localhost:9292/assets/application.js:14463:2

There are no source maps available so its hard to know what the cause is, I'm trying to dig further into it now.

Thibaut commented 7 years ago

@clarkbw it's on my list to take another look at this. Haven't had time yet. If you manage to isolate replication steps, that'd be very useful. I use Firefox (Beta, so same as DevEdition now) every day but have never been able to replicate.

I suspect it's a browser bug, since the error (UnknownError) is un-descriptive and seems to point to an internal problem.

clarkbw commented 7 years ago

I suspect it's a browser bug

I think you're right, it so far has the un-re-producible-ness of a browser bug

clarkbw commented 7 years ago

I filed bug 1367539 to track this, we'll see if anyone else finds anything here.

xgears commented 7 years ago

@Thibaut using a new profile seems to fix the issue, I'm assuming the error has to do with a pref/user/default setting FYI: firefox -P > Create Profile

clarkbw commented 7 years ago

According to the investigation in the bug this was a problem related to running different versions of Firefox in the same profile.

clarkbw commented 7 years ago

Other errors could be different of course.