简体   繁体   English

Mac Safari浏览器中的openDatabase错误

[英]openDatabase error in mac safari

When try to save/load from websqlite using "window.openDatabase(...)" in mac safari, sometimes fails with the following exception: 当尝试在Mac Safari中使用“ window.openDatabase(...)”从websqlite保存/加载时,有时会失败,并带有以下异常:

sqlite cannot open database file

Then the websql can no-longer use unless reload the page. 然后,除非重新加载页面,否则无法再使用websql。

Does anybody know how it can be solved? 有人知道如何解决吗? THX. 谢谢。

ps It`s on desktop mac safari, not ios safari or the issue "less or more data stored more than 5MB question". ps是在台式机Mac Safari上,而不是ios Safari上,或者出现“存储的数据少于或更多,超过5MB的问题”。

The problem maybe that Safari doesn't seem to be able to garbage collect openDatabase connections, are you making a lot of openDatabase calls? 问题可能是Safari似乎无法垃圾收集openDatabase连接,您是否进行了许多openDatabase调用? perhaps one per row? 也许每排一个? to avoid this make sure you cache and reuse your database handles. 为了避免这种情况,请确保您缓存并重用数据库句柄。

For further information, see this task which has a good discussion. 有关更多信息,请参见对此任务进行了很好的讨论。

https://github.com/pouchdb/pouchdb/issues/1068 https://github.com/pouchdb/pouchdb/issues/1068

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Safari 7发生openDatabase错误 - openDatabase error at Safari 7 无效的 State 错误,移动 Safari 调用 openDatabase 中的 DOM 异常 11 - Invalid State Error, DOM Exception 11 in Mobile Safari calling openDatabase openDatabase 在 Android PhoneGap 应用程序中创建错误 - openDatabase creates error in Android PhoneGap application Notification.requestPermission 在 Mac 版本的 Safari 中引发错误 - Notification.requestPermission throws an error in Mac versions of Safari 将数据库下载到localfilesystem并使用opendatabase导致没有此类表错误消息 - downloading database to localfilesystem and using opendatabase results in no such table error message 错误处理SQL:TypeError:window.openDatabase不是一个函数 - Error processing SQL: TypeError: window.openDatabase is not a function Ionic2错误类型“窗口”上不存在属性“ openDatabase” - Ionic2 error Property 'openDatabase' does not exist on type 'Window' Window.localstorage在MAC OS野生动物园浏览器中引发脚本错误 - Window.localstorage throws script error in MAC OS safari browser 显示未捕获的错误:无法在cordova项目中调用openDatabase方法 - showing uncaught error :cannot call method openDatabase in cordova project javaScript 运行时错误:对象不支持属性或方法“openDatabase” - javaScript runtime error: Object doesn't support property or method 'openDatabase'
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM