RESOLVED CONFIGURATION CHANGED 197050
IndexedDB: An internal error was encountered in the Indexed Database server
https://bugs.webkit.org/show_bug.cgi?id=197050
Summary IndexedDB: An internal error was encountered in the Indexed Database server
mrschmidt
Reported 2019-04-17 21:59:33 PDT
We have received reports from the users of the Firebase SDK for Firestore (see https://github.com/firebase/firebase-js-sdk) that they are seeing the following exception starting with iOS 12: "An internal error was encountered in the Indexed Database server" The user report states that bringing the Web app into the background and back into the foreground triggers this crash. More details can be found here: https://github.com/firebase/firebase-js-sdk/issues/1670 There are some other reports that this issue is related to storing Uint8Arrays in Object Stores that use auto-incrementing keys. While we do use auto-incrementing keys in Firestore, we do not store Uint8Arrays.
Attachments
com.apple.WebKit.Networking crash report for IndexedDb background issue (43.34 KB, text/plain)
2019-05-07 11:21 PDT, Michael Lehenabuer
no flags
Failed to execute 'transaction' on 'IDBDatabase': The database connection is closing. (56.74 KB, text/plain)
2020-08-04 07:05 PDT, Istvan Tabanyi
no flags
UnknownError: An internal error was encountered in the Indexed Database server (50.30 KB, text/plain)
2020-08-19 14:40 PDT, Simon Bluhm
no flags
iOS_14_5_com.apple.WebKit.Networking-2021-04-15-121002.ips (60.69 KB, text/plain)
2021-04-20 03:10 PDT, Tim
no flags
iOS_12_4_com.apple.WebKit.Networking-2021-04-13-110655.ips (44.50 KB, text/plain)
2021-04-20 03:11 PDT, Tim
no flags
Radar WebKit Bug Importer
Comment 1 2019-04-17 22:11:25 PDT
David Fahlander
Comment 2 2019-04-25 16:19:30 PDT
Got Dexie issue related to this one: https://github.com/dfahlander/Dexie.js/issues/832
David Fahlander
Comment 3 2019-04-25 16:21:31 PDT
Michael Lehenabuer
Comment 4 2019-04-25 17:51:07 PDT
This problem is being reported by more and more Firestore customers. I've created a small repro page that just creates an IndexedDb transaction, does 10 writes, and repeats every 100ms. If you send safari to the background repeatedly while it's running, you'll hit the bug easily. Repro steps: 1. Open http://mike-shared.firebaseapp.com/ios-crash.html in iOS 12.2 Safari 2. Press Home button. 3. Open safari again (just tap the app icon). 4. Repeat steps 2 and 3 until number on the page stops incrementing. On my iPhone 6S it usually happens within ~5 tries; most I've had to do is ~12. Result: Eventually the number on the page will stop incrementing. If you look in the JS Console you'll see: [Error] put onerror – UnknownError: An internal error was encountered in the Indexed Database server (anonymous function) (ios-crash.html:63) At this point, IndexedDb is completely broken. Subsequent transactions fail saying that IndexedDb is closing, and if you try to open IndexedDb again, the request just hangs. Let me know if you need anything else to investigate. Thanks!
Michael Lehenabuer
Comment 5 2019-04-30 10:14:45 PDT
As an update, I've tried a couple workarounds which do not work: 1. Re-opening the database after hitting this bug results in an "UnknownError: Connection to Indexed Database server lost. Refresh the page to try again." 2. Listening to visibilitychange events and attempting to stop queuing operations when visibilitystate == false does not work because in the case where the bug repros, no visibilitychange event is received before Safari is paused in the background. The event arrives only after restoring Safari to the foreground, but then it is too late and you get the "An internal error was encountered in the Indexed Database server" error. I've uploaded a modified repro at http://mike-shared.firebaseapp.com/ios-crash2.html which contains these workarounds and additional logging. Given there are seemingly no workarounds, it would be very helpful if somebody could acknowledge that this bug has been seen and is being investigated. Thanks!
tgangso
Comment 6 2019-05-06 07:19:29 PDT
This is a serious issue and should get top priority.
Sihui Liu
Comment 7 2019-05-06 09:06:20 PDT
(In reply to Michael Lehenabuer from comment #5) > As an update, I've tried a couple workarounds which do not work: > > 1. Re-opening the database after hitting this bug results in an > "UnknownError: Connection to Indexed Database server lost. Refresh the page > to try again." > > 2. Listening to visibilitychange events and attempting to stop queuing > operations when visibilitystate == false does not work because in the case > where the bug repros, no visibilitychange event is received before Safari is > paused in the background. The event arrives only after restoring Safari to > the foreground, but then it is too late and you get the "An internal error > was encountered in the Indexed Database server" error. > > I've uploaded a modified repro at > http://mike-shared.firebaseapp.com/ios-crash2.html which contains these > workarounds and additional logging. > > Given there are seemingly no workarounds, it would be very helpful if > somebody could acknowledge that this bug has been seen and is being > investigated. Thanks! Hi Michael, Thank you for the bug report. Does IDB behave correctly after you put Safari foreground and refresh the web page? We do have bug report about network process crashing when backgrounding Safari because database file cannot be locked during process suspension. We have proposed a fix(https://bugs.webkit.org/show_bug.cgi?id=196372). If that's the case, you should see crash report about com.apple.WebKit.Networking. And you should expect IDB to work if you refresh page and load again. Thanks!
Michael Lehenabuer
Comment 8 2019-05-07 09:02:56 PDT
Hi Sihui, Thanks very much for the response. From the description, https://bugs.webkit.org/show_bug.cgi?id=196372 does sound very much like it could be the root cause which is great news. IDB *does* work fine after refreshing the page. Where exactly would I look to see the com.apple.WebKit.Networking crash report to confirm that it is happening as well? Thanks, Michael
Chris Dumez
Comment 9 2019-05-07 09:07:10 PDT
(In reply to Michael Lehenabuer from comment #8) > Hi Sihui, > > Thanks very much for the response. From the description, > https://bugs.webkit.org/show_bug.cgi?id=196372 does sound very much like it > could be the root cause which is great news. IDB *does* work fine after > refreshing the page. > > Where exactly would I look to see the com.apple.WebKit.Networking crash > report to confirm that it is happening as well? The crash report should show up under: Settings > Privacy > Analytics > Analytics Data.
Michael Lehenabuer
Comment 10 2019-05-07 11:21:05 PDT
Created attachment 369304 [details] com.apple.WebKit.Networking crash report for IndexedDb background issue Thanks. I do see a number of crash reports for com.apple.WebKit.Networking from 2019-04-24 and 2019-04-25 which is when I was originally reproducing the bug. Strangely though, if I reproduce the bug again now (using my http://mike-shared.firebaseapp.com/ios-crash.html repro) I do *not* see a new crash report, even though the bug still reproduces. I'm not sure what the difference is. I've attached one of the reports from 04-25 if you want to verify it is the same bug. I can't explain why I'm not getting new crash reports though. Thanks!
Jason Kealey
Comment 11 2019-05-14 05:55:19 PDT
I could reproduce easily on iOS 12.2 yesterday on Safari, Chrome and Firefox using http://mike-shared.firebaseapp.com/ios-crash.html Today, on 12.3, I am unable to make any of the browsers crash right after upgrading iOS. I have not done extensive testing to see if this persists after prolonged browser use.
Michael Lehenabuer
Comment 12 2019-05-14 08:08:43 PDT
Thanks Jason! It seems like everything is adding up that this is a dupe of https://bugs.webkit.org/show_bug.cgi?id=196372 and has been addressed in iOS 12.3 which is great news. So I think you can probably go ahead and close this issue. Thanks!
Stefan Sechelmann
Comment 13 2019-05-16 12:25:30 PDT
The issue is still present in 12.3 stable as observed today in a WKWebView: 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 any further access would result in 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) I will observe the stats for our app for the next days.
Sihui Liu
Comment 14 2019-05-16 14:20:44 PDT
Hi all, The fix for https://bugs.webkit.org/show_bug.cgi?id=196372 is not in iOS(iOS 12.3) yet, so you may still see the bug. For temporary workaround, you could try reloading page or re-opening the IDB database after you encounter the error. The bug leads to process crash, so the old IDB database connection to crashed process would fail and we need to establish a new connection by re-opening.
Michael Lehenabuer
Comment 15 2019-05-16 14:23:42 PDT
Thanks Sihui, Do you know what release it's going to be in? We're planning to disable our usage of IndexedDb on iOS 12.2 to avoid this crash. I was really hoping we'd only have to disable it for iOS 12.2, but if the fix isn't going to make it into iOS 12.3 we may need to reevaluate.
Sihui Liu
Comment 16 2019-05-16 15:15:21 PDT
(In reply to Michael Lehenabuer from comment #15) > Thanks Sihui, > > Do you know what release it's going to be in? We're planning to disable our > usage of IndexedDb on iOS 12.2 to avoid this crash. I was really hoping we'd > only have to disable it for iOS 12.2, but if the fix isn't going to make it > into iOS 12.3 we may need to reevaluate. Hi Michael, We are not allowed to comment on future iOS release. If you want to know whether the fix is in a released iOS build (including beta), I can tell you that. The fix is not in any iOS build yet.
Johan Baversjo
Comment 17 2019-05-20 13:18:34 PDT
(In reply to Sihui Liu from comment #16) > (In reply to Michael Lehenabuer from comment #15) > > Thanks Sihui, > > > > Do you know what release it's going to be in? We're planning to disable our > > usage of IndexedDb on iOS 12.2 to avoid this crash. I was really hoping we'd > > only have to disable it for iOS 12.2, but if the fix isn't going to make it > > into iOS 12.3 we may need to reevaluate. > > > Hi Michael, > > We are not allowed to comment on future iOS release. If you want to know > whether the fix is in a released iOS build (including beta), I can tell you > that. The fix is not in any iOS build yet. Hello Sihui, Thank you for your fix. Is it the case that this fix is also not in iOS 12.4 beta 2?
Sihui Liu
Comment 18 2019-05-20 13:55:14 PDT
(In reply to Johan Baversjo from comment #17) > (In reply to Sihui Liu from comment #16) > > (In reply to Michael Lehenabuer from comment #15) > > > Thanks Sihui, > > > > > > Do you know what release it's going to be in? We're planning to disable our > > > usage of IndexedDb on iOS 12.2 to avoid this crash. I was really hoping we'd > > > only have to disable it for iOS 12.2, but if the fix isn't going to make it > > > into iOS 12.3 we may need to reevaluate. > > > > > > Hi Michael, > > > > We are not allowed to comment on future iOS release. If you want to know > > whether the fix is in a released iOS build (including beta), I can tell you > > that. The fix is not in any iOS build yet. > > Hello Sihui, > Thank you for your fix. > Is it the case that this fix is also not in iOS 12.4 beta 2? Yes, it's not in iOS 12.4 beta 2.
Tim
Comment 19 2019-06-03 07:59:48 PDT
Can anyone confirm that the fix is in the iOS 12.4 beta 3 or, asking in advance, the first iOS 13 beta?
Sihui Liu
Comment 20 2019-06-05 14:07:48 PDT
Fix is in iOS 13 beta, you should not see the same crash or IDB error when bringing backgrounded app to foreground.
E.J. Daly
Comment 21 2019-06-10 17:08:18 PDT
Hi Sihui, Can you confirm if this fix is also in iOS 12.4 please? Thanks
Sihui Liu
Comment 22 2019-06-10 17:52:06 PDT
(In reply to E.J. Daly from comment #21) > Hi Sihui, > > Can you confirm if this fix is also in iOS 12.4 please? > > Thanks Hi E.J, this is not in iOS 12.4.
E.J. Daly
Comment 23 2019-06-10 18:28:45 PDT
Thanks Sihui, Is there still a possibility of it getting to iOS 12 or has that been finalized yet? If not, it's going to be remain an issue we need to consider for iPhone ~6 users I guess? The issue itself is particularly problematic for apps added to home screen, which can't be refreshed / forced to quit in iOS12. So if the app gets into a bad state because of this - it's very difficult to get out of it (without restarting the phone or doing a memory reset or re-installing the PWA)
Sihui Liu
Comment 24 2019-06-12 14:35:41 PDT
(In reply to E.J. Daly from comment #23) > Thanks Sihui, > > Is there still a possibility of it getting to iOS 12 or has that been > finalized yet? > > If not, it's going to be remain an issue we need to consider for iPhone ~6 > users I guess? > > The issue itself is particularly problematic for apps added to home screen, > which can't be refreshed / forced to quit in iOS12. So if the app gets into > a bad state because of this - it's very difficult to get out of it (without > restarting the phone or doing a memory reset or re-installing the PWA) That should be finalized. Can you try re-opening the database?
Mark
Comment 25 2019-06-27 04:32:17 PDT
We have been struggling with this problem on our WKWebview based app which has local sync database. The error is resulting in the loss of customer's data so is pretty serious for us, we have tried trapping it and reconnecting to the IndexedDb but this does not seem to resolve the issue. The only way currently to move on is to completely reload the webview but doing this means we are loosing the state that needs to be saved to IndexedDb. Many of our users use older iOS devices so it needs to be a iOS 12 fix for us, otherwise we will have to inform a large number of our users that due to a iOS 12 bug we can no longer support their device!
Jake Teton-Landis
Comment 26 2019-08-20 18:06:01 PDT
On iOS 13 beta, we're still seeing the following error: "UnknownError: Connection to Indexed Database server lost. Refresh the page to try again" Is this expected to be fixed? Is there another ticket which tracks the "...Refresh the page to try again" bug? Like Mark, I work on an app that uses IndexedDB to persist critical user edits, so we cannot "refresh the page" without losing in-memory data.
Tim
Comment 27 2019-09-16 07:47:38 PDT
Sihui Liu, can you confirm the bug (or correctly the bug for id 196372) is fixed and available in the iOS 13 GM? Thanks!
Sihui Liu
Comment 28 2019-09-16 08:56:05 PDT
(In reply to Tim from comment #27) > Sihui Liu, can you confirm the bug (or correctly the bug for id 196372) is > fixed and available in the iOS 13 GM? > > Thanks! Hi, The fix for bug (https://bugs.webkit.org/show_bug.cgi?id=196372) is in iOS 13 GM Seed. It should fix the issue where IDB internal error showed up when backgrounding app and then bringing it to foreground.
mrschmidt
Comment 29 2019-10-08 14:04:56 PDT
We are seeing new issues with iOS 13 and believe that the patch for this issue may be one of the causes. It appears that the following sequence of operations is now possible: 1) The Firestore SDK opens a new IndexedDb transaction/ 2) The Safari tab goes in the background. 3) WebKit terminates the network, which stops the IDBServer (https://trac.webkit.org/browser/trunk/Source/WebKit/NetworkProcess/NetworkProcess.cpp#L2117) 4) The app goes back in the foreground and resumes its operation. Firestore tries to use the transaction it opened in step 1 and receives "Attempt to get a record from database without an in-progress transaction" I filed https://bugs.webkit.org/show_bug.cgi?id=202705
zac spitzer
Comment 30 2020-03-16 14:35:45 PDT
I'm seeing this problem with multiple iOS 13 users, from what I can tell, there were no open transactions before the browser went to the background. The tab gets focussed again after a few minutes and then "Connection to Indexed Database server lost." gets thrown next time IndexedDB is accessed, via a new open, new transaction, put(), no auto incrementing keys in use.
Piotr
Comment 31 2020-04-10 23:38:51 PDT
I can confirm that this bug still exists in iOS 13.3.1.
Brady Eidson
Comment 32 2020-06-09 09:14:49 PDT
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.
Istvan Tabanyi
Comment 33 2020-08-04 07:05:47 PDT
Created attachment 405919 [details] Failed to execute 'transaction' on 'IDBDatabase': The database connection is closing. I still see a *lot* of these on latest iOS with our app. I can not reproduce it by normal usage, but recently I found a pretty reliable way to trigger it. Just start writing records into indexeddb, put the app into background, wait a bit, then repeat, sometimes rapidly switch between foreground and background. Eventually I get a "Failed to execute 'transaction' on 'IDBDatabase': The database connection is closing." While this is a bit odd way, our users have a lot of trouble because of this, so I guess it just requires some nice timing with putting the app to background. I also got some kind of failsafe mechanism in place as I automatically retry failed writes a few times. Now another strange issue happens here as during writes I get some "UnknownError: An internal error was encountered in the Indexed Database server", the retry logic trigger, but on the next write request I got ConstraintError, as the data was actually written into indexeddb store previously. This bug is really killing us, please tell me whatever more info you need to address this. Happy to debug it if you give me some points how to start, as I said I can repro it pretty easily now.
zac spitzer
Comment 34 2020-08-04 07:12:00 PDT
which version of iOS? I have only seen this from users running older versions, 13.5.1 being the latest
Istvan Tabanyi
Comment 35 2020-08-04 07:15:45 PDT
13.5.1, I got at least three different AbortError and UnknownError in the last hour with the method I described. I am sure about the two errors which I mentioned.
zac spitzer
Comment 36 2020-08-04 07:22:34 PDT
I'm afraid your only option is to sniff the UA and tell em to upgrade their iOS
Istvan Tabanyi
Comment 37 2020-08-04 07:27:03 PDT
Sorry, but upgrade to where? I can reproduce it on 13.5.1.
zac spitzer
Comment 38 2020-08-04 08:11:35 PDT
13.6 is the latest release of iOS
Istvan Tabanyi
Comment 39 2020-08-05 00:40:34 PDT
Oh, nice, I saw only 13.5.1, restarted the phone and the update appeared. I will try to reproduce it on 13.6, cheers.
Simon Bluhm
Comment 40 2020-08-19 14:40:08 PDT
Created attachment 406874 [details] UnknownError: An internal error was encountered in the Indexed Database server
Simon Bluhm
Comment 41 2020-08-19 14:40:41 PDT
I have not been able to consistently reproduce this and not sure what exactly is causing this but users of my app have reported several "Failed to execute 'transaction' on 'IDBDatabase': The database connection is closing" errors. To investigate further, I added the IDBDatabase close event to my code and it seems to fire a lot on iOS 13.3.1 but I have also seen it on iOS 13_6. This is usually on opening the app after a period of inactivity. The code now automatically reloads the app which allows access to IndexedDB again. I have updated to iOS 14 beta 5 to see if I can reproduce the error on there but I now seem to get the "UnknownError: An internal error was encountered in the Indexed Database server" error again. Only encountered this after updating my web app using skipWaiting in the Service Worker. After the page reloaded, I could no longer access IndexedDB and eventually got the error message above. I have attached the com.apple.WebKit.Networking crash log. Still trying to create a small repro. Once I can reproduce something I will post a link.
contact
Comment 42 2020-10-02 12:39:37 PDT
I've been unable to reproduce this myself, but lots of other people do seem to have the issue: https://github.com/johannesjo/super-productivity/labels/db
David Gaynor
Comment 43 2020-10-22 08:58:43 PDT
Is this bug related: https://bugs.webkit.org/show_bug.cgi?id=216769? Should we track the patch listed there as the expected fix?
Sihui Liu
Comment 44 2020-10-22 09:27:12 PDT
(In reply to David Gaynor from comment #43) > Is this bug related: https://bugs.webkit.org/show_bug.cgi?id=216769? Should > we track the patch listed there as the expected fix? No this bugs should is not related. If you are seeing "An internal error was encountered in the Indexed Database server", it's very likely that WebKit process crahses (may or may not due to IndexedDB). Please check and attach com.apple.WebKit.Networking crash files if there is any (on iOS, go to Settings > Privacy > Analytics > Analytics Data). We keep fixing networking process crashes, so it would be nice if you can try on a latest OS build. It's also useful if you can provide steps to reproduce (with your test app, web page, etc) on an older build.
Lee Robertson
Comment 45 2021-01-22 06:35:58 PST
This is still an issue
zac spitzer
Comment 46 2021-01-22 08:25:27 PST
Lee, with which version are you seeing this error? the latest release?
Lee Robertson
Comment 47 2021-01-22 08:49:03 PST
I was able to reproduce on and ipad using version 13.4.1, but we have user's report it on version 14+
Lee Robertson
Comment 48 2021-01-22 11:38:04 PST
(In reply to zac spitzer from comment #46) > Lee, with which version are you seeing this error? the latest release? I was able to reproduce on an ipad using version 13.4.1, but we have user's report it on version 14+. I will say it took a lot of effort to get this to occur. The error occurs when I try to delete a database that is used to store attachments (images, files, etc..).
Valentin Funk
Comment 49 2021-04-08 00:17:33 PDT
I have just received this error in our Bugtracking tool for iOS Mobile Safari 14.0.3 using the popular idb and idb-keyval libraries.
Frank
Comment 50 2021-04-15 10:09:26 PDT
On iOS 14.4.2 with Safari 14.0.3 I am as well recieving the error "UnknownError: Connection to Indexed Database server lost. Refresh the page to try again.". It's a wide spread error for our users and we require a fix urgently! We are consuming within a Crodova environment and error is coming randomly. Sometimes it seems to appear more frequently if you put the app into the background and then back to foreground again. But this might also be a wrong observation. With iOS first versions of iOS 14 this popped up already. Are there any known workarounds?
Tim
Comment 51 2021-04-20 03:10:05 PDT
Created attachment 426532 [details] iOS_14_5_com.apple.WebKit.Networking-2021-04-15-121002.ips I've attached further crash logs and hope that these will be sufficient to finally narrow down the bug.
Tim
Comment 52 2021-04-20 03:11:26 PDT
Created attachment 426533 [details] iOS_12_4_com.apple.WebKit.Networking-2021-04-13-110655.ips
Alexey Proskuryakov
Comment 53 2021-04-20 09:47:55 PDT
*** Bug 224804 has been marked as a duplicate of this bug. ***
Lincoln Baxter, III
Comment 54 2021-04-23 09:08:04 PDT
We are also seeing this error both on iOS 12.5.2 and also on 14.4.2: https://sentry.io/share/issue/aee6bb3031b740db8a7ca6bcb68b6bf2/ 94.44% iOS 12.5.2 26 minutes ago 5.56% iOS 14.4.2 2 hours ago `Error: Uncaught (in promise): UnknownError: Connection to Indexed Database server lost. Refresh the page to try again`
Lee Robertson
Comment 55 2021-06-18 08:16:48 PDT
Does anyone know if the new connection bug in 14.6 is related to this issue?
Lee Robertson
Comment 56 2021-06-21 09:07:59 PDT
iOS Version 14.6: I am able to reproduce the issue doing the following steps: 1. Save a couple times to IDB 2. Close the app (Return to home screen) 3. Do something in another App 4. Swipe up to show open processes 5. Open your web app again 6. (Repeat the above steps) I usually get the error to happen after a couple times doing the above steps.
Sigmund Hansen
Comment 57 2023-05-22 06:24:15 PDT
On one particular phone running iOS 16.4.1, we were seeing the "UnknownError: Connection to Indexed Database server lost. Refresh the page to try again." error. After getting access to the phone, I found there were JetsamEvent logs on it, and could see Low Memory warnings in Instruments' Activity Monitor. I'm guessing the SQLite/IndexedDB Process was chosen for eviction in this case. It was easy to reproduce, after performing about 20-50 transactions this would consistently occur. After I deleted all locally stored data from Safari. The issue disappeared. There was only about 30 MB of locally stored data. This particular phone was a tester's phone, which is only used for testing, so it doesn't have a lot of apps installed either. We are going to try and reproduce it. And I'll upload some JetsamEvent logs for you to analyze as well.
Amir Angel
Comment 58 2023-07-17 00:49:29 PDT
This is still a thing 2023 :( Anyone manage to fix this?
Chris Dumez
Comment 59 2023-07-17 08:28:30 PDT
(In reply to Amir Angel from comment #58) > This is still a thing 2023 :( > Anyone manage to fix this? We're hoping https://bugs.webkit.org/show_bug.cgi?id=259078 will help (this fix is very recent and hasn't made it into the beta builds yet).
Julian Dixon
Comment 60 2023-09-25 03:42:30 PDT
(In reply to Chris Dumez from comment #59) > (In reply to Amir Angel from comment #58) > > This is still a thing 2023 :( > > Anyone manage to fix this? > > We're hoping https://bugs.webkit.org/show_bug.cgi?id=259078 will help (this > fix is very recent and hasn't made it into the beta builds yet). Any idea on a timeline until that fix goes into production?
J. Van Boxtel
Comment 61 2023-09-29 09:06:13 PDT
(In reply to Chris Dumez from comment #59) > (In reply to Amir Angel from comment #58) > > This is still a thing 2023 :( > > Anyone manage to fix this? > > We're hoping https://bugs.webkit.org/show_bug.cgi?id=259078 will help (this > fix is very recent and hasn't made it into the beta builds yet). Did this make it into iOS 16.7 or iOS 17?
Piotr
Comment 62 2024-03-12 04:09:38 PDT
This is still happening on iOS 17.4 with "Connection to Indexed Database server lost. Refresh the page to try again". So clearly we can't rely on indexeddb on iOS safari...
Graphefruit
Comment 63 2024-04-17 04:31:55 PDT
Having the same issue. The issue now came up with 17.4.X iOS Version. I'm running on the IndexedDB solution since several years, but now the the iOS Version 17.4.X within one week I had about 10 users reporting about data loss, which I could track back that the IndexedDB could not be accessed, and therefore the data where gone when closing the application. Any news and fixes on the horizon? "Error: Uncaught (in promise): UnknownError: Connection to Indexed Database server lost. Refresh the page to try again" Thanks
Graphefruit
Comment 64 2024-04-17 04:32:20 PDT
Having the same issue. The issue now came up with 17.4.X iOS Version. I'm running on the IndexedDB solution since several years, but now the the iOS Version 17.4.X within one week I had about 10 users reporting about data loss, which I could track back that the IndexedDB could not be accessed, and therefore the data where gone when closing the application. Any news and fixes on the horizon? "Error: Uncaught (in promise): UnknownError: Connection to Indexed Database server lost. Refresh the page to try again" Thanks
Luke Abbott
Comment 65 2024-05-02 08:13:28 PDT
My Cordova-based iOS app started catching the same issue as Graphefruit and Piotr ever since the 17.4 release: "UnknownError: Connection to Indexed Database server lost. Refresh the page to try again" Hundreds of users (a good percentage of my user base) have seen this issue; it's been caught by Sentry over 3k times. Always iOS 17.4 or newer (including 17.5). I've also started getting "UnknownError: Attempt to get a record from database without an in-progress transaction" more frequently, though maybe 5% as many times as the "connection list" error.
Sihui Liu
Comment 66 2024-05-10 21:29:05 PDT
This IndexedDB connection lost error is caused by WebKit network process crash, and we have fixed different kinds of crashes and made updates to IndexedDB implementation since the bug was filed in 2019. Despite these crashes lead to the same result (connection error), they have different causes and need separate investigation in different builds, i.e. the error appeared in iOS 17.4+ is much likely to have a different underlying cause than the error in 2019 or 2021 (since we've fixed the 0xdead10cc issue indicated in the attachments). Therefore, I am going to close this stale bug. We are investigating error of iOS 17.4+ in https://bugs.webkit.org/show_bug.cgi?id=273827. Please update information and upload crash reports there.
Josh Kelley
Comment 68 2024-07-30 09:24:04 PDT
(In reply to Daken Misen from comment #67) > Review your code to ensure that IndexedDB operations are handled correctly. > The error “Attempt to get a record from database without an in-progress > transaction” suggests there might be issues with how transactions are > managed in your app. Make sure that you are properly managing transactions > and ensuring they are active when performing database operations. I'm far from an expert on IndexedDB, so I could be misunderstanding, but I'm not certain that this is correct. If I deliberately mismanage my IndexedDB transactions in JavaScript, I get errors similar to the following: > InvalidStateError: Failed to execute 'objectStore' on 'IDBTransaction': The transaction finished. > TransactionInactiveError: Failed to execute 'get' on 'IDBObjectStore': The transaction is inactive or finished. These errors have specific names (e.g., "InvalidStateError"), and they reference JavaScript method and class names, and the WebKit source code suggests (to me, as a developer unfamiliar with the codebase) that they're thrown by the C++ code that directly implements the JavaScript APIs. By contrast, the "UnknownError: Attempt to get a record from the database without an in-progress transaction" is thrown at a lower level, by the internal IndexedDB server's SQLite backing store; it feels like it may be an internal WebKit bug (WebKit internally mismanaging its transactions) rather than a JS bug. I could easily be misunderstanding, though.
Luke Abbott
Comment 69 2024-07-30 10:01:28 PDT
(In reply to Daken Misen from comment #67) > Review your code to ensure that IndexedDB operations are handled correctly. > The error “Attempt to get a record from database without an in-progress > transaction” suggests there might be issues with how transactions are > managed in your app. Make sure that you are properly managing transactions > and ensuring they are active when performing database operations. The issue that I and many other developers are running into is caused by an iOS system issue introduced in 17.4, not any issues with JS code. Please see https://bugs.webkit.org/show_bug.cgi?id=273827, where this bug was discussed in greater detail.
Alexey Proskuryakov
Comment 70 2024-09-25 10:51:54 PDT
Comment 67 from "Daken Misen" was spam (external link inconspicuously embedded), and it is now removed.
fullon_mac
Comment 71 2024-12-01 18:20:16 PST
Same issue using Ionic/Capacitor/Firebase on iOS.
Note You need to log in before you can comment on or make changes to this bug.