无法保存到Firestore中的整数和浮点数组

时间:2018-12-07 13:52:12

标签: javascript firebase google-cloud-firestore

我正在使用Firestore保存整数数组和浮点数。

但是,Firestore不允许我保存该数组,并且不会返回错误(例如在catch语句中)

我的数组的大小为71201

(71201) [84, 96, 96, 96, 91.8, 97, 98, 98, 98, 99, 99, 99, 99, 99, 98, 98, 98, 98, 98, 98, 98, 96, 95, 93, 91, 89, 88, 87, 87, 87, 88, 89, 91, 94, 96, 98, 99, 100, 101, 101, 101, 98, 96, 92, 89, 87, 87, 87, 87, 89, 91, 93, 95, 96, 97, 98, 98, 99, 99, 100, 100, 100, 100, 100, 100, 101, 102, 103, 104, 105, 106, 108, 109, 110, 111, 113, 113, 114, 115, 116, 117, 117, 118, 118, 119, 120, 120, 121, 122, 122, 122, 123, 124, 124, 125, 126, 127, 127, 127, 127, …]

读取限制documentation的整数大小为8字节

因此尝试在此处做一些数学运算(可能会失败)

71201*8/1024 = 
556.2578125

即〜556KB

据我了解,限制不是问题。

我也只能想象这是由于网络选项卡视图造成的问题(不接受大数组):

enter image description here

打开请求之一的标题如下:

enter image description here

并且响应始终为空

enter image description here

promise的catch语句没有被调用,我已经等待了很多分钟(当时都没有)

this.afs.collection('events').doc(event.getID()).set({values: test}).then((some) => {
      debugger;
    }).catch((e) => {
      debugger;
    });

任何想法我怎么做错了?

P.S。现在已经大约20分钟了,我的网络标签随着那些失败的请求而不断增长。

更新

如果我通过JSON.stringify等将该数组设置为字符串,则该操作将在几秒钟内保存。

0 个答案:

没有答案
相关问题