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

signin disabled on macOS 10.13+ #164

Open
phatblat opened this issue Aug 12, 2018 · 62 comments
Open

signin disabled on macOS 10.13+ #164

phatblat opened this issue Aug 12, 2018 · 62 comments

Comments

@phatblat
Copy link
Member

phatblat commented Aug 12, 2018

As of version 1.4.2 the signin command has been disabled on newer versions of macOS. This is an interim workaround to the crasher first identified in #107.

mas 1.4.2 was never released through Homebrew, so it must besownloaded and installed manually from the 1.4.2 release or built from source using Xcode.

😞 Situation

In macOS High Sierra (10.13) Apple removed the -[ISAccountService signInWithContext:replyBlock:] method from the StoreFoundation private Apple framework which this app relies on to authenticate users through the signin command. I have done a lot of digging and debugging but have not found another API that works to authenticate a user with the Mac App Store.

Users running older macOS versions (10.9-10.12) are unaffected.

👉🏻⌨️ Workaround

Sign into the Mac App Store GUI app manually. Once signed in MAS app, the mas command should work fine.

I know this is not an ideal scenario, especially for script automation. Hopefully, I'll find a real solution to this soon.

Please 👍 this issue if you are affected by it.

Related: #107, #129, #147, #155, #159, #160, #162

@phatblat phatblat changed the title 🚏📥🙅‍♀️ Signin disabled on macOS 10.13+ 🚏📥🙅‍♀️ Signin command disabled on macOS 10.13+ Aug 12, 2018
@b3cramer
Copy link

This impacts me quite a bit as I rely on mas to automate updates on my Mac labs. I'm happy to help look for solutions as I am able. Does anyone have a list of Apple API resources as a start?

@SConaway
Copy link

SConaway commented Sep 5, 2018

Can we open the App Store GUI on 10.13+?

@phatblat
Copy link
Member Author

phatblat commented Sep 5, 2018

@SConaway the --dialog option to the signin command wasn't effective to open the MAS GUI because it would crash before causing the app to launch.

@phatblat
Copy link
Member Author

phatblat commented Sep 5, 2018

@b3cramer docs for all of Apple's public frameworks is available online, but no docs or developer support is available for private frameworks. If you are interested in perusing these private frameworks, you can use the aging class-dump command to generate headers from the binaries on your mac. I've done this for some versions of macOS in my macOSPrivateFrameworks repo.

@SConaway
Copy link

SConaway commented Sep 5, 2018

I'll prolly do that tomorrow of 10.14. I'll make a PR to you with them.

tonyarnold added a commit to tonyarnold/mac-dev-playbook that referenced this issue Sep 5, 2018
michelegera added a commit to michelegera/dotfiles that referenced this issue Sep 10, 2018
@jpartain89
Copy link

Well, the signin command isn’t disabled on Mojave and it’s still crashing the same for me.

@robfletcher
Copy link

