Skip to content
This repository was archived by the owner on Aug 18, 2026. It is now read-only.
This repository was archived by the owner on Aug 18, 2026. It is now read-only.

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

Description

@imthenachoman

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.

/data # rclone version
rclone v1.58.0
- os/version: alpine 3.15.1 (64 bit)
- os/kernel: 5.10.28-Unraid (x86_64)
- os/type: linux
- os/arch: amd64
- go/version: go1.18
- go/linking: static
- go/tags: none

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 flag

Error creating config. Error: Request failed with status code 500

Screenshots

Creating a new config:

image

Before clicking Next

image

Error after clicking Next

image

Console error after clicking Next

image

Config was created but never finished -- it didn't open a new window to auth:

image

Activity

  1. redsector72 commented on Mar 27, 2022

    @redsector72

    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.

  2. imthenachoman commented on Apr 2, 2022

    @imthenachoman
    Author

    @redsector72 Are you using it in a Docker container?

  3. imthenachoman commented on Apr 6, 2022

    @imthenachoman
    Author

    @negative0 @ncw Sorry to bug but is this something you can help with?

  4. imthenachoman commented on Apr 6, 2022

    @imthenachoman
    Author

    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/:

    Open a file, directory, or URI using the OS's default application for that object type.

    This works fine when you're on the machine rclone is running on. But if you run rclone in a container then open won't do anything to the host machine.

    Does this sound right?

    So I guess rclone GUI has to intercept the open request and open it on the user's browser.

    Looks like

    await axiosInstance.post(urls.createConfig, data);
    is where a new config is created. So I guess it makes a post request to the webserver url config/create (from
    createConfig: "config/create",
    ).

    This, I assume, calls rclone's API: https://rclone.org/rc/#config-create.

    Now, I assume that in the call to config/create the data object needs to include the authorization information from Google Drive. But I can't figure out where in the process that is supposed to be handled?

  5. imthenachoman commented on Apr 6, 2022

    @imthenachoman
    Author

    Looking through https://rclone.org/commands/rclone_config_create/, I think the process would be to call config/create, which will return a question in JSON blob that then has to be answered in another call to config/create.

  6. imthenachoman commented on May 19, 2022

    @imthenachoman
    Author

    @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.

  7. imthenachoman commented on Aug 9, 2022

    @imthenachoman
    Author

    Is there anyone that can help me with this?

  8. ncw commented on Aug 9, 2022

    @ncw
    Member

    I'd love to get the config create process working when running rclone in a Docker container.

    I don't see how it can ever work.

    You can't open a webbrowser window outside the container from within the container.

  9. imthenachoman commented on Aug 9, 2022

    @imthenachoman
    Author

    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 rclone with return data to finish the config creation.

    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 rclone.

    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.

  10. ncw commented on Aug 9, 2022

    @ncw
    Member

    Sorry, I misunderstood what you were trying to do

    This problem has been solved in RCX by parsing the output of rclone config as rclone prints the URL that needs to be opened in the JSON response.

    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

    2022/08/09 17:45:54 NOTICE: If your browser doesn't open automatically go to the following link: http://127.0.0.1:53682/auth?state=upS8NlYieyGev9BohN-hpQ

    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

    https://github.com/rclone/rclone/blob/1ad22b8881ceaa6219f0bc1ae67507c74f49bdb2/lib/oauthutil/oauthutil.go#L440

    So what I'd suggest is that GUI sets a config key, say config_no_open_browser and we check that here

    https://github.com/rclone/rclone/blob/1ad22b8881ceaa6219f0bc1ae67507c74f49bdb2/lib/oauthutil/oauthutil.go#L553

    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.

  11. dalepmay commented on Aug 16, 2022

    @dalepmay

    I'd love to get the config create process working when running rclone in a Docker container.

    I don't see how it can ever work.

    You can't open a webbrowser window outside the container from within the container.

    Overseer, running in Docker, opens a browser window to login with Plex.

  12. imthenachoman commented on Aug 17, 2022

    @imthenachoman
    Author

    This problem has been solved in RCX

    What is RCX?

    So to sum that up - not easy - but it would be a worthwhile thing to do.

    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:

    1. issue command to create config passing initial options like remote type, name, etc...
    2. command would provide the remote URL that the user would need to go for auth-ing (like the actual Google Drive URL) and some token
    3. whatever issued the command would relay the URL back and wait for input of the auth token that the remote gives
    4. issue command providing token from Configurator: sort entries in remote type dropdown #2 and auth token from Explorer: store state in the URL #3

    Does that make sense or do I have it completely wrong?

  13. separac commented on Nov 6, 2025

    @separac

    Shi*****t. There was never a solution for this? I am running rclone gui in a docker on my unraid server and went crazy because of this error.

  14. imthenachoman commented on Nov 7, 2025

    @imthenachoman
    Author

    No. It seems like an easy enough fix, I think I even found the relevant parts in the code, but don't understand the language fully and couldn't see if I could get it to work.

  15. TripsJ commented on Dec 29, 2025

    @TripsJ

    Looks like the same process is used to handle Dropbox as well, leading to this error

    Image
  16. imthenachoman commented on Dec 31, 2025

    @imthenachoman
    Author

    I assume anything that tries to open a browser through localhost will fail....

  17. zjuht commented on Feb 25, 2026

    @zjuht

    why this issue is not fixed for so long time?

  18. AlecRust commented on Feb 26, 2026

    @AlecRust

    @zjuht the last commit to this repo was 5 years ago. Clearly this project is not being worked on.

    So that's why 👍

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions