Flutterfire Firestore抛出了“ OA&#x27的实例”。是null'听
我将数据从firestore加载到我的flutter应用程序中。为此,我使用Flutterfire Firestore ODM。在iOS模拟器和Release Android应用程序上一切正常。但是在版本的iOS应用程序上,我会收到以下错误,而没有进一步的解释:
'oa'实例。错误丢弃。
其他请求正常工作。
我无法弄清楚什么是错误的,也找不到在线答案。在firebase crashlytics中,我可以看到以下内容:
Non-fatal Exception: FlutterError
0 ??? 0x0 (null). #00 abs 0 _kDartIsolateSnapshotInstructions+0x167a27
1 ??? 0x0 (null). #01 abs 0 _kDartIsolateSnapshotInstructions+0x167a87
2 ??? 0x0 (null). #02 abs 0 _kDartIsolateSnapshotInstructions+0x169b9b
3 ??? 0x0 (null). #03 abs 0 _kDartIsolateSnapshotInstructions+0x1699bb
4 ??? 0x0 (null). #04 abs 0 _kDartIsolateSnapshotInstructions+0x16995f
(this continues until line 59)
我的代码:
FirestoreBuilder(
ref: context.read<VacationRepository>().getDashboardVactions(),
builder: (context, AsyncSnapshot<VacationEntityQuerySnapshot> snapshot, child) {
if (snapshot.connectionState == ConnectionState.waiting) {
return ReuseableWidgets.linearSpinner;
}
if (snapshot.hasError) {
FirebaseCrashlytics.instance.recordError(
snapshot.error,
snapshot.stackTrace,
);
// ^ this is where the error is caught
return ReuseableWidgets.somethingWentWrong;
}
...
getDashboardVacations()
is:
FirestoreListenable<VacationEntityQuerySnapshot> getDashboardVactions() {
String currentUser = _authenticationRepository.currentUser.id;
return vacationsRef.whereMembers(arrayContainsAny: [currentUser]);
}
I load data from Firestore into my Flutter app. For that I use the Flutterfire Firestore ODM. Everything works fine on the iOS Simulators and the release android app. But on the release iOS app I get the following error with no further explanation:
Instance of 'OA'. Error thrown null.
Other requests work just fine.
I cannot figure out what is wrong and cannot find an answer to this online. In Firebase Crashlytics I get to see this:
Non-fatal Exception: FlutterError
0 ??? 0x0 (null). #00 abs 0 _kDartIsolateSnapshotInstructions+0x167a27
1 ??? 0x0 (null). #01 abs 0 _kDartIsolateSnapshotInstructions+0x167a87
2 ??? 0x0 (null). #02 abs 0 _kDartIsolateSnapshotInstructions+0x169b9b
3 ??? 0x0 (null). #03 abs 0 _kDartIsolateSnapshotInstructions+0x1699bb
4 ??? 0x0 (null). #04 abs 0 _kDartIsolateSnapshotInstructions+0x16995f
(this continues until line 59)
My Code:
FirestoreBuilder(
ref: context.read<VacationRepository>().getDashboardVactions(),
builder: (context, AsyncSnapshot<VacationEntityQuerySnapshot> snapshot, child) {
if (snapshot.connectionState == ConnectionState.waiting) {
return ReuseableWidgets.linearSpinner;
}
if (snapshot.hasError) {
FirebaseCrashlytics.instance.recordError(
snapshot.error,
snapshot.stackTrace,
);
// ^ this is where the error is caught
return ReuseableWidgets.somethingWentWrong;
}
...
and getDashboardVacations()
is:
FirestoreListenable<VacationEntityQuerySnapshot> getDashboardVactions() {
String currentUser = _authenticationRepository.currentUser.id;
return vacationsRef.whereMembers(arrayContainsAny: [currentUser]);
}
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我不知道发生了什么或是如何发生,但是当使构建混淆时,此功能破裂了。
因此,只需删除
- obfuscate
映射即可再次起作用。I do not know what or how it happens, but when obfuscating the build this feature broke.
So just remove the
--obfuscate
map and it works again.