With Mojave mas seems to just no-op on commands like outdated or upgrade (I can see pending updates in the App Store but mas doesn't report them). The account command reports that I am not signed in (I have signed in to App Store), the signin command produces a large error stack.

@franklouwers
Copy link

Workaround described does not work in Mojave...

michelegera added a commit to michelegera/dotfiles that referenced this issue Sep 28, 2018
Sbastien added a commit to Sbastien/macos-setup that referenced this issue Oct 1, 2018
@phatblat
Copy link
Member Author

phatblat commented Oct 2, 2018

@jpartain89 @robfletcher @franklouwers What version of mas were you using? Note that this change was introduced in 1.4.2 which has not been released through Homebrew.

@shpoont
Copy link

shpoont commented Oct 2, 2018

I just tried 1.4.2 and it works.

$ ./mas-1.4.1 signin example@example.com
==> Signing in to Apple ID: example@example.com
Password:
2018-10-02 13:43:20.542 mas-1.4.1[87389:4605362] -[__NSXPCInterfaceProxy_ISAccountService signInWithContext:replyBlock:]: unrecognized selector sent to instance 0x7f849640d210
2018-10-02 13:43:20.543 mas-1.4.1[87389:4605362] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSXPCInterfaceProxy_ISAccountService signInWithContext:replyBlock:]: unrecognized selector sent to instance 0x7f849640d210'
*** First throw call stack:
(
	0   CoreFoundation                      0x00007fff3bb1d43d __exceptionPreprocess + 256
	1   libobjc.A.dylib                     0x00007fff67a2e720 objc_exception_throw + 48
	2   CoreFoundation                      0x00007fff3bb9a255 -[NSObject(NSObject) __retain_OA] + 0
	3   CoreFoundation                      0x00007fff3babcad0 ___forwarding___ + 1486
	4   CoreFoundation                      0x00007fff3babc478 _CF_forwarding_prep_0 + 120
	5   mas-1.4.1                           0x000000010d76d452 mas-1.4.1 + 201810
	6   mas-1.4.1                           0x000000010d78ab70 mas-1.4.1 + 322416
	7   mas-1.4.1                           0x000000010d7561e4 mas-1.4.1 + 106980
	8   mas-1.4.1                           0x000000010d7426fd mas-1.4.1 + 26365
	9   mas-1.4.1                           0x000000010d742590 mas-1.4.1 + 26000
	10  mas-1.4.1                           0x000000010d754276 mas-1.4.1 + 98934
	11  mas-1.4.1                           0x000000010d73f7ef mas-1.4.1 + 14319
	12  libdyld.dylib                       0x00007fff68afc085 start + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
Abort trap: 6
$ ./mas-1.4.2 signin example@example.com
Error: The 'signin' command has been disabled on this macOS version. Please sign into the Mac App Store app manually.
For more info see: https://github.com/mas-cli/mas/issues/164

There is another problem with 1.4.1 (don't think it was mentioned before) which makes 1.4.1 completely broken on Mojave

$ ./mas-1.4.1 account
Not signed in
Error: Not signed in
./mas-1.4.2 account
example@example.com

rake5k added a commit to rake5k/ansible-workstation that referenced this issue Oct 2, 2018
rake5k added a commit to rake5k/ansible-workstation that referenced this issue Oct 2, 2018
@robfletcher
Copy link

robfletcher commented Oct 3, 2018

@phatblat I'm using 1.4.1 from Homebrew

Is 1.4.2 coming to homebrew or is there a reason it's being held back? Happy to install it another way if so. I use mas mainly via https://github.com/DanielThomas/oh-your-dotfiles (I added the mas support to that).

@ThomasKoppensteiner
Copy link

@robfletcher the PR for mas version 1.4.2 was declined. See #174.

@kylerjensen
Copy link

Same here; mas will not work with macOS Monterey until this is fixed.

@fpesch
Copy link

fpesch commented Oct 26, 2021

Any news on this?

@ghost
Copy link

ghost commented Oct 28, 2021

Any update on this??

need a fix for this issue.

@stephenulmer
Copy link

FWIW, on macOS 12.0 (arm64) after signing into the App Store with the GUI, I was able to use mas upgrade to upgrade the installed apps. I was also able to use mas install to add working apps. So I think we're just in the place we've been for years -- able to do everything but sign in.

@davidrothera
Copy link

Things worked fine on 12.0 (32A344) which shipped on my M1 Max but once updated to 12.0.1 (21A559) is the same "not logged in" state

@ghost
Copy link

ghost commented Oct 29, 2021

Things worked fine on 12.0 (32A344) which shipped on my M1 Max but once updated to 12.0.1 (21A559) is the same "not logged in" state

Same on MacBook Air M1 12.0.1 (21A559).

@jimscard
Copy link

Still the same on 2019 Intel MacBook macOS 12.0.1 (21A559); not logged in state reported by mas although the App Store GUI shows me logged in.

@stephenulmer
Copy link

After my upgrade to 12.0.1 it all broke again. Sigh.

@luisriverag
Copy link

Things worked fine on 12.0 (32A344) which shipped on my M1 Max but once updated to 12.0.1 (21A559) is the same "not logged in" state

2016 MBP here, GUI sign in workaround failing after update to 12.01 (21A559)

@leowill01
Copy link

Unable to sign in with mas signin and also mas doesn't recognize signing in through App Store app.

mid-2017 MBP
macOS Monterey 12.0.1
mas 1.8.3

benbalter added a commit to benbalter/dotfiles that referenced this issue Nov 1, 2021
benbalter added a commit to benbalter/dotfiles that referenced this issue Nov 1, 2021
benbalter added a commit to benbalter/dotfiles that referenced this issue Nov 1, 2021
@chris-araman
Copy link
Contributor

chris-araman commented Nov 3, 2021

For those reporting failures on macOS Monterey, you may be interested in #417 instead of this issue, which dates back to High Sierra.

@luisriverag
Copy link

For those reporting failures on macOS Monterey, you may be interested in #417 instead of this issue, which dates back to High Sierra.

Thanks!

@youbaowangsheng
Copy link

Any update on this??

@Augists
Copy link

Augists commented Nov 7, 2021

So, is there anyone who can tell me how to avoid this error 😭

The 'signin' command has been disabled on this macOS version. Please sign into the Mac App Store app manually.


macOS Monterey 12.0.1
mbp 19

@4708696-UniGe
Copy link

With lastest mas update works on Monterey

bramus added a commit to bramus/freshinstall that referenced this issue Dec 3, 2021
@harapeko
Copy link

it worked👍
MBP 2021 14inch M1 Pro
macOS Monterey 12.2.1
mas 1.8.6

@farhansaed
Copy link

doesn't work for me on ventura 13.2
MBP Pro 2023 M2
mas 1.8.6

@rgoldberg rgoldberg changed the title 🚏📥🙅‍♀️ Signin command disabled on macOS 10.13+ signin disabled on macOS 10.13+ Sep 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests