Open scrivener opened 11 months ago
Update: Even though the machine is headless, Raspbian does have a GUI desktop running, so I set up XRDP to see if that would help. Authing through CLI in remote desktop shows a popup window for choosing a password for a new keyring to store credentials in. When I completed that popup, it worked and linked just fine. So I'm assuming the problem I was encountering above is that it is trying to do that keyring setup flow, but it can't. (I did try doing the steps above with a remote desktop session open, and it does not prompt me to set up the keyring, so it still seems to be impossible to set maestral up over SSH). I'm not sure whether this would work if I were not running an X session at all.
So I guess it's not really a bug, but it would be nice to be able to set up maestral under these conditions (i.e., over SSH even though there's an X session running, but not requiring interacting with the keychain popup), or at least somehow telling the user that this is what's happening. I don't know anything about how keychains work so I don't know how/if it would be possible to set it up from the CLI (maybe with some extra steps to configure the keychain from the terminal?).
Thanks for the detailed report and apologies for the slow response time.
Hanging indefinitely is not a great UX, maybe this could be solves by printing some message to the terminal notifying the user to unlock their keychain if not already done.
The interactions with the system keychain are handled by the keyring package and it does fall back to a plain text keyring (with an appropriate warning to the user) if no keychain can be accessed. The issue in your case I believe is the synchronous blocking until it's unlocked, which is not directly detectable to Maestral and possibly not at all from Python.
Still, I can imagine some pre-emptive message suggesting to ensure that the keyring is unlocked, which might help.
Describe the bug This bug occurs on a Raspberry Pi running Raspbian 12. I'm encountering it both on an install inside of a venv and on an install using
--break-system-packages
, both with--user
and without--user
.When attempting to authenticate using
auth link
orstart
from the CLI, when I paste the auth code back into the CLI prompt (? Enter the auth code:
) and press enter, the code turns grey and the CLI hangs indefinitely without any output or message. I've allowed it to sit overnight (~12 hours) and it does nothing. After ctrl-Cing out of the hang, my account isn't linked, and maestral seems to be in a bit of an incoherent authentication state:maestral auth status
shows an entry for my account with email and account type filled in, but Dropbox ID blankmaestral auth unlink
asks me if I'd like to unlink, but when I say yes, it responds! No Dropbox account linked. Please link an account using the GUI or CLI.
maestral config-files
shows me a configuration for the email address I tried to link (but that.ini
file also doesn't contain my Dropbox ID, that line saysaccount_id =
)maestral auth link
just follows the linking flow again, with the same bug occurringTo Reproduce
pip install --user --break-system-packages maestral
,sudo pip install -break-system-packages maestral
, or by creating a virtual environment and installing it in the venv withpip install maestral
maestral auth link
ormaestral start
? How would you like to you link your account?
, selectPrint auth URL to console
? Enter the auth code:
and press enter.Expected behaviour My Dropbox account should be linked. (Or at least I should get an error message saying what went wrong)
System:
Note that I'm not using the GUI at all and didn't install it with the GUI enabled. Haven't tried the option for opening the auth link in the browser, since the machine is headless.
Additional context I'm occasionally encountering something similar to #967, where something looking like ANSI escape codes (e.g.,
^[[48;24R
) get printed out in the middle of doing something else with the CLI (e.g., one of the commands above), which locks up the CLI and forces me to ctrl-C out. This happens seemingly at random, though it maybe happens more on a new configuration or fresh install? It happened only occasionally on the--user
andvenv
installs, but I had a streak of it happening on every command for like 5-6 commands in a row on my non--user
global install attempt.