Skip to content
This repository was archived by the owner on May 20, 2025. It is now read-only.
This repository was archived by the owner on May 20, 2025. It is now read-only.

Crash: -[CodePush saveFailedUpdate:] #493

Closed

Description

http://crashes.to/s/6f41b62b9ee

CodePush version: 1.14.5-beta

Stack trace:

Fatal Exception: NSInvalidArgumentException
0  CoreFoundation                 0x18339adb0 __exceptionPreprocess
1  libobjc.A.dylib                0x1829fff80 objc_exception_throw
2  CoreFoundation                 0x18327e708 CFStringConvertNSStringEncodingToEncoding
3  Geektime                       0x1001b51f4 -[CodePush saveFailedUpdate:]
4  Geektime                       0x1001b50d0 -[CodePush rollbackPackage]
5  Geektime                       0x1001b4aec -[CodePush initializeUpdateAfterRestart]
6  Geektime                       0x1001b49f0 -[CodePush init]
7  Geektime                       0x10014ceac -[RCTModuleData setUpInstanceAndBridge]
8  Geektime                       0x100159ed4 RCTExecuteOnMainThread
9  Geektime                       0x10014d578 -[RCTModuleData instance]
10 Geektime                       0x10014787c __49-[RCTBatchedBridge initModulesWithDispatchGroup:]_block_invoke
11 libdispatch.dylib              0x182de54bc _dispatch_call_block_and_release
12 libdispatch.dylib              0x182de547c _dispatch_client_callout
13 libdispatch.dylib              0x182deab84 _dispatch_main_queue_callback_4CF
14 CoreFoundation                 0x183350d50 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__
15 CoreFoundation                 0x18334ebb8 __CFRunLoopRun
16 CoreFoundation                 0x183278c50 CFRunLoopRunSpecific
17 GraphicsServices               0x184b60088 GSEventRunModal
18 UIKit                          0x188566088 UIApplicationMain
19 Geektime                       0x10007797c main (main.m:16)
20 libdispatch.dylib              0x182e168b8 (Missing)

Activity

  1. geof90 commented on Aug 28, 2016

    @geof90
    Contributor

    I can see from the trace the app seems to be in a state where it thinks there is a pending update, but there isn't actually one on disk. From what I see, the only way it can get into that state is if the app installs two updates the installation transaction fails, e.g. app get's killed somewhere on this line, which means the current update is removed but the info dictionary still points to it. It seems like a really unlikely case to ever happen though.

    Anyhow, I will send out a code change later that prevents crashes during rollbacks.

  2. avishayil commented on Aug 28, 2016

    @avishayil
    Author

    Thanks!

    On Aug 28, 2016 4:09 AM, "Geoffrey Goh" notifications@github.com wrote:

    The app seems to be in a state where it thinks there is a pending update,
    but there isn't actually one on disk. From what I see, the only way it can
    get into that state is if the app installs two updates the installation
    transaction fails, e.g. app get's killed somewhere on this line
    https://github.com/Microsoft/react-native-code-push/blob/master/ios/CodePush/CodePushPackage.m#L463,
    which means the current update is removed but the info dictionary still
    points to it. It seems like a really unlikely case to ever happen though.

    Anyhow, I will send out a PR that prevents crashes during rollbacks.

    —
    You are receiving this because you authored the thread.
    Reply to this email directly, view it on GitHub
    #493 (comment),
    or mute the thread
    https://github.com/notifications/unsubscribe-auth/AAyekOjx84LZ55vvQcjsw8fSroqWsTI2ks5qkN-0gaJpZM4JtyyO
    .

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

Metadata

Metadata

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