EddyVerbruggen / nativescript-plugin-firebase

:fire: NativeScript plugin for Firebase
https://firebase.google.com
MIT License
1.01k stars 442 forks source link

appleSignIn threw " Error: Argument must be an object." #1660

Closed ngocnt1 closed 4 years ago

ngocnt1 commented 4 years ago

NS: 7.0.6 NS firebase: 11.0.0.rc5 iOS platform:

I got an exception with apple signin, when i tried to deeply debug on plugin code, i realized below is the lines of code has been throwing out the exception.: firebase.ios.js line 824 - 827 const delegate = ASAuthorizationControllerDelegateImpl.createWithOwnerAndResolveReject(**new WeakRef(this)**, resolve, reject); CFRetain(delegate); authorizationController.delegate = delegate; authorizationController.presentationContextProvider = ASAuthorizationControllerPresentationContextProvidingImpl.createWithOwnerAndCallback(**new WeakRef(this)**); (this is undefined all the times)

Workaround: const delegate = ASAuthorizationControllerDelegateImpl.createWithOwnerAndResolveReject(this, resolve, reject); CFRetain(delegate); authorizationController.delegate = delegate; authorizationController.presentationContextProvider = ASAuthorizationControllerPresentationContextProvidingImpl.createWithOwnerAndCallback(this);

@EddyVerbruggen do we need to pass this if now it's undefined ?

butaminas commented 4 years ago

Any updates on this?

I get the same error when simply trying to Sing In with apple on iOS with Nativescript 7.0.8 (Vue) and @nativescript/firebase 11

ngocnt1 commented 4 years ago

it still occurs on NS firebase: 11.0.0 release