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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AltServer Installer Crash #157

Open
sebj opened this issue Apr 14, 2020 · 11 comments
Open

AltServer Installer Crash #157

sebj opened this issue Apr 14, 2020 · 11 comments
Labels
bug Something isn't working

Comments

@sebj
Copy link

sebj commented Apr 14, 2020

Downloaded AltServer from the website. After installing the Mail plug-in, leaving Mail open, attempting to install to a local USB-connected device, entering my Apple ID details and pressing continue, the AltServer app crashes on my Mac, every time.

macOS Catalina 10.15.4 (19E287), AltServer Version 1.3 (18), iPad Pro (2020) with iOS 13.4.1 connected locally.
Update: Same with AltServer Version 1.3.1, iOS 13.5

Inside Console, before the error shown in the Terminal log below, the following error is also logged:
{ID: com.rileytestut.AltServer, PID[2921], auid: 501, euid: 501, binary path: '/Applications/AltServer.app/Contents/MacOS/AltServer'} attempted to call TCCAccessRequest without the com.apple.private.tcc.manager.check-by-audit-token entitlement

Error log when application is opened from Terminal:

sudo /Applications/AltServer.app/Contents/MacOS/AltServer
Password:
2020-04-14 15:04:56.564 AltServer[2864:81185] Got token for com.apple.gs.xcode.auth!
Expires: 2021-04-14 14:04:56 +0000
Value: 
2020-04-14 15:05:00.240 AltServer[2864:81182] -[NSNull _fastCStringContents:]: unrecognized selector sent to instance 0x7fff86065c00
2020-04-14 15:05:00.242 AltServer[2864:81182] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[NSNull _fastCStringContents:]: unrecognized selector sent to instance 0x7fff86065c00'
*** First throw call stack:
(
	0   CoreFoundation                      0x00007fff2e59dd07 __exceptionPreprocess + 250
	1   libobjc.A.dylib                     0x00007fff672c15bf objc_exception_throw + 48
	2   CoreFoundation                      0x00007fff2e61cc97 -[NSObject(NSObject) __retain_OA] + 0
	3   CoreFoundation                      0x00007fff2e50257b ___forwarding___ + 1427
	4   CoreFoundation                      0x00007fff2e501f58 _CF_forwarding_prep_0 + 120
	5   libswiftCore.dylib                  0x00007fff67bf48d1 $ss18_bridgeCocoaStringys01_C4GutsVyXlF + 113
	6   libswiftCore.dylib                  0x00007fff67bf4b02 $sSS12_cocoaStringSSyXl_tcfC + 18
	7   libswiftFoundation.dylib            0x00007fff67ef4b7c $sSS10FoundationE36_unconditionallyBridgeFromObjectiveCySSSo8NSStringCSgFZ + 28
	8   AltServer                           0x000000010c6dfce7 AltServer + 56551
	9   AltServer                           0x000000010c6e6ed5 AltServer + 85717
	10  AltServer                           0x000000010c6e11ad AltServer + 61869
	11  AltSign                             0x000000010cac371c __66-[ALTAppleAPI fetchCertificatesForTeam:session:completionHandler:]_block_invoke + 183
	12  AltSign                             0x000000010cac81b3 __87-[ALTAppleAPI sendServicesRequest:additionalParameters:session:team:completionHandler:]_block_invoke_3 + 198
	13  CFNetwork                           0x00007fff2cde9d9a CFURLCredentialStorageCopyAllCredentials + 24882
	14  CFNetwork                           0x00007fff2cd379b4 CFURLRequestGetMainDocumentURL + 15927
	15  Foundation                          0x00007fff30b95ba5 __NSBLOCKOPERATION_IS_CALLING_OUT_TO_A_BLOCK__ + 7
	16  Foundation                          0x00007fff30b95ac6 -[NSBlockOperation main] + 80
	17  Foundation                          0x00007fff30b95a61 __NSOPERATION_IS_INVOKING_MAIN__ + 17
	18  Foundation                          0x00007fff30b94c93 -[NSOperation start] + 722
	19  Foundation                          0x00007fff30b949b9 __NSOPERATIONQUEUE_IS_STARTING_AN_OPERATION__ + 17
	20  Foundation                          0x00007fff30b94889 __NSOQSchedule_f + 182
	21  libdispatch.dylib                   0x00007fff6841b2b9 _dispatch_block_async_invoke2 + 83
	22  libdispatch.dylib                   0x00007fff6840f658 _dispatch_client_callout + 8
	23  libdispatch.dylib                   0x00007fff68411818 _dispatch_continuation_pop + 414
	24  libdispatch.dylib                   0x00007fff68410f16 _dispatch_async_redirect_invoke + 703
	25  libdispatch.dylib                   0x00007fff6841d957 _dispatch_root_queue_drain + 326
	26  libdispatch.dylib                   0x00007fff6841e097 _dispatch_worker_thread2 + 92
	27  libsystem_pthread.dylib             0x00007fff686699f7 _pthread_wqthread + 220
	28  libsystem_pthread.dylib             0x00007fff68668b77 start_wqthread + 15
)
libc++abi.dylib: terminating with uncaught exception of type NSException
@noah978 noah978 added the bug Something isn't working label May 22, 2020
@manijak
Copy link

manijak commented Jun 3, 2020

Just to pitch in. I keep getting the same exact exception on my Macbook Pro running Catalina 10.15.4. I type in my iCloud credentials, get a warning that it will revoke my Developer certificate on my iOS device, press Continue and it just closes.

@dos9191
Copy link

dos9191 commented Jun 6, 2020

@sebj and @manijak , have either of you found a solution to this? I have the same issue occuring.

@manijak
Copy link

manijak commented Jun 6, 2020

Nope, no luck. Will try and find some time to clone this repo and debug a little, to see if I can find a hint to why it’s crashing

@sebj
Copy link
Author

sebj commented Jun 6, 2020

@dos9191 Couldn't figure out what was going on – took a quick route around the problem to get AltStore up and running instead. If I remember rightly, I compiled & ran the iOS app from Xcode, then downloaded the official AltServer app as normal, and everything works well from there.

@manijak
Copy link

manijak commented Jun 6, 2020

@sebj Did you have to change the "Bundle Identifier" to something else?

I decided to debug the AltServer instead. And it appears to be crashing when "fetchingCertificates". From the looks of it, the iOS-device certificates...

Here is the line that causes the crash. It is checking if there is an "AltStore" cert already installed on the device. On my device there isn't but there is a iOS Developer Certificate. For some reason it still crashes when checking if the "MachineName" contains "AltStore"...
Screenshot 2020-06-06 11 40 50

@sebj
Copy link
Author

sebj commented Jun 8, 2020

@manijak I'm not really sure what was going on for me before unfortunately – I can no longer reproduce the installer crash I was having. The pre-built AltServer app (version 1.3.2) from the website now works perfectly to install the iOS app, and so does manually building & running AltServer (without changing the Bundle Identifier, just changed the code signing team to get Xcode to build/run).

@manijak
Copy link

manijak commented Jun 8, 2020

Yeah I also found out that I only need unc0ver, so I just signed that with my cert and sideoaded it, no need for AltStore :-)

@dreampiggy
Copy link

dreampiggy commented Jun 27, 2020

截屏2020-06-27 下午12 34 29

This crash does not get fixed in master branch or WebSite latest release.

For developer, the ALTDeviceManager+Installation.swift line348: should have a double check for that NSNull, it's not always a Optional

@manijak

@dreampiggy
Copy link

dreampiggy commented Jun 27, 2020

@sebj After that two patches, this is the compiled macOS App by myself, works on macOS Catalina 10.15.5:

AltServer.app.zip

@kp198
Copy link

kp198 commented Aug 18, 2022

Hi
I am facing a similar issue somewhere else.
Unable to reproduce it though, Any help with your findings regarding this is appreciated.

CoreFoundation __exceptionPreprocess (CoreFoundation)
libobjc.A.dylib objc_exception_throw (libobjc.A.dylib)
CoreFoundation +[NSObject(NSObject) _copyDescription] (CoreFoundation)
CoreFoundation forwarding (CoreFoundation)
CoreFoundation _CF_forwarding_prep_0 (CoreFoundation)
libswift...re.dylib specialized withCocoaASCIIPointer(:requireStableAddress:work:) (libswiftCore.dylib)
libswift...re.dylib bridgeCocoaString(:) (libswiftCore.dylib)
libswift...re.dylib String.init(_cocoaString:) (libswiftCore.dylib)
libswift...on.dylib static String.unconditionallyBridgeFromObjectiveC(:) (libswiftFoundation.dylib)

This happened in the following line:
guard let unwrappedStr = objC.str

I am checking if the NSString in my objective C code was optional. The above code is a swift class trying to access the an objective C class's property of type NSString.
If you have steps to reproduce please let me know.

@shanegillio
Copy link
Collaborator

hi all! sorry for the lack of response - wanted to see if you are still experiencing issues?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

8 participants
@sebj @manijak @dreampiggy @kp198 @noah978 @dos9191 @shanegillio and others