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

Error: store not initialized #16

Closed
cloudlena opened this issue Apr 21, 2021 · 6 comments · Fixed by #17
Closed

Error: store not initialized #16

cloudlena opened this issue Apr 21, 2021 · 6 comments · Fixed by #17

Comments

@cloudlena
Copy link

Summary

When I run gopass-jsonapi configure, I get the following error message: Failed to initialize gopass API: store not initialized. run gopass init first. But my gopass store is fully initialized and working.

Steps To Reproduce

Run gopass-jsonapi configure

Expected behavior

I expect it to set up the JSON API.

Environment

Additional context

My gopass configuration can be found in my dotfiles.

@dominikschulz
Copy link
Member

Could you run with GOPASS_DEDUG_LOG set to some filename and provide the content (minus anything confidential)?

@cloudlena
Copy link
Author

2021/04/21 10:49:31.552496 pwrules/aliases.go:52	pwrules.loadCustomAliases	no custom aliases found at /home/lena/.config/gopass/domain-aliases.json
2021/04/21 10:49:31.554180 config/io.go:37	config.loadConfig	Trying to load config from /home/lena/.config/gopass/config.yml
2021/04/21 10:49:31.554234 config/io.go:116	config.decode	Trying to unmarshal config into *config.Config
2021/04/21 10:49:31.554375 config/io.go:128	config.decode	Loaded config: *config.Config: &config.Config{AutoClip:false, AutoImport:false, ClipTimeout:0, ExportKeys:true, NoColor:false, NoPager:false, Notifications:false, Parsing:true, Path:"~/.local/share/gopass/stores/root", SafeContent:true, Mounts:map[string]string(nil), ConfigPath:"", XXX:map[string]interface {}(nil)}
2021/04/21 10:49:31.554397 config/io.go:45	config.loadConfig	Loaded config from /home/lena/.config/gopass/config.yml: &config.Config{AutoClip:false, AutoImport:false, ClipTimeout:0, ExportKeys:true, NoColor:false, NoPager:false, Notifications:false, Parsing:true, Path:"~/.local/share/gopass/stores/root", SafeContent:true, Mounts:map[string]string{}, ConfigPath:"/home/lena/.config/gopass/config.yml", XXX:map[string]interface {}(nil)}
2021/04/21 10:49:31.554410 root/init.go:17	root.(*Store).Initialized	initializing store and possible sub-stores
2021/04/21 10:49:31.554418 root/init.go:65	root.(*Store).initialize	initialize - ~/.local/share/gopass/stores/root
2021/04/21 10:49:31.554423 leaf/store.go:51	leaf.New	Instantiating  at ~/.local/share/gopass/stores/root
2021/04/21 10:49:31.554439 backend/storage.go:74	backend.DetectStorage	Trying gitfs for ~/.local/share/gopass/stores/root
2021/04/21 10:49:31.554452 backend/storage.go:76	backend.DetectStorage	failed to use gitfs for ~/.local/share/gopass/stores/root: no .git
2021/04/21 10:49:31.554541 backend/storage.go:74	backend.DetectStorage	Trying ondisk for ~/.local/share/gopass/stores/root
2021/04/21 10:49:31.554553 backend/storage.go:76	backend.DetectStorage	failed to use ondisk for ~/.local/share/gopass/stores/root: not supported
2021/04/21 10:49:31.554559 backend/storage.go:74	backend.DetectStorage	Trying fs for ~/.local/share/gopass/stores/root
2021/04/21 10:49:31.554566 backend/storage.go:79	backend.DetectStorage	Using fs for ~/.local/share/gopass/stores/root
2021/04/21 10:49:31.554584 fs/loader.go:29	fs.loader.New	Using Storage Backend: fs(v0.1.0,path:~/.local/share/gopass/stores/root)
2021/04/21 10:49:31.554590 leaf/store.go:62	leaf.New	Storage initialized
2021/04/21 10:49:31.554601 backend/crypto.go:93	backend.DetectCrypto	Trying gpgcli for fs(v0.1.0,path:~/.local/share/gopass/stores/root)
2021/04/21 10:49:31.554609 fs/store.go:110	fs.(*Store).Exists	Checking if .gpg-id exists at ~/.local/share/gopass/stores/root/.gpg-id: false
2021/04/21 10:49:31.554616 backend/crypto.go:95	backend.DetectCrypto	failed to use crypto gpgcli for fs(v0.1.0,path:~/.local/share/gopass/stores/root)
2021/04/21 10:49:31.554622 backend/crypto.go:93	backend.DetectCrypto	Trying age for fs(v0.1.0,path:~/.local/share/gopass/stores/root)
2021/04/21 10:49:31.554628 fs/store.go:110	fs.(*Store).Exists	Checking if .age-ids exists at ~/.local/share/gopass/stores/root/.age-ids: false
2021/04/21 10:49:31.554634 backend/crypto.go:95	backend.DetectCrypto	failed to use crypto age for fs(v0.1.0,path:~/.local/share/gopass/stores/root)
2021/04/21 10:49:31.554639 backend/crypto.go:93	backend.DetectCrypto	Trying plain for fs(v0.1.0,path:~/.local/share/gopass/stores/root)
2021/04/21 10:49:31.554650 fs/store.go:110	fs.(*Store).Exists	Checking if .plain-id exists at ~/.local/share/gopass/stores/root/.plain-id: false
2021/04/21 10:49:31.554655 backend/crypto.go:95	backend.DetectCrypto	failed to use crypto plain for fs(v0.1.0,path:~/.local/share/gopass/stores/root)
2021/04/21 10:49:31.554661 backend/crypto.go:101	backend.DetectCrypto	No valid crypto provider found for fs(v0.1.0,path:~/.local/share/gopass/stores/root)
2021/04/21 10:49:31.554666 leaf/store.go:68	leaf.New	Crypto initialized
2021/04/21 10:49:31.554676 leaf/store.go:70	leaf.New	Instantiated  at ~/.local/share/gopass/stores/root - storage: &fs.Store{path:"~/.local/share/gopass/stores/root"} - crypto: <nil>
2021/04/21 10:49:31.554687 root/init.go:70	root.(*Store).initialize	Root Store initialized at ~/.local/share/gopass/stores/root
2021/04/21 10:49:31.554695 fs/store.go:110	fs.(*Store).Exists	Checking if  exists at ~/.local/share/gopass/stores/root: false

@cloudlena
Copy link
Author

cloudlena commented Apr 21, 2021

failed to use gitfs for ~/.local/share/gopass/stores/root: no .git might be a good hint because there is actually a ~/.local/share/gopass/stores/root/.git directory. Is it possible that gopass-jsonapi cannot deal with the ~ in the path of my config yet? I think support for that was only recently added to gopass itself.

@cloudlena
Copy link
Author

Indeed, if I replace the ~ in the path of my config with /home/lena, it works :) so it must be that.

@dominikschulz
Copy link
Member

Thanks for confirming.

Let's keep this open until I can (read: have time to) reproduce and confirm if the current main branch is (still) affected.

@cloudlena
Copy link
Author

It is. I cloned the repo and built the project myself just this afternoon and had the same problem.
Thanks for taking the time! For me, there's no urgency because I could just temporarily remove the tilde in my config and run the commands I needed and change it back :)

dominikschulz added a commit to dominikschulz/gopass-jsonapi that referenced this issue Apr 24, 2021
Fixes gopasspw#16

RELEASE_NOTES=n/a

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants