ipatool icon indicating copy to clipboard operation
ipatool copied to clipboard

Every command will get keychain error on Ubuntu 22.04

Open MisakaMikoto-35c5 opened this issue 1 year ago • 3 comments

What happened?

Last month I has installed ipatool-2.1.4-linux-amd64 on my Linux server and tested it is ok. But every command will get keychain error now. Also I has tested on macOS 14.4.1 and it's works fine.

Version

ipatool-2.1.4-linux-amd64

Relevant log output

$ ./ipatool search whatever
9:54AM ERR error="failed to get account: failed to get item: The specified item could not be found in the keyring" success=false

$ ./ipatool auth info
9:55AM ERR error="failed to get account: failed to get item: The specified item could not be found in the keyring" success=false

$ rm -rf ~/.ipatool/ && ./ipatool auth login --email <hidden>
9:51AM INF enter password:
9:51AM ERR error="failed to save account in keychain: failed to set item: Object does not exist at path “/”" success=false

MisakaMikoto-35c5 avatar Apr 12 '24 02:04 MisakaMikoto-35c5

Did you use --keychain-passphrase ? For me (not on mac), I always need to pass this flag and the passphrase to unlock the keyring. (In my usecase, I have no GUI, just terminal).

edx-sayed-salem avatar Apr 24 '24 11:04 edx-sayed-salem

Did you use --keychain-passphrase ? For me (not on mac), I always need to pass this flag and the passphrase to unlock the keyring. (In my usecase, I have no GUI, just terminal).

Well, still get keychain error even if use non interactive session:

$ ./ipatool auth login --email <hidden> --keychain-passphrase 1
8:06PM INF enter password:
8:06PM ERR error="failed to save account in keychain: failed to set item: Object does not exist at path “/”" success=false
$ ./ipatool auth login --email <hidden> --keychain-passphrase 1 --password <hidden> --non-interactive
8:06PM ERR error="failed to save account in keychain: failed to set item: Object does not exist at path “/”" success=false

Also I found a strange behavior, if I type a incorrect password program will prompt me enter 2FA code. But correct password will get keychain error and no 2FA code required. My Apple ID is 2FA enabled.

MisakaMikoto-35c5 avatar Apr 24 '24 12:04 MisakaMikoto-35c5

I'm not really sure, I see that there are multiple keyring backends. In my case, I use an alpine container, without really anything installed. I'm confident that it defaults to the file-backend in my case.

https://github.com/majd/ipatool/blob/5b547457f15983cdf3293bfe9072a5dde4d2af8f/cmd/common.go#L63-L69

https://github.com/majd/ipatool/blob/5b547457f15983cdf3293bfe9072a5dde4d2af8f/CHANGELOG.md?plain=1#L8-L10

Perhaps in your environment, you've got multiple keyring backends already installed which may behave differently.

edx-sayed-salem avatar Apr 24 '24 12:04 edx-sayed-salem