-
Notifications
You must be signed in to change notification settings - Fork 253
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
fix(datastore): properly handle multiple configures on Android #5740
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ekjotmultani
approved these changes
Dec 4, 2024
Equartey
approved these changes
Dec 11, 2024
14 tasks
14 tasks
tyllark
added a commit
to tyllark/amplify-flutter
that referenced
this pull request
Jan 13, 2025
ekjotmultani
added a commit
that referenced
this pull request
Jan 14, 2025
### Features - feat(storage): add multi-bucket feature support ([#5681](#5681)) ### Fixes - fix(aws_common): removed JS streamed requests ([#5797](#5797)) - fix(datastore): properly handle multiple configures on Android ([#5740](#5740)) Updated-Components: amplify_lints, Amplify Flutter, Amplify Dart, Amplify UI, DB Common, Secure Storage, AWS Common, Smithy, Worker Bee
tyllark
added a commit
that referenced
this pull request
Jan 14, 2025
tyllark
pushed a commit
that referenced
this pull request
Jan 14, 2025
### Features - feat(storage): add multi-bucket feature support ([#5681](#5681)) ### Fixes - fix(aws_common): removed JS streamed requests ([#5797](#5797)) - fix(datastore): properly handle multiple configures on Android ([#5740](#5740)) Updated-Components: amplify_lints, Amplify Flutter, Amplify Dart, Amplify UI, DB Common, Secure Storage, AWS Common, Smithy, Worker Bee
tyllark
pushed a commit
to tyllark/amplify-flutter
that referenced
this pull request
Jan 14, 2025
### Features - feat(storage): add multi-bucket feature support ([aws-amplify#5681](aws-amplify#5681)) ### Fixes - fix(aws_common): removed JS streamed requests ([aws-amplify#5797](aws-amplify#5797)) - fix(datastore): properly handle multiple configures on Android ([aws-amplify#5740](aws-amplify#5740)) Updated-Components: amplify_lints, Amplify Flutter, Amplify Dart, Amplify UI, DB Common, Secure Storage, AWS Common, Smithy, Worker Bee
tyllark
pushed a commit
that referenced
this pull request
Jan 14, 2025
### Features - feat(storage): add multi-bucket feature support ([#5681](#5681)) ### Fixes - fix(aws_common): removed JS streamed requests ([#5797](#5797)) - fix(datastore): properly handle multiple configures on Android ([#5740](#5740)) Updated-Components: amplify_lints, Amplify Flutter, Amplify Dart, Amplify UI, DB Common, Secure Storage, AWS Common, Smithy, Worker Bee
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Issue #, if available:
#5244
#5458
Description of changes:
Calling configure multiple times on Datastore results in exceptions and other unexpected behavior:
AmplifyAlreadyConfiguredException
rather thanUser-Agent was already configured successfully
so it can be handle upstream.onDetachedFromEngine
otherwise events would be duplicated from the listeners that were not cleaned up.nativeAuthPlugin
a companion object since we cannot add a new plugin after calling configure, but we need to handle the case whereonDetachedFromEngine
sets this value to null and it is reassigned viaonAttachedToEngine
from a new instance ofAmplifyDataStorePlugin
.By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.