Every day my IOS users get this error in Safari (IOS 15.2.1). Uncaught (in promise): UnknownError: An internal error was encountered in the Indexed Database server Subsequent: Uncaught (in promise): UnknownError: Connection to Indexed Database server lost. Refresh the page to try again Has to reload the page everytime to get it back :( It's a standalone PWA builded with Angular 13, using localForage for writing to Safari IndexedDB I cannot find any pattern in it, can even reproduce it my self, it just happens all of a sudden... Please help?
If you can find a crash log associated with this happening, please attach it to this bug. Instructions can be found at https://developer.apple.com/bug-reporting/profiles-and-logs/
I want to help as much as possible with this error. But which instruction should I pick for iOS Safari IndexedDB? https://developer.apple.com/bug-reporting/profiles-and-logs/?platform=ios
That would be "Crash Logs for iOS".
Created attachment 450014 [details] Crash reports Thanks step "3. Click Sync in the bottom right corner of the window." I could not find in Windows 10. But I find som logs on the iPad device in analysis data, I hope it's the same? Some users say it happens when there go out of the app and back in later!
I don't see anything standing out as a smoking gun to me in these logs, unfortunately. Added some more folks who could have suggestions on how to investigate this.
I'm not 100% sure yet, but it seems that my iOS users now are getting the error "Attempt to iterate a cursor that doesn't exist", instead of "An internal error was encountered in the Indexed Database server" after installing iOS 15.3! Maybe I can do something about this error instead of reloading the page? The error occurs when they exit the app and return later.
<rdar://problem/88323466>
My users still get this error "Connection to Indexed Database server lost. Refresh the page to try again" in iOS 15.3. Please tell me what to do to get a more detailed log?
We also started having that exact error message "Connection to Indexed Database server lost. Refresh the page to try again". We also seem to have higher memory usage and crashes with "highwater" as the reason
The connection error can happen when WebKit's networking process crashes/gets killed during IndexedDB operations (it's not necessarily an IndexedDB bug but process exits so the operation cannot finish). If you can reproduce the issue or see the issue on your device, can you check if you have files on your device with name com.apple.WebKit.Networking? For the cursor error, does it also happen when users background Safari too? WebKit may actively abort an IDB transaction when process is backgrounded. A transaction can run in background until system finally decides to suspend the process, and the transaction will be rolled back (since a process cannot hold lock to a database when it's suspended). You may set onabort listener on IDBTransaction and see if the transaction gets aborted when the cursor error happens. If so, maybe try breaking down long-running transactions to smaller ones, so it has a chance to finish before timeout, and it may be easier to retry even if it's aborted.
For more than two weeks ago, I changed the libary "Localforage" to "idb" which is used to communicate with IndexedDB and my users also updated iOS to 15.4.1, since then we have not seen the error!!! :) Is it "Idb" or is it you guys who has done some magic?
My users get this messages often when the code for using Dexie.js is used in the application. The application is written in Angular 14. Here is some of the information from the browser error. -- UserAgent: ------------------------------- Mozilla/5.0 (iPhone; CPU iPhone OS 15_6_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.6.1 Mobile/15E148 Safari/604.1 ------------------------------- Error message (it is actually repeating itself in the same message, might be becauce something in dexie): ------------------------------- Uncaught (in promise): DatabaseClosedError: UnknownError Connection to Indexed Database server lost. Refresh the page to try again UnknownError: Connection to Indexed Database server lost. Refresh the page to try again DatabaseClosedError: UnknownError Connection to Indexed Database server lost. Refresh the page to try again UnknownError: Connection to Indexed Database server lost. Refresh the page to try again ------------------------------- -- Stacktrace (deminified) (dont know if it is helpful): ------------------------------- (webpack:///node_modules/zone.js/fesm2015/zone.js:1212:65) func: z, code: (value && value.stack ? '\n' + value.stack : '')); (webpack:///node_modules/zone.js/fesm2015/zone.js:1138:23) func: , code: const TYPE_ERROR = 'Promise resolved with itself'; (webpack:///node_modules/zone.js/fesm2015/zone.js:1154:19) func: , code: catch (err) { (webpack:///node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js:32:0) func: a, code: _next(undefined); (webpack:///node_modules/@babel/runtime/helpers/esm/objectSpread2.js:4:0) func: S, code: var keys = Object.keys(object); (webpack:///packages/core/src/zone/ng_zone.ts:413:35) func: onInvoke, code: (webpack:///node_modules/zone.js/fesm2015/zone.js:134:49) func: run, code: return this._zoneDelegate.invoke(this, callback, applyThis, applyArgs, source); (webpack:///node_modules/zone.js/fesm2015/zone.js:1294:43) func: , code: return resolvePromise(new this(null), RESOLVED, value); (webpack:///packages/core/src/zone/ng_zone.ts:398:39) func: onInvokeTask, code: (webpack:///node_modules/zone.js/fesm2015/zone.js:178:57) func: runTask, code: return this._zoneDelegate.invokeTask(this, task, applyThis, applyArgs); (webpack:///node_modules/zone.js/fesm2015/zone.js:585:42) func: _, code: task.zone.runTask(task, null, null); (webpack:///node_modules/zone.js/fesm2015/zone.js:491:20) func: invokeTask, code: drainMicroTaskQueue(); -------------------------------
Forgot to say that this never have happened on any android device, only IOS.