Hi,
We recently (3months ago) updated our cordova app to user WKWebview.
We since then appear to have lots of errors of this type:
AbortError: UnknownError An internal error was encountered in the Indexed Database server
and
InvalidStateError: Failed to execute 'abort' on 'IDBTransaction': The transaction is inactive or finished.
We see those errors in sentry and we don't have much info about when does it happen, it appear to be random but all device informations are similar :
Os: IOS 12.2
UserAgent : Mozilla/5.0 (iPhone; CPU iPhone OS 12_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148
Browser: Mobile Safari UI/WKWebView
Dexie version: 2.0.3
Do we need to upgrade to a newer version of dexie?
You will not need to upgrade Dexie for this error. Internal error comes from webkit's indexedDB implementation and as you are on a rather stable version of it, it should never happen unless the wkwebview is in a bad state.
Try extend your logging to find out if this happens when your app is in a special state for some reason. Brainstorming the reasons:
Thanks a lot @dfahlander I will keep you posted!
I'm also hitting this error (not using Dexie though), using a Single page app on Vue on iOS devices running 12.2 in Safari (and in PWA from same page). I run into it when writing file buffers to IndexedDB. Sometimes they fail with An internal error was encountered in the Indexed Database server, and then from then on out ANY IDB interactions result in the Connection to Indexed Database server lost. Refresh the page to try again error until the page is reloaded. Hopefully the webkit bug will get some attention. Posting here so that I'll be alerted to any updates.
Thanks @cepm-nate. Do you know if there's an issue filed on webkit bugzilla?
The ionic team is running into something similar https://github.com/ionic-team/cordova-plugin-ionic-webview/issues/354, in which they mention https://bugs.webkit.org/show_bug.cgi?id=197050.
Thanks @cepm-nate!
I've added comments to the webkit's bugzilla issue with links to this one and the cordova issue as well. Both might be useful information for the webkit team.
thanks for your comments, I've also managed to reproduce the issue following this post: https://bugs.webkit.org/show_bug.cgi?id=197050
reloading the webview appears to fix prevent us from losing data. We will try to release that they release a fix for that
I could not reproduce this issue with the iOS 12.3 beta anymore - can anyone confirm this, too?
Still present in 12.3 stable as of today:
first occurs
AbortError: UnknownError An internal error was encountered in the Indexed Database server
Mozilla/5.0 (iPhone; CPU iPhone OS 12_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko)
then
InvalidStateError: Failed to execute 'transaction' on 'IDBDatabase': The database connection is closing.
Mozilla/5.0 (iPhone; CPU iPhone OS 12_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko)
With 12.3 being released now we have the first error reports that the issue is indeed not fixed 馃槩
We are still getting these errors in iOS 13.1 and have not found found a way to consistently reproduce (or handle the issue). I know it's not a Dexie specific issue, but just wanted to toss out an update.
We get this error in IOS 13.1.1 when going into flight mode and then storing blobs in indexeddb. Takes about 20 images to store before we get the issue. Connection to Indexed Database server lost. Refresh the page to try again
Hey @beidson, this is starting to get painful. Can you help getting this issue escalated in Webkit?! I hope you can do something - like an internal very for help? The issues people are facing with Safari's IndexedDB implementations are holding back community. Apple is blocking all other choice of web engine on iOS while but keeps on leaving their own engine in this state. We also see:
This is not 2015 anymore. People need stability!
Mirroring @beidson's response on the WebKit bug to bring attention to more people (I bet not all are subscribed to WebKit one and if yes, sorry for the spam 馃檱 )
Whatever is still happening here to some users is different than what was originally reported.
So for those who still see this happen on iOS 13.x - Please attach com.apple.WebKit.Networking crash logs.
I also encountered this problem, is there any solution?
Most helpful comment
Hey @beidson, this is starting to get painful. Can you help getting this issue escalated in Webkit?! I hope you can do something - like an internal very for help? The issues people are facing with Safari's IndexedDB implementations are holding back community. Apple is blocking all other choice of web engine on iOS while but keeps on leaving their own engine in this state. We also see:
This is not 2015 anymore. People need stability!