bendews / apw

A CLI for Apple Passwords (also known as iCloud Keychain)
GNU General Public License v3.0
40 stars 3 forks source link

Cant auth #1

Closed la-scent closed 1 month ago

la-scent commented 3 months ago

Download apw v0.0.4 from github (try both amd64/arm64 versions) but getting error for every commad which i try.

$ apw start
error: Uncaught (in promise) Error: No existing keys. Please login first.
    throw new Error("No existing keys. Please login first.");
          ^
    at readConfig (file:///home/runner/work/apw/apw/src/utils.ts:96:11)
    at new ApplePasswordManager (file:///home/runner/work/apw/apw/src/client.ts:149:43)
    at file:///home/runner/work/apw/apw/src/cli.ts:30:16
apw --help
error: Uncaught (in promise) Error: No existing keys. Please login first.
    throw new Error("No existing keys. Please login first.");
          ^
    at readConfig (file:///home/runner/work/apw/apw/src/utils.ts:96:11)
    at new ApplePasswordManager (file:///home/runner/work/apw/apw/src/client.ts:149:43)
    at file:///home/runner/work/apw/apw/src/cli.ts:30:16
$ apw auth
error: Uncaught (in promise) Error: No existing keys. Please login first.
    throw new Error("No existing keys. Please login first.");
          ^
    at readConfig (file:///home/runner/work/apw/apw/src/utils.ts:96:11)
    at new ApplePasswordManager (file:///home/runner/work/apw/apw/src/client.ts:149:43)
    at file:///home/runner/work/apw/apw/src/cli.ts:30:16

hardware: Chip: Apple M3 Pro macOS: 14.5 (23F79)

bendews commented 3 months ago

So sorry you ran in to this issue! looks like the order of operations are wrong for reading/initiating the configuration on startup. To resolve this manually you can run the following command to create an empty configuration:

mkdir ~/.apw && echo "{}" > ~/.apw/config.json

I'll add a proper fix for this issue when i get some free time & leave this issue open until that fix has been pushed.

Thanks for finding & contributing to the project! :)

la-scent commented 3 months ago

Yeah that help thanks!

bendews commented 1 month ago

Fixed #4 👍