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

Every command will get keychain error on Ubuntu 22.04 #270

Open
MisakaMikoto-35c5 opened this issue Apr 12, 2024 · 3 comments
Open

Every command will get keychain error on Ubuntu 22.04 #270

MisakaMikoto-35c5 opened this issue Apr 12, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@MisakaMikoto-35c5
Copy link

MisakaMikoto-35c5 commented Apr 12, 2024

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 MisakaMikoto-35c5 added the bug Something isn't working label Apr 12, 2024
@edx-sayed-salem
Copy link

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).

@MisakaMikoto-35c5
Copy link
Author

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.

@edx-sayed-salem
Copy link

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.

ipatool/cmd/common.go

Lines 63 to 69 in 5b54745

func newKeychain(machine machine.Machine, logger log.Logger, interactive bool) keychain.Keychain {
ring := util.Must(keyring.Open(keyring.Config{
AllowedBackends: []keyring.BackendType{
keyring.KeychainBackend,
keyring.SecretServiceBackend,
keyring.FileBackend,
},

ipatool/CHANGELOG.md

Lines 8 to 10 in 5b54745

### Version [2.1.2](https://github.com/majd/ipatool/releases/tag/v2.1.2)
- `FileBackend` keyring is now used when other options are not available.

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

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

2 participants