我目前正在构建一个 flutter 应用程序并使用 mongo 领域进行身份验证、索引搜索以及函数调用功能。
一切都工作正常,直到我运行命令:flutter upgrade,这导致我启动应用程序时抛出以下错误:
D/libGLESv2( 6862): STS_GLApi : DTS, ODTC are not allowed for Package : com.example.auction_app
I/flutter ( 6862): 2023-11-18T22:15:45.054885: [ERROR] Realm: HTTP Transport: Exception executing get https://us-east-1.aws.realm.mongodb.com/api/client/v2.0/app/application-0-ont/location: HandshakeException: Handshake error in client (OS Error:
I/flutter ( 6862): CERTIFICATE_VERIFY_FAILED: certificate has expired(handshake.cc:393))
I/flutter ( 6862): an error has occured during retrieveAllProducts function
I/flutter ( 6862): AppException: non-zero custom status code considered fatal, status code: 999
I/flutter ( 6862): []
I/flutter ( 6862): 2023-11-18T22:15:45.240942: [ERROR] Realm: App: log_in_with_credentials failed: 0 message: non-zero custom status code considered fatal
我做了一些谷歌搜索,发现需要将以下行添加到 androidmanifest.xml 文件:
<uses-permission android:name="android.permission.INTERNET" />
但不幸的是,这并没有解决问题。
我确实允许从领域应用程序设置中的任何地方进行访问 我确实允许在应用程序中进行匿名身份验证 这是颤振代码:
Future<List<dynamic>> retrieveAllProducts(arg) async {
print("RetrieveAllProducts Function");
try {
final user = await app.logIn(emailPwCredentials);
products = await user.functions.call('allProducts');
} catch (e) {
print('an error has occured during retrieveAllProducts function');
print(e);
}
print(products);
return products;
}
有谁知道解决这个问题的办法吗? (再次一切工作正常,直到我运行命令 flutter update )
我再次尝试将互联网权限添加到 AndroidManifest.xml 文件中,希望能够解决问题,但不幸的是它没有!
我也有同样的问题。 IOS 设备可以登录,Android 设备不行。还没找到解决办法。