这个代码我检查了好几遍了,和示例代码是一样的,但是示例代码是对的,我的就是错的。
关注
码龄 粉丝数 原力等级 --
- 被采纳
- 被点赞
- 采纳率
已采纳
Failed to execute 'add' on 'IDBObjectStore'
收起
- 写回答
- 好问题 0 提建议
- 关注问题
微信扫一扫点击复制链接分享
- 邀请回答
- 编辑 收藏 删除 结题
- 收藏 举报
1条回答 默认 最新
- 关注
码龄 粉丝数 原力等级 --
- 被采纳
- 被点赞
- 采纳率
qq_31738075 2017-02-06 03:49关注我自己找到了原因,就是把keyPath,写成了KeyPath。
本回答被题主选为最佳回答 , 对您是否有帮助呢? 本回答被专家选为最佳回答 , 对您是否有帮助呢? 本回答被题主和专家选为最佳回答 , 对您是否有帮助呢?评论 打赏解决 1无用 1举报
微信扫一扫点击复制链接分享
评论按下Enter换行,Ctrl+Enter发表内容
报告相同问题?
提交
- 2020-09-16 15:36伏地躲猫猫的博客 Failed to execute 'add' on 'IDBObjectStore': 源码 就这么一小段,一开始是没有添加主键{autoIncrement:true} 但是添加后还是报错,怀疑是浏览器缓存的问题,就把浏览器中 创建的数据库给删除了,更改版本号,...
- 2024-07-04 16:45weixin_44689966的博客 DOMException: Failed to execute 'put' on 'IDBObjectStore': # could not be cloned.
- 2024-12-19 15:45
IndexedDB storeDrawing对象时发生catch报 DOMException: Failed to execute ‘put‘ on ‘IDBObjectStore‘: HTMLCan
Holicxx的博客 IndexedDB storeDrawing对象时发生catch报 DOMException: Failed to execute 'put' on 'IDBObjectStore': HTMLCanvasElement object could not be cloned. at eval (webpack-internal:///./src/utils/indexedDB.js:... - 2022-09-12 21:48三爷麋了鹿的博客 最近项目中遇到一个小问题,系统在前端页面上传图片时,后台报400错误:Uncaught (in promise) DOMException: Failed to execute ‘put’ on ‘IDBObjectStore’: HTMLInputElement object could not be cloned....
- 2024-12-09 19:58怪咖学生的博客 request.onerror = function(event) { console.error('Cursor request error:', event.target.error); }; 在这个代码片段中,transaction 是一个事务对象,index 是通过事务对象获取的索引。openCursor 方法用于...
- 2022-11-22 11:51新生代农民工官方认证码农小拽的博客 } 注意事项: 1)添加的数据中,必须包含keyPath值,不然就报错 Failed to execute 'add' on 'IDBObjectStore': Evaluating the object store's key path did not yield a value. 2)添加数据时,keyPath值不能重复...
- 2020-07-01 16:05黑月DM的博客 仔细看的话增删改查每种操作都会有这一句,所以我自然而然的想把这个当成公共变量,结果会报错的 Failed to execute 'add' on 'IDBObjectStore': The transaction has finished. 简单理解就能明白transaction结束了...
- 2019-01-23 17:29sunqy1995的博客 DOMException: Failed to execute ‘put’ on ‘IDBObjectStore’: Evaluating the object store’s key path did not yield a value. 通过查找发现出现这种错误的原因是keypath在保存的数据中没有定义,在保存的...
- 2019-08-05 22:38罪无囚的博客 Uncaught DOMException: Failed to execute ‘put’ on ‘IDBObjectStore’: The object store uses in-line keys and the key parameter was provided. 所以要么不设置内联主键 要么设置不使用put第二个参数 ...
- 2021-02-15 02:37qq_44472859的博客 控制台提示:failed to execute ‘put’ on ‘idbobjectstore’ evaluating the object store’s key path did not yield a value 应对方案:存储(put方法)数据时必须一起存入key值,或者使用key generator({...
- 2021-05-30 00:51st紫月的博客 1.Uncaught DOMException: Failed to execute ‘transaction’ on ‘IDBDatabase’: A version change transaction is running. 出错代码块: 错误原因,有一个事物在运行,不能打开第二个事物 var request = ...
- 2020-12-29 11:35Jimmia的博客 IndexedDB封装及问题处理 1. 封装 基于单例模式进行indexedDB的封装(源码在最后),包括CURD操作。... 错误信息: indexedDB.js:156 add data failed DOMException: Failed to execute 'tra...
- 2016-11-21 19:56柒青衿的博客 Failed to execute ‘createObjectStore’ on ‘IDBDatabase’: The database is not running a version change transaction. 这是由于你在success事件的回调中调用createObjectStore方法,该方法应该在...
- 2015-02-02 15:08小八i小螃蟹的博客 1.调用函数中使用的变量名与主函数中一致,没有影响 #include int isFullsquare( int n ) { for( int i = 1; i * i ; i++ ) if ( i * i== n ) return 1; return 0; } int main() { for( int i = 1;
- 2018-07-27 07:43weixin_33704234的博客 Failed to execute 'add' on 'IDBObjectStore' : The transaction has finished. 复制代码 说明这时事务已经失效了,需要重新建立一个事务,才能进行添加! 如果没有 then 方法,可以直接用 store 添加 ---------...
- 2017-02-09 15:41PkJY的博客 failed to execute ‘put’ on ‘idbobjectstore’ evaluating the object store’s key path did not yield a value 参考原文 储存数据的时候必须要带上object store的key一起储存,或者使用一个key ...
- 2021-07-16 00:41风火一回的博客 问题 Failed to execute ‘transaction’ on ‘IDBDatabase’: A version change transaction is running. 解答: upgradeneeded会默认打开一个读写事务,如果触发了该事件,那么所有的读写操作应该基于已有的事务去...
- 2021-06-30 13:59qq_39740095的博客 error: null, onabort: null, …} __proto__: IDBRequest */ db.transaction(['person'], 'readwrite').objectStore('person').get('1-2').result /* VM6615:1 Uncaught DOMException: Failed to read the 'result'...
- 没有解决我的问题, 去提问