我使用Flutter、Timer和Firebase/Firestore.批处理来执行类似示例代码的操作,以定期在Mac上保存数据。https://github.com/tomoyuki28jp/flutterfire_scheduled_batch_write_sample2
当我运行我的应用程序几天,我会随机得到这个错误:
flutter: [cloud_firestore/permission-denied] The caller does not have permission to execute the specified operation.
flutter:
#0 MethodChannelWriteBatch.commit
package:cloud_firestore_platform_interface/…/method_channel/method_channel_write_batch.dart:51
<asynchronous suspension>在热重新加载之后,它开始工作again.
我怎样才能调查原因?
发布于 2021-05-20 03:24:10
用户凭据确实会随着时间的推移而过期-热重加载可能会重新建立8月会话。众所周知,Auth需要定期重新建立-- Firestore并不是真正的永久连接。您的代码需要能够响应Auth状态中的更改(有一个库函数来侦听Auth事件),并相应地做出响应--如果这是您的意图,包括重新授权。
https://stackoverflow.com/questions/67613107
复制相似问题