Closed txtyash closed 2 years ago
Sorry, I'm going to be a little slower and less responsive during the holiday season. From a brief check, it looks like keyring is complaining that it doesn't have a backend. Take a look at that page and see if that makes sense and if you can install any of the secret backends it supports.
Keyring is necessary because we have to store an access token for Google (otherwise you would have to login again every time you use the plugin). I'll see what I can do about making this error message friendlier and more actionable when I get a chance.
Looking at this again, it seems like keyring is maybe recognizing a backend but is having problems with it. It looks like you're on Arch, are you running headless? Some relevant links I found:
Sorry for bugging you during the holidays. I had some alone time and was redoing my nvim config while reading reddit and stumbled across your package. I'm running kde so it's probably trying and filling to get to kwallet. Will look at the links and report back when I get the opportunity.
No worries! I hope you find the issue, and let me know if there's anything I could add that would make debugging this easier. At a minimum I'll probably add some additional documentation around keyring
.
I'm also seeing this behavior with latest commit on MacOS. I installed everything for the first time today and had it working but then it broke and it won't login anymore. I've tried reinstalling and manually cleaning but it won't prompt me for email again, just password.
gkeep: health#gkeep#check
gkeep
- OK: gkeepapi 0.13.7 installed
- OK: keyring installed
- WARNING: Not logged in
- ADVICE:
- Try :GkeepLogin
- INFO: Log file: /Users/user/.cache/nvim/gkeep.log
Debug log excerpts:
==> ./gkeep.log <== DEBUG 2022-04-17 14:39:42,248 [gkeep.plugin] Ignoring method cmd_sync. State State.Uninitialized not allowed DEBUG 2022-04-17 14:39:45,463 [gkeep.plugin] Ignoring method _on_buf_enter. State State.Uninitialized not allowed DEBUG 2022-04-17 14:41:29,357 [gkeep.plugin] Ignoring method cmd_sync. State State.Uninitialized not allowed DEBUG 2022-04-17 14:42:03,778 [gkeep.plugin] Ignoring method cmd_sync. State State.Uninitialized not allowed
@dittoalex when you say you are also seeing this behavior, does that mean that you're seeing the error posted in the original issue? What happens when you try to log in? It sounds like it's not prompting you for an email (that's expected, and shouldn't be an issue unless you want to change the email), but after you enter your password...is there an error? Does it spin forever? I'll need more information to debug.
If you want to fully reset the state, do a :GkeepLogout
and then try logging in again.
When I saw the above behavior I did not see an error message like in the original issue, but thought it was being eaten by an exception. It felt like it was spinning forever. I tried logging out about a dozen times in my troubleshooting and kept getting "Cannot perform action while Gkeep is Uninitialized." I again tried logging in tonight, same behavior. The customization process during which gkeep.nvim broke I was following README.MD with a fresh install of nvim dedicated just for gkeep.nvim and the minimum amount in .nvimrc.
It may be that the failures are due to my having too-large notes in Google Keep. For years I've had a bug where the items in my notes would get randomized, and that's what led me to gkeep.nvim. While troubleshooting gkeep.nvim I did another search and found recent support post "Google Keep Notes Checklist items re-arrange / get jumbled in random order for unknown reason" , which seems to be caused by character limits in notes. I spent the weekend paring things out of my notes through the browser, while items were being randomized, and will be moving away from Google Keep.
Oof, yeah Keep does have some hidden, relatively small character limits in the product. Unfortunately I wouldn't expect gkeepapi to behave any better once you hit that because the behavior becomes undefined. Sorry you're hitting these issues and good luck with finding a replacement!
@stevearc, the errors I get rn on running GkeepLogin mymail@gmail.com
:
Error detected while processing function remote#define#CommandBootstrap[5]..remote#define#request:
line 2:
Error invoking '/home/zim/.local/share/lunarvim/site/pack/packer/start/gkeep.nvim/rplugin/python3/gkeep:comman
d:GkeepLogin' on channel 3 (python3-rplugin-host):
error caught in request handler '/home/zim/.local/share/lunarvim/site/pack/packer/start/gkeep.nvim/rplugin/pyt
hon3/gkeep:command:GkeepLogin [['yashinde369@gmail.com']]':
Traceback (most recent call last):
File "/home/zim/.local/lib/python3.10/site-packages/secretstorage/util.py", line 48, in send_and_get_reply
raise DBusErrorResponse(resp_msg)
jeepney.wrappers.DBusErrorResponse: [org.freedesktop.DBus.Error.UnknownMethod] ('Object does not exist at path
“/org/freedesktop/secrets/collection/login”',)
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/home/zim/.local/lib/python3.10/site-packages/secretstorage/collection.py", line 161, in get_default_c
ollection
return Collection(connection)
File "/home/zim/.local/lib/python3.10/site-packages/secretstorage/collection.py", line 44, in __init__
self._collection.get_property('Label')
File "/home/zim/.local/lib/python3.10/site-packages/secretstorage/util.py", line 67, in get_property
(signature, value), = self.send_and_get_reply(msg)
File "/home/zim/.local/lib/python3.10/site-packages/secretstorage/util.py", line 52, in send_and_get_reply
raise ItemNotFoundException('Item does not exist!') from resp
secretstorage.exceptions.ItemNotFoundException: Item does not exist!
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/zim/.local/lib/python3.10/site-packages/keyring/backends/SecretService.py", line 61, in get_pref
erred_collection
collection = secretstorage.get_default_collection(bus)
File "/home/zim/.local/lib/python3.10/site-packages/secretstorage/collection.py", line 163, in get_default_c
ollection
return create_collection(connection, 'Default',
File "/home/zim/.local/lib/python3.10/site-packages/secretstorage/collection.py", line 145, in create_collec
tion
raise PromptDismissedException('Prompt dismissed.')
secretstorage.exceptions.PromptDismissedException: Prompt dismissed.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/zim/.local/share/lunarvim/site/pack/packer/start/gkeep.nvim/rplugin/python3/gkeep/plugin.py", li
ne 80, in w
f(self, *args, **kwargs)
File "/home/zim/.local/share/lunarvim/site/pack/packer/start/gkeep.nvim/rplugin/python3/gkeep/plugin.py", li
ne 46, in d
return f(self, *args[0])
File "/home/zim/.local/share/lunarvim/site/pack/packer/start/gkeep.nvim/rplugin/python3/gkeep/plugin.py", li
ne 636, in cmd_login
token = keyring.get_password("google-keep-token", email)
File "/home/zim/.local/lib/python3.10/site-packages/keyring/core.py", line 55, in get_password
return get_keyring().get_password(service_name, username)
File "/home/zim/.local/lib/python3.10/site-packages/keyring/backends/chainer.py", line 51, in get_password
password = keyring.get_password(service, username)
File "/home/zim/.local/lib/python3.10/site-packages/keyring/backends/SecretService.py", line 78, in get_pass
word
collection = self.get_preferred_collection()
File "/home/zim/.local/lib/python3.10/site-packages/keyring/backends/SecretService.py", line 63, in get_pref
erred_collection
raise InitError("Failed to create the collection: %s." % e)
keyring.errors.InitError: Failed to create the collection: Prompt dismissed..
Looking around, it sounds like your system may be missing the "login" keyring? I found several references to this issue with VS Code live share https://github.com/MicrosoftDocs/live-share/issues/219. You can try some of the solutions they listed there.
If you want a very small repro, python -c 'import keyring; keyring.get_password("google-keep-token", "foobar")'
should produce the same error. If that command succeeds, gkeep should work. If it fails, gkeep will not be able to work. If the fixes in the link above don't do anything for you, you can try filing an issue on the keyring repo with the minimal repro.
@stevearc the command failed. I don't think I'd want to deal with this anymore. Feel free to close the issue.
BTW, I hate python. It hasn't given me anything other than problems.
Describe the bug Unable to login. After I enter my email, I get the error. I'm not prompted for any password.
To Reproduce Steps to reproduce the behavior:
Expected behavior A clear and concise description of what you expected to happen.
Version information
Linux arch 5.15.10-zen1-1-zen #1 ZEN SMP PREEMPT Fri, 17 Dec 2021 11:17:39 +0000 x86_64 GNU/Linux
Features: +acl +iconv +tui See ":help feature-compile"
system vimrc file: "$VIM/sysinit.vim" fall-back for $VIM: "/usr/share/nvim"
Run :checkhealth for more info
gkeep: health#gkeep#check
gkeep
INFO: Log file: /home/zim/.cache/nvim/gkeep.log