[firebase_auth] Fix NoSuchMethodError exception in reauthenticateWithCredential#237
Merged
collinjackson merged 15 commits intofirebase:masterfrom Nov 18, 2019
fabriziocacicia:master
Merged
[firebase_auth] Fix NoSuchMethodError exception in reauthenticateWithCredential#237collinjackson merged 15 commits intofirebase:masterfrom fabriziocacicia:master
reauthenticateWithCredential#237collinjackson merged 15 commits intofirebase:masterfrom
fabriziocacicia:master
Conversation
Fix NoSuchMethodError exception when calling FirebaseUser.reauthenticateWithCredential
Author
|
I can't figure out why the build fails |
|
@fabryx92 i think you also have to fix ios plugin. |
…ithCredential method
Author
|
@hungnt-kayac thank you! You are right, I focused only on the Android part. I'm not very familiar with ios development, maybe because of this, I forgot it. Your reply was really helpful! |
hungnt-kayac
reviewed
Oct 4, 2019
juliocbcotta
reviewed
Oct 4, 2019
.../firebase_auth/android/src/main/java/io/flutter/plugins/firebaseauth/FirebaseAuthPlugin.java
Show resolved
Hide resolved
reauthenticateWithCredential
collinjackson
approved these changes
Oct 11, 2019
13 tasks
Co-Authored-By: Collin Jackson <jackson@google.com>
Author
|
Why now the build fails? Editing the changelog only? I did again all the steps written in the Contribution guide to be sure that all is fine, and it is. |
collinjackson
approved these changes
Nov 18, 2019
thatfiredev
pushed a commit
to thatfiredev/flutterfire
that referenced
this pull request
Nov 26, 2019
* bump core version to 0.4.1+4 (firebase#1395) * Remove deprecated firebase-core dependency (firebase#1417) * Remove deprecated firebase-core dependency * [firebase_auth] getIdToken use actual refresh value instead of checking if object exists (firebase#1334) * getIdToken use actual refresh value instead of checking if object exists * getIdToken refresh integration test * update xcode to v11 (firebase#1420) * Update FirebaseApp creation in tests (firebase#1406) * [firebase_database] Support v2 android embedder. (firebase#287) * [firebase_remote_config] Support v2 android embedder. (firebase#282) * [CI] Add version to example apps (firebase#1426) * Add hardcode version to example apps * [firebase_core] Add platform interface (firebase#1324) * Move firebase_core to firebase_core/firebase_core * Add firebase_core_platform_interface package * Update cirrus scripts and documentation * [firebase_dynamic_links] Add support of expanding from short links (firebase#1381) * Fixes strict compilation errors. (firebase#1331) * Upgrade crashlytics to v2 plugin API (firebase#1370) * Upgraded Crashlytics to v2 of Flutter Plugins. * Format documentation lists (See also & Errors) correctly (firebase#298) Fix documentation list format. * [firebase_auth] Fix NoSuchMethodError exception in `reauthenticateWithCredential` (firebase#237) * [firebase_auth] Fix NoSuchMethodError exception Fix NoSuchMethodError exception when calling FirebaseUser.reauthenticateWithCredential * add integration test * Fix analyzer warnings Co-Authored-By: Collin Jackson <jackson@google.com> * [cloud_firestore] [firebase_performance] fix analyzer warnings (firebase#1453) * fix analyzer warnings * [CI] Skip flaky firebase_performance driver tests (firebase#1452) * Skip flaky firebase_performance driver tests * [firebase_auth] Added missing Exception to the reauthenticateWithCredential docs (firebase#1448) (firebase#1449) * Added missing Exception to the reauthenticateWithCredential docs (firebase#1448) * [firebase_remote_config] Bumps Android Firebase dependency to 19.0.3 (firebase#1443) * Bump AGP, Gradle & Google Services Plugin * Bumps dependency to Firebase Config 19.0.3 * Replaces a deprecated method usage with the updated version * [firebase_messaging] Use UNUserNotificationCenter for ios 10+ (firebase#121) * Use UNUserNotificationCenter for ios 10+ * Add swift documentation * Move http test to README * Update CONTRIBUTING.md (firebase#1473) Removes obsolete recommendations about removing mockito (which is now used in testing federated plugins). * [firebase_core] Migrate to platform_interface (firebase#1472) * [firebase_messaging] Add an ArgumentError when passing invalid background message (firebase#252) * [firebase_dynamic_links] support v2 embedding (firebase#1372) * [cloud_firestore] Fix test that used FirebaseApp.channel (firebase#1476) * [cloud_firestore] Fix test that used FirebaseApp.channel * dartfmt * bump version * Fixed dynamic issue * Fixed dynamic issue * FIxed Object to list of object mapping * Fixed text result expectation * Reverted some changes * Satisfying formatter * Added android x to pass the test * Fixed changed log auto formatting
This file contains hidden or 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
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Fix NoSuchMethodError exception when calling FirebaseUser.reauthenticateWithCredential
Description
The stacktrace of the issue was this:
This is the relevant part in
auth_result.dart:So, the
dataparameter passed to theFirebaseUserconstructor wasnull.From the
reauthenticateWithCredentialmethod:the
dataparameter passed toAuhtResultcame from thereauthenticateWithCredentialinvoked channel method.By looking inside the
handleReauthenticateWithCredentialmethod in theFirebaseAuthPlugin.javaI notice the line:The
reauthenticatehas a return type ofTask<void>, for this reason, thedatain thereauthenticateWithCredentialwas filled with null.The
FirebaseUser'sreauthenticateAndRetrieveDatamethod hasTask<AuthResult>as return type. Also theSignInCompleteListenerreturns a map containing the Firebase user data inside the "user" key (exactly what theAuthResultneeds in its constructor).By applying these two modifications the code works properly.
Related Issues
Fixes #76
Fixes #1085
Checklist
Before you create this PR confirm that it meets all requirements listed below by checking the relevant checkboxes (
[x]). This will ensure a smooth and quick review process.///).flutter analyze) does not report any problems on my PR.Breaking Change
Does your PR require plugin users to manually update their apps to accommodate your change?