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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

馃悰 [Firebase Auth Flutter] Sign in with Apple crash on ^3.11.0 #9645

Closed
alphasuns opened this issue Sep 30, 2022 · 3 comments
Closed

馃悰 [Firebase Auth Flutter] Sign in with Apple crash on ^3.11.0 #9645

alphasuns opened this issue Sep 30, 2022 · 3 comments
Labels
Needs Attention This issue needs maintainer attention. type: bug Something isn't working

Comments

@alphasuns
Copy link

Bug report

Describe the bug
When I sign in with apple, after the authentication from apple part, the app just crashes.
After some dig-ins, I found the error is caused by giving a nil value to the NSDictionary object.

eRqqJWgQcm
pAIydw3PBo

The current version has added a fourth field (kArgumentAccessToken) to the getNSDictionaryFromAuthCredential result, but the accessToken is always nil, so it throws the error.

img_v2_3c76990b-e955-4162-bb08-99f31f6dac9h

Steps to reproduce

Steps to reproduce the behavior:

  1. Tap sign in with apple,
  2. After apple authentication, the app just crashed,
  3. The log indicates:
    Terminating app due to uncaught exception 'NSInvalidArgumentException', reason:

-L.
__NSPlaceholderDictionary initWithobjects: forKeys:count:]: attempt to insert nil object from objects[3]'

Expected behavior

Should not crash and must work as before.

Sample project

Providing a minimal example project which demonstrates the bug in isolation from your main App greatly enhances the chance of a timely fix.
Please link to the public repository URL.


Additional context

Add any other context about the problem here.


Flutter doctor

Run flutter doctor and paste the output below:

Click To Expand
PASTE OUTPUT INSIDE HERE

Flutter dependencies

Run flutter pub deps -- --style=compact and paste the output below:

Click To Expand
PASTE OUTPUT INSIDE HERE

@alphasuns alphasuns added Needs Attention This issue needs maintainer attention. type: bug Something isn't working labels Sep 30, 2022
@AndrewPiterov
Copy link

AndrewPiterov commented Oct 2, 2022

The same issue with me. Tested on real device iPhone 7.

Notice, in line 496 we have a OAuthCredential without accessToken. But in case you sign in with Google there will be accessToken. The question is "Why we do not have access token in the case with Apple?"

2022-10-02_14-22-33

@lovelessX
Copy link

Same issue here with iPhone SE 2.

Flutter 3.3.3.

firebase_core: 1.24.0
firebase_auth: 3.11.0

Works fine with Auth 3.9 or 3.10.

@Lyokone
Copy link
Contributor

Lyokone commented Oct 3, 2022

Already being worked here: #9638

@Lyokone Lyokone closed this as completed Oct 3, 2022
@firebase firebase locked and limited conversation to collaborators Nov 3, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Needs Attention This issue needs maintainer attention. type: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants