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

High Sierra Exception error #107

Closed
humboldtux opened this issue Sep 29, 2017 · 20 comments
Closed

High Sierra Exception error #107

humboldtux opened this issue Sep 29, 2017 · 20 comments
Assignees
Labels
Milestone

Comments

@humboldtux
Copy link

I've just updated to High Sierra, reinstalling my iMac.
When i try to sign with mas, i get the following error:

$ /opt/mas signin bob@example.fr 123456789
==> Signing in to Apple ID: bob@example.fr
2017-09-29 08:02:23.950 mas[357:3668] -[__NSXPCInterfaceProxy_ISAccountService signInWithContext:replyBlock:]: unrecognized selector sent to instance 0x7f888f50afa0
2017-09-29 08:02:23.951 mas[357:3668] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSXPCInterfaceProxy_ISAccountService signInWithContext:replyBlock:]: unrecognized selector sent to instance 0x7f888f50afa0'
*** First throw call stack:
(
        0   CoreFoundation                      0x00007fff3f6090fb __exceptionPreprocess + 171
        1   libobjc.A.dylib                     0x00007fff65ef7c76 objc_exception_throw + 48
        2   CoreFoundation                      0x00007fff3f6a1c34 -[NSObject(NSObject) doesNotRecognizeSelector:] + 132
        3   CoreFoundation                      0x00007fff3f57f510 ___forwarding___ + 1456
        4   CoreFoundation                      0x00007fff3f57eed8 _CF_forwarding_prep_0 + 120
        5   mas                                 0x00000001086d0779 mas + 141177
        6   mas                                 0x00000001086d00f8 mas + 139512
        7   mas                                 0x00000001086e9fa0 mas + 245664
        8   mas                                 0x00000001086e9720 mas + 243488
        9   mas                                 0x00000001086be4b8 mas + 66744
        10  mas                                 0x00000001086c1ac8 mas + 80584
        11  mas                                 0x00000001086bf072 mas + 69746
        12  mas                                 0x00000001086bf542 mas + 70978
        13  mas                                 0x00000001086bf367 mas + 70503
        14  mas                                 0x00000001086d1c70 mas + 146544
        15  libdyld.dylib                       0x00007fff66ae6145 start + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
Abort trap: 6

iMac 14,1
High Sierra 10.13
Mas version 1.3.1

Thank you

@laurentcaille
Copy link

laurentcaille commented Oct 6, 2017

Hi,

I got the same error too.

mas signin --dialog xxxxxxx@gmail.com
==> Signing in to Apple ID: xxxxxxx@gmail.com
2017-10-06 09:43:15.965 mas[28387:96117] -[__NSXPCInterfaceProxy_ISAccountService signInWithContext:replyBlock:]: unrecognized selector sent to instance 0x7fcd0580c940
2017-10-06 09:43:15.966 mas[28387:96117] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSXPCInterfaceProxy_ISAccountService signInWithContext:replyBlock:]: unrecognized selector sent to instance 0x7fcd0580c940'
*** First throw call stack:
(
        0   CoreFoundation                      0x00007fff441b50fb __exceptionPreprocess + 171
        1   libobjc.A.dylib                     0x00007fff6aaa3c76 objc_exception_throw + 48
        2   CoreFoundation                      0x00007fff4424dc34 -[NSObject(NSObject) doesNotRecognizeSelector:] + 132
        3   CoreFoundation                      0x00007fff4412b510 ___forwarding___ + 1456
        4   CoreFoundation                      0x00007fff4412aed8 _CF_forwarding_prep_0 + 120
        5   mas                                 0x0000000105475749 _TTSf4g_g_n_d___TZFE3masCSo14ISStoreAccount6signInfzT8usernameGSqSS_8passwordGSqSS_12systemDialogSb_S0_ + 1033
        6   mas                                 0x00000001054750c8 _TZFE3masCSo14ISStoreAccount6signInfzT8usernameGSqSS_8passwordGSqSS_12systemDialogSb_S0_ + 88
        7   mas                                 0x000000010548ef70 _TTSf4g_d___TFV3mas13SignInCommand3runfVS_13SignInOptionsGOS_6ResultT_OS_8MASError_ + 960
        8   mas                                 0x000000010548e6f0 _TTWV3mas13SignInCommandS_15CommandProtocolS_FS1_3runfwx7OptionsGOS_6ResultT_wx11ClientError_ + 96
        9   mas                                 0x0000000105463488 _TFFV3mas14CommandWrappercuRd__S_15CommandProtocolxzWd__7Options11ClientError_wd__11ClientErrorzWd__S2_S3__rFqd__GS0_x_U_FCS_14ArgumentParserGOS_6ResultT_GOS_15CommandantErrorQ___ + 1176
        10  mas                                 0x0000000105466a98 _TPA__TFFV3mas14CommandWrappercuRd__S_15CommandProtocolxzWd__7Options11ClientError_wd__11ClientErrorzWd__S2_S3__rFqd__GS0_x_U_FCS_14ArgumentParserGOS_6ResultT_GOS_15CommandantErrorQ___ + 88
        11  mas                                 0x0000000105464042 _TFC3mas15CommandRegistry3runfT7commandSS9argumentsGSaSS__GSqGOS_6ResultT_GOS_15CommandantErrorx___ + 274
        12  mas                                 0x0000000105464512 _TFC3mas15CommandRegistry4mainfT9argumentsGSaSS_11defaultVerbSS12errorHandlerFxT__Os5Never + 466
        13  mas                                 0x0000000105464337 _TFC3mas15CommandRegistry4mainfT11defaultVerbSS12errorHandlerFxT__Os5Never + 135
        14  mas                                 0x0000000105476c40 _TFV3mas18StderrOutputStream5writefSST_ + 0
        15  libdyld.dylib                       0x00007fff6b692145 start + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
[1]    28387 abort      mas signin --dialog xxxxxxxx@gmail.com

MacBookPro13,3
macOS 10.13 (17A405)
Mas 1.3.1

Thank you

@MikeRatcliffe
Copy link

Ouch, I have the same issue on High Sierra... here is a backtrace in case it helps:

(lldb) thread backtrace
* thread #1, queue = 'com.apple.main-thread', stop reason = signal SIGABRT
  * frame #0: 0x00007fff5d275fce libsystem_kernel.dylib`__pthread_kill + 10
    frame #1: 0x00007fff5d3b3150 libsystem_pthread.dylib`pthread_kill + 333
    frame #2: 0x00007fff5d1d232a libsystem_c.dylib`abort + 127
    frame #3: 0x00007fff5b1b7f8f libc++abi.dylib`abort_message + 245
    frame #4: 0x00007fff5b1b812b libc++abi.dylib`default_terminate_handler() + 265
    frame #5: 0x00007fff5c539ea3 libobjc.A.dylib`_objc_terminate() + 97
    frame #6: 0x00007fff5b1d37c9 libc++abi.dylib`std::__terminate(void (*)()) + 8
    frame #7: 0x00007fff5b1d326d libc++abi.dylib`__cxa_throw + 121
    frame #8: 0x00007fff5c537da5 libobjc.A.dylib`objc_exception_throw + 351
    frame #9: 0x00007fff35ce3c34 CoreFoundation`-[NSObject(NSObject) doesNotRecognizeSelector:] + 132
    frame #10: 0x00007fff35bc1510 CoreFoundation`___forwarding___ + 1456
    frame #11: 0x00007fff35bc0ed8 CoreFoundation`__forwarding_prep_0___ + 120
    frame #12: 0x00000001000233b2 mas`function signature specialization <Arg[0] = Owned To Guaranteed, Arg[1] = Owned To Guaranteed, Arg[3] = Dead> of static (extension in mas):__ObjC.ISStoreAccount.signIn(username: Swift.Optional<Swift.String>, password: Swift.Optional<Swift.String>, systemDialog: Swift.Bool) throws -> __ObjC.ISStoreAccount + 1026
    frame #13: 0x0000000100022d7e mas`static (extension in mas):__ObjC.ISStoreAccount.signIn(username: Swift.Optional<Swift.String>, password: Swift.Optional<Swift.String>, systemDialog: Swift.Bool) throws -> __ObjC.ISStoreAccount + 62
    frame #14: 0x0000000100039b86 mas`function signature specialization <Arg[0] = Owned To Guaranteed and Exploded, Arg[1] = Dead> of mas.SignInCommand.run(mas.SignInOptions) -> mas.Result<(), mas.MASError> + 758
    frame #15: 0x0000000100038d4e mas`protocol witness for mas.CommandProtocol.run(A.Options) -> mas.Result<(), A.ClientError> in conformance mas.SignInCommand : mas.CommandProtocol in mas + 126
    frame #16: 0x0000000100013e3a mas`closure #1 (mas.ArgumentParser) -> mas.Result<(), mas.CommandantError<A>> in mas.CommandWrapper.(in _E513F8A29DAA43E418079999EEBED6A7).init<A where A == A1.ClientError, A1: mas.CommandProtocol, A1.ClientError == A1.Options.ClientError>(A1) -> mas.CommandWrapper<A> + 922
    frame #17: 0x00000001000185e3 mas`partial apply forwarder for closure #1 (mas.ArgumentParser) -> mas.Result<(), mas.CommandantError<A>> in mas.CommandWrapper.(in _E513F8A29DAA43E418079999EEBED6A7).init<A where A == A1.ClientError, A1: mas.CommandProtocol, A1.ClientError == A1.Options.ClientError>(A1) -> mas.CommandWrapper<A> + 83
    frame #18: 0x00000001000145bb mas`mas.CommandRegistry.run(command: Swift.String, arguments: Swift.Array<Swift.String>) -> Swift.Optional<mas.Result<(), mas.CommandantError<A>>> + 235
    frame #19: 0x0000000100017240 mas`function signature specialization <Arg[1] = Exploded> of mas.CommandRegistry.main(arguments: Swift.Array<Swift.String>, defaultVerb: Swift.String, errorHandler: (A) -> ()) -> Swift.Never + 464
    frame #20: 0x00000001000147d3 mas`mas.CommandRegistry.main(defaultVerb: Swift.String, errorHandler: (A) -> ()) -> Swift.Never + 131
    frame #21: 0x00000001000246d6 mas`main + 854
    frame #22: 0x00007fff5d126145 libdyld.dylib`start + 1

@parkr
Copy link

parkr commented Oct 9, 2017

Same here! Running mas signin <email>:

2017-10-09 14:52:29.334 mas[32938:1735134] -[__NSXPCInterfaceProxy_ISAccountService signInWithContext:replyBlock:]: unrecognized selector sent to instance 0x7f9afed23680
2017-10-09 14:52:29.335 mas[32938:1735134] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSXPCInterfaceProxy_ISAccountService signInWithContext:replyBlock:]: unrecognized selector sent to instance 0x7f9afed23680'
*** First throw call stack:
(
	0   CoreFoundation                      0x00007fff3f5f10fb __exceptionPreprocess + 171
	1   libobjc.A.dylib                     0x00007fff65ee3c76 objc_exception_throw + 48
	2   CoreFoundation                      0x00007fff3f689c34 -[NSObject(NSObject) doesNotRecognizeSelector:] + 132
	3   CoreFoundation                      0x00007fff3f567510 ___forwarding___ + 1456
	4   CoreFoundation                      0x00007fff3f566ed8 _CF_forwarding_prep_0 + 120
	5   mas                                 0x000000010cea93b2 _T0So14ISStoreAccountC3masE6signInABSSSg8username_AE8passwordSb12systemDialogtKFZTf4ggnd_n + 1026
	6   mas                                 0x000000010cea8d7e _T0So14ISStoreAccountC3masE6signInABSSSg8username_AE8passwordSb12systemDialogtKFZ + 62
	7   mas                                 0x000000010cebfb86 _T03mas13SignInCommandV3runAA6ResultOyytAA8MASErrorOGAA0bC7OptionsVFTf4gXd_n + 758
	8   mas                                 0x000000010cebed4e _T03mas13SignInCommandVAA0D8ProtocolA2aDP3runAA6ResultOyyt11ClientErrorQzG7OptionsQzFTW + 126
	9   mas                                 0x000000010ce99e3a _T03mas14CommandWrapperVACyxGqd__c11ClientErrorQyd__RszAA0B8ProtocolRd__7Options_AEQYd__AFRSlu33_E513F8A29DAA43E418079999EEBED6A7LlfcAA6ResultOyytAA010CommandantE0OyxGGAA14ArgumentParserCcfU_ + 922
	10  mas                                 0x000000010ce9e5e3 _T03mas14CommandWrapperVACyxGqd__c11ClientErrorQyd__RszAA0B8ProtocolRd__7Options_AEQYd__AFRSlu33_E513F8A29DAA43E418079999EEBED6A7LlfcAA6ResultOyytAA010CommandantE0OyxGGAA14ArgumentParserCcfU_TA + 83
	11  mas                                 0x000000010ce9a5bb _T03mas15CommandRegistryC3runAA6ResultOyytAA15CommandantErrorOyxGGSgSS7command_SaySSG9argumentstF + 235
	12  mas                                 0x000000010ce9d240 _T03mas15CommandRegistryC4mains5NeverOSaySSG9arguments_SS11defaultVerbyxc12errorHandlertFTf4nxnn_n + 464
	13  mas                                 0x000000010ce9a7d3 _T03mas15CommandRegistryC4mains5NeverOSS11defaultVerb_yxc12errorHandlertF + 131
	14  mas                                 0x000000010ceaa6d6 main + 854
	15  libdyld.dylib                       0x00007fff66ad2145 start + 1
	16  ???                                 0x0000000000000003 0x0 + 3
)
libc++abi.dylib: terminating with uncaught exception of type NSException
Abort trap: 6

@MikeRatcliffe
Copy link

A workaround I am using until this is fixed:

loginToAppStore () {
  echo -e "\nPlease log in to the app store..."

  open -a "/Applications/App Store.app"

  until (mas account > /dev/null);
  do
    sleep 3
  done
}

@daneov
Copy link

daneov commented Oct 28, 2017

Same here :( And her I thought to have found the perfect tool to provision my development environment :/

@dotCipher
Copy link

dotCipher commented Nov 7, 2017

Yeah, same problem here. If there is a lack of bandwidth from the original maintainers, I would be more than happy to dedicate time towards a solution if someone gave me some guidance of the dev process for this project (kindof a swift noob myself).

Would anyone know if there are any resources for learning the paradigms present in this repo (ie. how it interacts with the AppStore, APIs, etc)?

This project seems like the only solution when it comes to automating / script AppStore interactions, so I would love to see some traction on this.

dotCipher pushed a commit to dotCipher/workstation-playbooks that referenced this issue Nov 7, 2017
@ybart
Copy link

ybart commented Nov 9, 2017

Apparently, the signin command was added by this commit :

d80ad6e

This uses a tool call class-dump to dump private headers which can then be used to interact with AppStore.

As this uses unsupported private headers, it might break for any macOS release.

@jamesdh
Copy link

jamesdh commented Nov 26, 2017

@argon any chance you're still involved with mas? I realize the sign-on might be more pain than it's worth especially with multi-factor auth now becoming more common, but perhaps we could just resort to an OSA script that opens the login dialog within the App Store or something similar as a fallback.

@peterbourgon
Copy link

Also getting this issue. Is there a workaround? mas is unusable as-is.

@jamesdh
Copy link

jamesdh commented Jan 9, 2018

@peterbourgon you can either open App Store.app and manually sign in and/or what I do....go to System Preferences -> App Store -> Password Settings, and change "Purchases and In-app Purchases" to "Require After 15 minutes" and "Free Downloads" to "Save Password".

It's not perfect, meaning anytime you have a fresh install you have to remember to do that, but it helps.

@stalinkay
Copy link

+1

@jazaval
Copy link

jazaval commented Feb 21, 2018

Still seeing this on 10.13.3 and the latest 10.13.4 (beta 3).

@phatblat phatblat self-assigned this Feb 21, 2018
@phatblat
Copy link
Member

Thanks for the updates and details, everyone. Sorry it has been broken for so long, but I'm looking into this now.

It appears that the private API mas was using has changed and -signinWithContext:replyBlock: was removed. I'm researching this now but the fix is going to be a bit tricky in order to maintain support for older OSes.

@phatblat phatblat added this to the 1.4.2 milestone Feb 21, 2018
@jimratliff
Copy link

MikeRatcliffe's (no relation!) suggestion worked perfectly for me. I elaborated on it a little by adding an outer until loop that tests whether the user is already signed into the App Store before launching the App Store to sign in:

function login_to_Mac_App_Store () {
#	Attempt at workaround for High Sierra error that prevents logging into Mac App Store
#		See Mike Ratcliffe, https://github.com/mas-cli/mas/issues/107#issuecomment-335514316

# Test if signed in. If not, launch MAS and sign in.

until (mas account > /dev/null); # If signed in, drop to outer "done"
do
#	If here, not logged in

	echo -e "You are not yet logged into the Mac App Store."
	echo -e "I will launch the Mac App Store now."
	echo -e "\nPlease log in to the Mac App Store..."
	open -a "/Applications/App Store.app"

#	until loop waits patiently until scriptrunner signs into Mac App Store
	until (mas account > /dev/null);
	do
		sleep 3
    	echo -e "… zzz …."
  	done	
done
echo -e "You are signed into the Mac App Store."
signed_in_user=$(mas account)
echo -e "MAS user name: $signed_in_user"
}

@filler
Copy link

filler commented Jun 4, 2018

Hello!

While attempting to revive a new workstation via make and brew-bundler, I was hitting this same issue. What allowed me to overcome it was the following:

  • In Internet Accounts under Settings, ensure you add an iCloud login for your AppleID.
  • Once done, open the App Store and click Purchased. You should see your older installed apps there.
  • With the App Store window open, reattempt to install via mas. The App Store window might prompt you to authenticate with your AppleID during the first package run.

With the following, I was able to get mas 1.4.1 on OS X 10.13.5 (17F77) working.

@robfletcher
Copy link

On 10.14 Mojave signing in to the App Store does not seem to help. I've done that but mas account still reports "Not signed in"

@jonathan-automox
Copy link

jonathan-automox commented Jul 27, 2018

I would say that the priority would be to get it working for the newer OSes. Hoping others on this thread would agree. You can always go with an older version of mas-cli for the older OS support.

@phatblat
Copy link
Member

Supporting older macOS versions will be easy from an API standpoint. Homebrew has proven to be a challenge due to the way it builds bottles. This is why we now have a custom tap for older macOS support.

@kryptonianson
Copy link

any movement on this by any chance? thanks everyone!

@phatblat
Copy link
Member

@kryptonianson the fix for this has stalled. Know anyone good at debugging closed source private Apple frameworks?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests