镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

iOS FirestackAuth crashing #256

Description

@ghuh
Fatal Exception: NSInvalidArgumentException
0  CoreFoundation                 0x18ad611b8 __exceptionPreprocess
1  libobjc.A.dylib                0x18979855c objc_exception_throw
2  CoreFoundation                 0x18ac44eac -[__NSPlaceholderDictionary initWithObjects:forKeys:count:]
3  CoreFoundation                 0x18ac44d1c +[NSDictionary dictionaryWithObjects:forKeys:count:]
4  LetsBeChefs                    0x10030ab00 __30-[FirestackAuth listenForAuth]_block_invoke_2
5  LetsBeChefs                    0x10030db70 __59-[FirestackAuth userPropsFromFIRUserWithToken:andCallback:]_block_invoke
6  libdispatch.dylib              0x189bea1fc _dispatch_call_block_and_release
7  libdispatch.dylib              0x189bea1bc _dispatch_client_callout
8  libdispatch.dylib              0x189beed68 _dispatch_main_queue_callback_4CF
9  CoreFoundation                 0x18ad0e810 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__
10 CoreFoundation                 0x18ad0c3fc __CFRunLoopRun
11 CoreFoundation                 0x18ac3a2b8 CFRunLoopRunSpecific
12 GraphicsServices               0x18c6ee198 GSEventRunModal
13 UIKit                          0x190c817fc -[UIApplication _run]
14 UIKit                          0x190c7c534 UIApplicationMain
15 LetsBeChefs                    0x10007ce18 main (main.m:16)
16 libdispatch.dylib              0x189c1d5b8 (Missing)

react-native-firestack v2.3.3

Activity

  1. skizzo commented on Jan 28, 2017

    @skizzo

    Any updates on this? Happens to me too, using v2.3.9.

  2. ghuh commented on Jan 28, 2017

    @ghuh
    ContributorAuthor

    Nope, it's still crashing. Any Objective-C experts out there have any thoughts?

  3. skizzo commented on Jan 28, 2017

    @skizzo

    Can confirm that this only happens

    Can't believe we're the only ones having troubles with this, I don't recall making any special settings for my Firebase setup..

  4. ghuh commented on Jan 28, 2017

    @ghuh
    ContributorAuthor

    It's fairly intermittent. I didn't see the issue until I had hundreds of people logging in a day and then this started causing crashes for about 5% of my users. I haven't been able to reproduce it personally. @skizzo, if you have a reliable case for reproducing the issue, can you post it?

  5. ghuh commented on Jan 29, 2017

    @ghuh
    ContributorAuthor

    By sheer dumb luck I was able to reproduce this bug tonight in the simulator. It is far worse than I realized. After the app crashes, its state doesn't clear. So, the next time the user goes to open the app, it crashes again. Effectively rendering the app useless.

    @auser would you be able to take a look or do you know an Objective-C developer that can take a look? Unfortunately my skill set is on Android, not iOS.

  6. Salakar commented on Feb 1, 2017

    @Salakar
    Collaborator

    @ghuh @skizzo - switch to my fork, its v3, ton of fixes / improvements

  7. mikemonteith commented on Feb 13, 2017

    @mikemonteith

    I'm getting this error when a user has a token for an account that has been deleted on firebase. The error handling in listenForAuth is trying to get the error message with [error localizedFailureReason] instead of [error localizedDescription] as is used everywhere else.
    I assume using localizedDescription will be fine, but I'm not really an ObjC developer. Does anyone know if this is the right change to make? Is there any reason why localizedFailureReason would be used instead?

    https://github.com/mikemonteith/react-native-firestack/blob/master/ios/Firestack/FirestackAuth.m#L162

  8. added a commit that references this issue on Feb 13, 2017
    ed04e4b
  9. ghuh commented on Feb 14, 2017

    @ghuh
    ContributorAuthor

    Thanks for coming up with a reproducible test case! It looks like the change you made already exists on v3 so I think it's likely that is a correct change (I too am not an objective-c developer).

    It is worth noting there are other cases that trigger this exact same issue. It is not just when a user no longer exists.

  10. ghuh commented on Feb 14, 2017

    @ghuh
    ContributorAuthor

    See my comments on @mikemonteith PR. I did some digging in the firebase documentation and I'm convinced that his fix will solve this issue (I'm going to push out the change in my own code). I'll close out this PR as soon as it is merged.

  11. ghuh commented on Feb 26, 2017

    @ghuh
    ContributorAuthor

    I've pushed out @mikemonteith change to my production environment and confirmed that it has stopped this crash.

    Since this change is in v3 and there is a PR out for v2, I'm going to go ahead and close this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions