-
-
Notifications
You must be signed in to change notification settings - Fork 165
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
Getting a 500 error when trying to create a Google Drive config from the GUI running in a Docker container and it doesn’t open auth window #145
Comments
It seems like it's the last build of rclone that is buggy and I suppose even incompatible with the web gui. Try to download a previuos version. It was working fine for me. |
@redsector72 Are you using it in a Docker container? |
@negative0 @ncw Sorry to bug but is this something you can help with? |
If I had to guess, I'd say the issue is here: https://github.com/rclone/rclone/blob/3425726c503f7822508071b113e1cc5492d538e7/lib/oauthutil/oauthutil.go#L637 From https://github.com/skratchdot/open-golang/:
This works fine when you're on the machine Does this sound right? So I guess Looks like
config/create (from
This, I assume, calls rclone's API: https://rclone.org/rc/#config-create. Now, I assume that in the call to |
Looking through https://rclone.org/commands/rclone_config_create/, I think the process would be to call |
@ncw Sorry to call you out but I'm hoping you can help me get some traction? I'm happy to modify the code but I need some guidance on how the GUI works. I'd love to get the config create process working when running rclone in a Docker container. |
Is there anyone that can help me with this? |
I don't see how it can ever work. You can't open a webbrowser window outside the container from within the container. |
There would need to be some small logic changes in the code. Right now, from what I can tell, when you config a remote the code opens a URL. There should be an option to create a remote and have it return a JSON. That JSON has the information needed to finish the configuration (like the URL of the page to open). The caller would take that JSON, do what is needed, and make a second call to Then, the GUI would make the call using this new mechanism. It would take the JSON, send to the client (the browser) that would finish the auth, and then return the data back to Does that make sense? I'm happy to see how I can make those tweaks but I have some questions about the rclone base and GUI code that I need to chat about. |
Sorry, I misunderstood what you were trying to do This problem has been solved in RCX by parsing the output of However that doesn't work when configuring things over the rc so won't work for the GUI. So what needs to happen is that rclone returns the URL in the JSON response instead of logging it
We got nearly all the way there with RCX in this issue: rclone/rclone#3455 But that last little - "Open this brower window to continue" state has eluded us. The config state machine for the oauth is here So what I'd suggest is that GUI sets a config key, say That would probably mean splitting that state config state in half, and getting the first half to start the webserver and return the URL needed (and probably the URL to redirect to) and the second half to stop the webserver. The redirect URL would need to point at the IP address of the docker container so rclone received the response. I think RCX runs their own webserver to do this. This might be a bit tricky to arrange. So to sum that up - not easy - but it would be a worthwhile thing to do. |
Overseer, running in Docker, opens a browser window to login with Plex. |
What is RCX?
Agreed. I am not completely following on everything you said, or what is mentioned in that other issue but my thought is the flow would be like this:
Does that make sense or do I have it completely wrong? |
What is the problem you are having with rclone?
I am running rclone gui from a Docker container. I can browse configs fine. I am trying to add one for Google Drive and I am getting a 500 error. It creates the config but never finishes the creation process. It should open a new window so I can auth the Google Drive but it never opens that window.
Run the command 'rclone version' and share the full output of the command.
Which cloud storage system are you using? (eg Google Drive)
Google Drive
The command you were trying to run (eg
rclone copy /tmp remote:tmp
)n/a - using GUI
The rclone config contents with secrets removed.
it is empty
A log from the command with the
-vv
flagScreenshots
Creating a new config:
Before clicking
Next
Error after clicking
Next
Console error after clicking
Next
Config was created but never finished -- it didn't open a new window to auth:
The text was updated successfully, but these errors were encountered: