Unable to open browser automatically after pasting rclone authorize on command prompt

What is the problem you are having with rclone?

Was trying to do rclone config with google drive, until this part;

Use auto config?
 * Say Y if not sure
 * Say N if you are working on a remote or headless machine

y) Yes (default)
n) No
y/n> y
2022/06/10 13:08:30 NOTICE: If your browser doesn't open automatically go to the following link: http://127.0.0.1:53682/auth?state=5O_S2bHiC_2QyilCB7xDow
2022/06/10 13:08:30 NOTICE: Log in and authorize rclone for access
2022/06/10 13:08:30 NOTICE: Waiting for code...

it should be opening the browser automatically, but it didn't. face the same issue when i type "n" on auto config. how do i fix it?

Run the command 'rclone version' and share the full output of the command.

rclone v1.58.1
- os/version: raspbian 10.12 (64 bit)
- os/kernel: 4.19.0-20-amd64 (x86_64)
- os/type: linux
- os/arch: amd64
- go/version: go1.17.9
- 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)

rclone authorize "drive"

A log from the command with the -vv flag

pi@Raspberry0432:~ $ rclone authorize "drive" -vv
2022/06/10 17:02:50 DEBUG : rclone: Version "v1.58.1" starting with parameters ["rclone" "authorize" "drive" "-vv"]
2022/06/10 17:02:50 DEBUG : **temp-fs**: config in: state="", result=""
2022/06/10 17:02:50 DEBUG : Using config file from "/home/pi/.config/rclone/rclone.conf"
2022/06/10 17:02:50 DEBUG : OAuth only is set - overriding return state
2022/06/10 17:02:50 DEBUG : **temp-fs**: config out: out=&{State:*oauth,,, Option:<nil> OAuth:<nil> Error: Result:}, err=<nil>
2022/06/10 17:02:50 DEBUG : **temp-fs**: config in: state="*oauth,,,", result=""
2022/06/10 17:02:50 DEBUG : **temp-fs**: config out: out=&{State:*oauth-confirm,,, Option:<nil> OAuth:<nil> Error: Result:}, err=<nil>
2022/06/10 17:02:50 DEBUG : **temp-fs**: config in: state="*oauth-confirm,,,", result=""
2022/06/10 17:02:50 DEBUG : Auto confirm is set, choosing default "true" for state "*oauth-islocal,,,", override by setting config parameter "config_is_local"
2022/06/10 17:02:50 DEBUG : **temp-fs**: config out: out=&{State:*oauth-islocal,,, Option:<nil> OAuth:<nil> Error: Result:true}, err=<nil>
2022/06/10 17:02:50 DEBUG : **temp-fs**: config in: state="*oauth-islocal,,,", result="true"
2022/06/10 17:02:50 DEBUG : **temp-fs**: config out: out=&{State:*oauth-do,,, Option:<nil> OAuth:<nil> Error: Result:}, err=<nil>
2022/06/10 17:02:50 DEBUG : **temp-fs**: config in: state="*oauth-do,,,", result=""
2022/06/10 17:02:50 DEBUG : Starting auth server on 127.0.0.1:53682
2022/06/10 17:02:50 DEBUG : **temp-fs**: config out: out=<nil>, err=config failed to refresh token: failed to start auth webserver: listen tcp 127.0.0.1:53682: bind: address already in use
Error: config failed to refresh token: failed to start auth webserver: listen tcp 127.0.0.1:53682: bind: address already in use
Usage:
  rclone authorize [flags]

Flags:
      --auth-no-open-browser   Do not automatically open auth link in default browser
  -h, --help                   help for authorize

Use "rclone [command] --help" for more information about a command.
Use "rclone help flags" for to see the global flags.
Use "rclone help backends" for a list of supported services.

2022/06/10 17:02:50 Fatal error: config failed to refresh token: failed to start auth webserver: listen tcp 127.0.0.1:53682: bind: address already in use

This is something to do with your os configuration - rclone can't work out how to open the browser.

You can just use the link in the message though.

Thank you for the response.
yes i did try to use the link given in the message but this is what i get;

the site can't be reached

Are you trying to configure a remote machine - if so check out the docs here: Remote Setup

yes, i'm trying to set up rclone on a headless raspberry pi on an old pc. i 've connected the headless raspberry via ssh using Putty and set up rclone on my other pc.

Did you find a way to authorize Google Drive?

Honestly it's annoying how rclone changed in this regard. In the previous versions, authorization on a remote machine was much easier. Talking about Google Drive specifically.

1 Like

Yep, annoying how Google changed something and the free software you use got updated and fixed to meet the required change from Google.

How annoying of rclone.

What problem are you having as the authorize works without issue from a machine with a browser? Start a new post and use the help and support template and we're happy to assist as the process is the same as previous versions minus the command to get the token slightly changing.

My bad... I was clueless that google changed their policies. I'm so sorry for my stupid comment.

Also, I already figured out how to mount GDrive. It's a little bit hassl-ish but it's all good now.

Again, sorry for my comment.

And I honestly gotta give props to all rclone developers and contributors for making such great tool.

Cheers!

1 Like

Hi sorry for the super late reply.

yes i did find a solution. i was browsing the installed packages in my raspberrypi ( apt list --installed ) and notice that rclone was not installed in it. It's weird because i've already installed rclone by running curl https://rclone.org/install.sh | sudo bash

So i try to run sudo apt-get install rclone , it installed the previous version of rclone.

i then try to run rclone config, authorize the google drive and it works.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.