Closed markjoseultra closed 1 month ago
Sorry that you are facing this issue and thanks for reporting it. We will look into this and get back to you when we have updates. meanwhile do you have more detailed error messages to share with us?
@markjoseultra Without more info we are not going to be able to triage this issue. aws_amplify_impl.dart
and AWSAmplifyImpl
are not part of our code base. If those are files in your app, please share them so we can see the code causing the issue.
Hi Team here is the code that triggers the error previously, now it works but please continue the investigation
Future<Map<String, dynamic>> query(
String query,
Map<String, dynamic> variables,
) async {
try {
var operation = Amplify.API.query(
request: GraphQLRequest<String>(
document: query,
variables: variables,
apiName: "ticklr-lambda",
headers: {
"Authorization": await LambdaToken.generate(),
},
),
);
var response = await operation.response.timeout(
Duration(minutes: AppConfig.REMOTE_REQUEST_TIMELIMIT), onTimeout: () {
throw Exception('Weak internet connection, please try again');
});
if (response.hasErrors) {
throw Exception(response.errors[0].message);
}
if (response.data == null && response.data!.isEmpty) {
throw Exception('Unable to fetch data from server, please try again.');
}
String? data = response.data;
return jsonDecode('$data');
} on GraphQLResponseError catch (e) {
throw Exception(e.message.toString());
} on ApiException catch (e) {
throw Exception(e.message.toString());
} on LambdaException catch (e) {
throw Exception(e.message.toString());
} catch (e) {
rethrow;
}
}
@markjoseultra Thanks for sharing the code. Without reproducible steps or a stack trace that indicates the error is generated from Amplify Flutter we will not be able to investigate. Let us know if you can provide reproducible steps. Otherwise we will close this out. We can re-open in the future if you are able to provide more info.
This issue is now closed. Comments on closed issues are hard for our team to see. If you need more assistance, please open a new issue that references this one.
Description
Hi Team,
We keep getting this error but it resolves itself, earlier today all our users experience at the same time and there is a downtime of an hour then it got resolved again and none of us created a fix so it remains a mystery.
Categories
Steps to Reproduce
Screenshots
Platforms
Flutter Version
3.22.2
Amplify Flutter Version
2.1.0
Deployment Method
AWS CDK
Schema
No response