pouchDB在角度/离子应用程序中与我的Cloudant数据库进行通信时出现了一个很大的错误。
你能帮我解决一下如何解决这个问题吗?
POST https://louisromain.cloudant.com/boardline_users/_bulk_get?revs=true&attachments=true&_nonce=1446478625328 400 (Bad Request)
pouchdb.min.js:8 Database has a global failure DOMError {}message: ""name: "QuotaExceededError"__proto__: DOMErrora.8.G.onsuccess.H.onabort @ pouchdb.min.js:8
ionic.bundle.min.js:139 o {status: 500, name: "abort", message: "unknown", error: true, reason: "QuotaExceededError"}error: truemessage: "unknown"name: "abort"reason: "QuotaExceededError"result: Objectdoc_write_failures: 1docs_read: 1docs_written: 0end_time: Mon Nov 02 2015 16:37:05 GMT+0100 (CET)errors: Array[1]last_seq: "3478-g1AAAAFJeJzLYWBgYMlgTmGQT0lKzi9KdUhJMtXLSs1LLUst0kvOyS9NScwr0ctLLckBKmRKZEiy____f1YGUxIDA3N6LlCMPdXM1MzEMo1oM5IcgGRSPcKYcLAxKZYGlslpSajGmOA2Jo8FSDI0ACmgSftRXJSSamFoYWmOapQ5IaMOQIwCuooZZFQhxHPmJkCURtigLAAxFGUZ"ok: falsestart_time: Mon Nov 02 2015 16:36:59 GMT+0100 (CET)status: "aborting"__proto__: Objectstatus: 500__proto__: r(anonymous function) @ ionic.bundle.min.js:139b.$get @ ionic.bundle.min.js:111(anonymous function) @ ionic.bundle.min.js:151a.$get.n.$eval @ ionic.bundle.min.js:165a.$get.n.$digest @ ionic.bundle.min.js:163(anonymous function) @ ionic.bundle.min.js:166e @ ionic.bundle.min.js:74(anonymous function) @ ionic.bundle.min.js:76
11ionic.bundle.min.js:139 Error: Failed to execute 'transaction' on 'IDBDatabase': The database connection is closing.
at Error (native)
at a.9.n.openTransactionSafely (http://localhost:8101/lib/pouchdb/dist/pouchdb.min.js:8:9233)
at i.a.8.e._getLocal (http://localhost:8101/lib/pouchdb/dist/pouchdb.min.js:8:2521)
at i.<anonymous> (http://localhost:8101/lib/pouchdb/dist/pouchdb.min.js:7:6737)
at i.<anonymous> (http://localhost:8101/lib/pouchdb/dist/pouchdb.min.js:10:28092)
at i.a.90.t.exports (http://localhost:8101/lib/pouchdb/dist/pouchdb.min.js:10:28931)
at http://localhost:8101/lib/pouchdb/dist/pouchdb.min.js:9:28802
at i.<anonymous> (http://localhost:8101/lib/pouchdb/dist/pouchdb.min.js:9:28722)
at i.a.90.t.exports [as get] (http://localhost:8101/lib/pouchdb/dist/pouchdb.min.js:10:28931)
at i.angular.module.constant.service.$q.qify [as get] (http://localhost:8101/lib/angular-pouchdb/angular-pouchdb.js:35:27)(anonymous function) @ ionic.bundle.min.js:139b.$get @ ionic.bundle.min.js:111(anonymous function) @ ionic.bundle.min.js:151a.$get.n.$eval @ ionic.bundle.min.js:165a.$get.n.$digest @ ionic.bundle.min.js:163(anonymous function) @ ionic.bundle.min.js:166e @ ionic.bundle.min.js:74(anonymous function) @ ionic.bundle.min.js:76
答案 0 :(得分:3)
错误是设备空间不足。不幸的是,当设备的存储空间太小时,这是IndexedDB本身抛出的错误,所以除了使用更少的空间之外,你无能为力。 PouchDB的compact()
可以提供帮助;如果你想减少文件的大小,还有transform-pouch
插件。