Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/reactjs/27.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/ant/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 获取错误:FIRESTORE(8.1.1)内部断言失败:意外状态_Javascript_Reactjs_Firebase - Fatal编程技术网

Javascript 获取错误:FIRESTORE(8.1.1)内部断言失败:意外状态

Javascript 获取错误:FIRESTORE(8.1.1)内部断言失败:意外状态,javascript,reactjs,firebase,Javascript,Reactjs,Firebase,我正在firestore中添加聊天室名称,但在添加名称时出现此错误 index.esm.js:204 Uncaught Error: FIRESTORE (8.1.1) INTERNAL ASSERTION FAILED: Unexpected state 24 | const addChat = ()=>{ 25 | const chatName = prompt('type the chat name') 26 | > 27 | db.collection

我正在firestore中添加聊天室名称,但在添加名称时出现此错误

index.esm.js:204 Uncaught Error: FIRESTORE (8.1.1) INTERNAL ASSERTION FAILED: Unexpected state
 24 | const addChat = ()=>{
 25 |     const chatName = prompt('type the chat name')
 26 | 
> 27 |     db.collection('chats').add({
  28 |     ^    chatName : chatName,
 29 |     })
 30 | }
这是我的源代码

     const addChat = ()=>{
     const chatName = prompt('type the chat name')

     db.collection('chats').add({
        chatName : chatName,
    })
 } 
我犯了什么错误吗?谢谢