altstoreio / AltStore

AltStore is an alternative app store for non-jailbroken iOS devices.
https://altstore.io
GNU Affero General Public License v3.0
11.71k stars 890 forks source link

After post-install of fresh AltStore and AltServer installation, authenticating with Apple ID in AltStore (iOS) causes AltServer to crash #649

Open beesyrupguy opened 3 years ago

beesyrupguy commented 3 years ago

Issue: After installing a fresh copy of AltStore and AltServer installation, authenticating with the Apple ID in AltStore (iOS) causes AltServer to crash

Steps to Reproduce:

  1. Install latest AltServer from altstore.io on macOS 11.1 (Big Sur)
  2. Turn on AltServer
  3. Install mail plugin
  4. Connect iPhone with USB cable, then Install AltStore > iPhone
  5. Authenticate with apple ID
  6. After the AltStore icon appears on the iPhone, in iOS > Settings > General > Profiles, Trust the new dev profile
  7. Launch AltStore
  8. Authenticate with same apple ID

Result: AltServer force closes for some reason, and AltStore shows "Lost Connection to AltServer"

Analysis: I tried to see if I could get some kind of trace logging, but this is about all I could find. I opened up AltServer.app/Contents/MacOS and ran the AltServer executable. Here is the trace message I get when the app force closes:

$ ./AltServer
Preparing: [C1 fe80::1cae:4fa0:2e36:db2a%en0.49570 tcp, local: fe80::1cb3:c3e7:8d72:b29f%en0.61421, server, prohibit joining, path satisfied (Path is satisfied), viable, interface: en0, scoped, ipv4, dns]
Connected to client: fe80::1cae:4fa0:2e36:db2a%en0.49570 (Network)
Receiving request size from connection: fe80::1cae:4fa0:2e36:db2a%en0.49570 (Network)
Receiving request from connection: fe80::1cae:4fa0:2e36:db2a%en0.49570 (Network)... (48 bytes)
Received request: anisetteData(AltServer.AnisetteDataRequest(version: 1, identifier: "AnisetteDataRequest"))
Received request with result: success(AltServer.ServerRequest.anisetteData(AltServer.AnisetteDataRequest(version: 1, identifier: "AnisetteDataRequest")))
Anisette XPC Error: Error Domain=NSCocoaErrorDomain Code=4097 "connection to service on pid 0 named com.rileytestut.AltXPC" UserInfo={NSDebugDescription=connection to service on pid 0 named com.rileytestut.AltXPC}
2021-01-20 17:03:16.015 AltServer[85184:21639584] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[__NSPlaceholderDictionary initWithObjects:forKeys:count:]: attempt to insert nil object from objects[5]'
*** First throw call stack:
(
    0   CoreFoundation                      0x00007fff204e26af __exceptionPreprocess + 242
    1   libobjc.A.dylib                     0x00007fff2021a3c9 objc_exception_throw + 48
    2   CoreFoundation                      0x00007fff20596a9a -[__NSCFString characterAtIndex:].cold.1 + 0
    3   CoreFoundation                      0x00007fff205a287b -[__NSPlaceholderDictionary initWithObjects:forKeys:count:].cold.5 + 0
    4   CoreFoundation                      0x00007fff203f229a -[__NSPlaceholderDictionary initWithObjects:forKeys:count:] + 235
    5   CoreFoundation                      0x00007fff203f2195 +[NSDictionary dictionaryWithObjects:forKeys:count:] + 49
    6   AltSign-Dynamic                     0x000000010693336b -[ALTAnisetteData json] + 789
    7   AltServer                           0x0000000106513cfe AltServer + 204030
    8   AltServer                           0x0000000106513e19 AltServer + 204313
    9   libswiftCore.dylib                  0x00007fff2ca35a37 $sSE6encode2toys7Encoder_p_tKFTj + 7
    10  libswiftFoundation.dylib            0x00007fff305b7fd4 $s10Foundation13__JSONEncoder33_12768CA107A31EF2DCE034FD75B541C9LLC4box_ySo8NSObjectCSgSE_pKF + 2932
    11  libswiftFoundation.dylib            0x00007fff3067268c $s10Foundation11JSONEncoderC6encodeyAA4DataVxKSERzlF + 460
    12  libswiftFoundation.dylib            0x00007fff3069dc2e $s10Foundation11JSONEncoderC6encodeyAA4DataVxKSERzlFTj + 14
    13  AltServer                           0x000000010652a977 AltServer + 297335
    14  AltServer                           0x0000000106524501 AltServer + 271617
    15  AltServer                           0x0000000106529369 AltServer + 291689
    16  AltServer                           0x0000000106535f69 AltServer + 343913
    17  AltServer                           0x0000000106535f9b AltServer + 343963
    18  AltServer                           0x0000000106535d99 AltServer + 343449
    19  AltServer                           0x00000001065339bd AltServer + 334269
    20  AltServer                           0x0000000106533da6 AltServer + 335270
    21  AltServer                           0x0000000106533e4e AltServer + 335438
    22  CoreFoundation                      0x00007fff2045dfec __CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__ + 12
    23  CoreFoundation                      0x00007fff204f989b ___CFXRegistrationPost_block_invoke + 49
    24  libdispatch.dylib                   0x00007fff201c45dd _dispatch_call_block_and_release + 12
    25  libdispatch.dylib                   0x00007fff201c57c7 _dispatch_client_callout + 8
    26  libdispatch.dylib                   0x00007fff201d1b86 _dispatch_main_queue_callback_4CF + 940
    27  CoreFoundation                      0x00007fff204a5970 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 9
    28  CoreFoundation                      0x00007fff20467852 __CFRunLoopRun + 2731
    29  CoreFoundation                      0x00007fff204666ce CFRunLoopRunSpecific + 563
    30  HIToolbox                           0x00007fff286eb6d0 RunCurrentEventLoopInMode + 292
    31  HIToolbox                           0x00007fff286eb4cc ReceiveNextEventCommon + 709
    32  HIToolbox                           0x00007fff286eb1ef _BlockUntilNextEventMatchingListInModeWithFilter + 64
    33  AppKit                              0x00007fff22c83de9 _DPSNextEvent + 883
    34  AppKit                              0x00007fff22c825af -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 1366
    35  AppKit                              0x00007fff22c74b0a -[NSApplication run] + 586
    36  AppKit                              0x00007fff22c48df2 NSApplicationMain + 816
    37  AltServer                           0x00000001064f0df9 AltServer + 60921
    38  libdyld.dylib                       0x00007fff2038b621 start + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
Abort trap: 6

It seems like this problem is limited to the macOS app. I've been able to successfully install AltServer, AltStore and install apps using the new profile on the Windows installation inside of a VM on the same Mac.

Any suggestions or any further debugging information that will help identify why this is the case?

Thanks!

shanegillio commented 1 year ago

hi there! sorry for the lack of response - are you still experiencing issues?