altstoreio / altstoreio/AltStore
After post-install of fresh AltStore and AltServer installation, authenticating with Apple ID in AltStore (iOS) causes AltServer to crash
Nobody has claimed this yet.
- Dominant language
- Swift
- Stars
- 14.4k
- Forks
- 1.5k
- PR merge metrics
- No merged PRs in 30d
Description
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:
- Install latest AltServer from altstore.io on macOS 11.1 (Big Sur)
- Turn on AltServer
- Install mail plugin
- Connect iPhone with USB cable, then Install AltStore > iPhone
- Authenticate with apple ID
- After the AltStore icon appears on the iPhone, in iOS > Settings > General > Profiles, Trust the new dev profile
- Launch AltStore
- 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!
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the macOS 11.1 authentication flow and inspect the AltServer executable trace around the AltXPC connection and ALTAnisetteData json call. Confirm the Anisette response fields involved in the nil dictionary value, then verify that authenticating from AltStore no longer crashes AltServer or loses the connection.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ios, macos, swift
- Domain
- authentication, desktop
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100