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

thread 'main' panicked at 'called Option::unwrap() on a None value' #253

Closed
ghost opened this issue Jun 29, 2023 · 11 comments · Fixed by #254
Closed

thread 'main' panicked at 'called Option::unwrap() on a None value' #253

ghost opened this issue Jun 29, 2023 · 11 comments · Fixed by #254

Comments

@ghost
Copy link

ghost commented Jun 29, 2023

Version

0.9.4 (macOS Ventura)

What happened?

had to update from 0.7.0 to 0.9.4 in order to confirm my trade, appears something is wrong while migrating the manifest file to a newer version

Steps To Reproduce

No response

Relevant log output

DEBUG - Args { global: GlobalArgs { username: None, all: false, mafiles_path: None, passkey: None, verbosity: Debug, no_update_check: false }, sub: None, code: CodeCommand { offline: false } }
INFO - reading manifest from /Users/user/Library/Application Support/steamguard-cli/maFiles
DEBUG - loading manifest: "/Users/user/Library/Application Support/steamguard-cli/maFiles/manifest.json"
INFO - Migrating manifest
thread 'main' panicked at 'called `Option::unwrap()` on a `None` value', /Users/user/.cargo/registry/src/github.jparrowsec.cn-1ecc6299db9ec823/steamguard-cli-0.9.4/src/accountmanager/migrate.rs:25:16
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
@ghost ghost added bug triage labels Jun 29, 2023
@dyc3
Copy link
Owner

dyc3 commented Jun 29, 2023

It's failing on this

if path.extension().unwrap() == "maFile" {
    backup_file(&path).unwrap();
}

Would you happen to have any files listed in your manifest that don't have a file extension?

@ghost
Copy link
Author

ghost commented Jun 29, 2023

I don't have any files here than .maFile, manifest.json, and manifest.json.bak

@dyc3
Copy link
Owner

dyc3 commented Jun 29, 2023

Could you open a terminal in that directory and run ls -a -l?

@ghost
Copy link
Author

ghost commented Jun 29, 2023

drwxr-xr-x  6 user *  192 Jun 30 01:04 .
drwxr-xr-x  4 user *   128 May 21 21:54 ..
-rw-r--r--@ 1 user  *  6148 Jun 30 01:04 .DS_Store

@ghost
Copy link
Author

ghost commented Jun 29, 2023

Seeing these and .maFile with jsons

@dyc3
Copy link
Owner

dyc3 commented Jun 29, 2023

Ah, I bet it's the .DS_Store that's messing it up. According to the rust docs, extension will return: None, if the file name begins with . and has no other .s within; Fix will be in tonight's release.

@ghost
Copy link
Author

ghost commented Jun 29, 2023

Just tried to create maFiles and move maFiles over, seeing another error after trying to decrypt

`ERROR - Failed to migrate manifest: An unexpected error occurred during manifest migration: Failed to load some accounts: [DecryptionFailed(Unknown(Unpad Error))]
ERROR - An unexpected error occurred during manifest migration: Failed to load some accounts: [DecryptionFailed(Unknown(Unpad Error))]

Caused by:
    Failed to load some accounts: [DecryptionFailed(Unknown(Unpad Error))]`

Leaving it here because it could be related to exact the same issue supposedly
Or am I missing something?

@dyc3 dyc3 closed this as completed in #254 Jun 29, 2023
dyc3 added a commit that referenced this issue Jun 29, 2023
@ghost
Copy link
Author

ghost commented Jun 29, 2023

Actually that was wrong pin, but seeing another error here

ERROR - maFiles are encrypted, but no passkey was provided.

@dyc3
Copy link
Owner

dyc3 commented Jun 29, 2023

That should also be fixed in the next release

@ghost
Copy link
Author

ghost commented Jun 29, 2023

Thank you so much :)

@dyc3
Copy link
Owner

dyc3 commented Jun 29, 2023

Just published v0.9.5, open a new issue if you're still having issues.

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

Successfully merging a pull request may close this issue.

1 participant