-
Notifications
You must be signed in to change notification settings - Fork 257
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
issue with "User-Agent was already configured successfully" #5244
Comments
Hi @mobiletoly, thanks for taking the time to submit this issue. We will investigate this isolate configuration behavior and update you as we can. |
Hi @mobiletoly, I wanted to note that we do not officially support Amplify in multiple isolates, but I was able to reproduce the issue you mentioned. We should not be throwing the |
Hi @tyllark , Any updates on the following issue. Noticed this while initialising Amplify in Isolates. Quick update would be of great help. |
Hi @mohammedhashim790 , unfortunately we do not have any updates or a timeline for this fix at this time. We have an open issue #5302 for tracking isolate support, so please give these issues a thumbs up to help us determine an interest in these features. |
Hi, we have also encountered this error on amplify_datastore v2.5.0 when hot reloading as well as when activities are destroyed/recreated on Android (replicated by enabling "Don't keep activities"). As a temporary workaround we have created a fork with an additional check to ignore this message when seen. This does appear to then hit another issue when the activity is destroyed (#5458) but not sure if it is related.
From our testing with previous amplify_datastore versions it appears this was introduced between amplify_datastore v2.1.0 and v2.2.1. |
@HarkerTech thanks for providing additional information. we will look into this and provide updates as we have them. |
Hi @mobiletoly @mohammedhashim790 @HarkerTech, a fix for this issue was just released for amplify_datastore 2.6.0. Please update your packages and let us know if you have any issues! |
Hi @tyllark , Thanks for the update! |
This issue is now closed. Comments on closed issues are hard for our team to see. |
Description
This issue is related to amplify_datastore.dart file.
in method:
this code:
so this line
Map<String, String>.from(e.details as Map)
throws error (type 'Null' is not a subtype of type 'Map<dynamic, dynamic>' in type cast) because e.details can be null.in my case PlatformException contains this information
(as you can see
e.details
field isnull
there)I would suggest to ignore this "User-Agent was already configured successfully" error, because for example in my case I'm initializing Amplify from the main UI thread, but there is also a possibility that some separate isolate is launched and it tries to initialize Amplify as well (have to deal with background services). Since there is no way to detect from one isolate that Amplify was already configured in another isolate - I end up having this issue.
Categories
Steps to Reproduce
Screenshots
No response
Platforms
Flutter Version
3.24.0-0.2.pre
Amplify Flutter Version
3.2.0
Deployment Method
Amplify CLI
Schema
No response
The text was updated successfully, but these errors were encountered: