Skip to content
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(amplify-flutter): MissingPluginException when android app restarts #345

Merged
merged 23 commits into from
Feb 3, 2021

Conversation

Amplifiyer
Copy link
Contributor

@Amplifiyer Amplifiyer commented Feb 3, 2021

Issue #, if available: fixed #99

Description of changes:

  • Swallow exceptions that are thrown in the onAttachedToEngine method as they are never reached to the user and also never even logged.
  • Update example app with new exceptions
  • Fix AmplifyAlreadyConfiguredException
  • Demonstrate in all of our examples how to catch and work around AmplifyAlreadyConfiguredException

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@Amplifiyer Amplifiyer requested a review from a team as a code owner February 3, 2021 05:46
@codecov
Copy link

codecov bot commented Feb 3, 2021

Codecov Report

Merging #345 (036edd1) into master (193f36a) will decrease coverage by 0.32%.
The diff coverage is 4.44%.

@@            Coverage Diff             @@
##           master     #345      +/-   ##
==========================================
- Coverage   69.42%   69.09%   -0.33%     
==========================================
  Files         238      238              
  Lines        7070     7105      +35     
  Branches      312      315       +3     
==========================================
+ Hits         4908     4909       +1     
- Misses       2043     2076      +33     
- Partials      119      120       +1     
Flag Coverage Δ
android-unit-tests 61.09% <2.70%> (-1.15%) ⬇️
flutter-unit-tests 59.44% <12.50%> (-0.12%) ⬇️
ios-unit-tests 77.32% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...alytics_pinpoint/AmplifyAnalyticsPinpointPlugin.kt 16.66% <0.00%> (-4.03%) ⬇️
.../amazonaws/amplify/amplify_api/AmplifyApiPlugin.kt 55.00% <0.00%> (-6.12%) ⬇️
...zonaws/amplify/amplify_auth_cognito/AuthCognito.kt 58.44% <0.00%> (-1.30%) ⬇️
packages/amplify_core/lib/amplify_core.dart 100.00% <ø> (ø)
...mplify/amplify_datastore/AmplifyDataStorePlugin.kt 60.82% <0.00%> (-4.37%) ⬇️
packages/amplify_flutter/lib/amplify.dart 58.73% <0.00%> (-0.95%) ⬇️
packages/amplify_flutter/lib/amplify_hub.dart 93.75% <ø> (ø)
...mplify_datastore/lib/method_channel_datastore.dart 85.24% <20.00%> (-4.23%) ⬇️
...aws/amplify/amplify_api/rest_api/FlutterRestApi.kt 62.66% <50.00%> (-0.85%) ⬇️

@haverchuck
Copy link
Member

LGTM - but check out the android unit tests.

@Amplifiyer Amplifiyer deleted the missinpluginexception branch February 5, 2021 23:01
@brunovsiqueira
Copy link

brunovsiqueira commented Feb 8, 2021

Hi there @Amplifiyer. When this fix is going to be released? I am having several crashes in my production app due to this problem.

@Amplifiyer
Copy link
Contributor Author

@brunovsiqueira, we are in final phases of testing and will release very soon. Stay tuned!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants