Cannot create pCloud config file on OSX

Thanks for the reply. The --progress results yesterday showed different results from today. Same test we used to try and optimise the write to the pCloud Drive mount speed. Only thing that has changed on the config was the rclone update and osxfuse update as written above.

So we guess is that it was something OTHER than the --drive-mount-flag. Have posted the results here. Tests with and without flag/different transfer limits. Will correct the text above.

Hello,

unfortunately I am getting the same error message when trying to authorize my pcloud account on Linux. I have tried it with version v1.52.0-003-g764b90a5-beta but without success.
The result looks always like:

Log in and authorize rclone for access
Waiting for code...
Got code
2020/06/30 10:10:57 Failed to configure token: failed to get token: oauth2: server response missing access_token

The website (localhost:53682/?code=...) does say success though.

Please, can you help with that problem?

I should also mention that at the first time I have tried it with the official latest version v1.52.2...

...here is the debug:
Log in and authorize rclone for access
Waiting for code...
2020/06/30 11:53:52 DEBUG : Received GET request on auth server to "/"
Got code
2020/06/30 11:53:54 DEBUG : Closing auth server
2020/06/30 11:53:54 DEBUG : Closed auth server with error: accept tcp 127.0.0.1:53682: use of closed network connection
2020/06/30 11:53:54 Failed to configure token: failed to get token: oauth2: server response missing access_token

What worked for us is to log out of EVERYTHING - pCloud drive, pCloud web, rclone... then try again. If you still have a problem - then it may be Linux distro related. Hope it helps.

Thank you for trying to help. I did already read your comment about it and I have really tried everything like you described. I hope I did not wrong but I should have been logged out from everything because I needed to enter my credentials. I have even tried it with the headless kind of 'rclone authorize 'pcloud' as well.

I suspect you have a local firewall which is interfering with the oauth. Rclone needs to listen on 127.0.0.1 on port 53682 to receive the info back from the browser.

No, unfortunately that's not the issue. The authorization process works fine when trying with dropbox instead.

...here is some more information:

Waiting for code...
2020/06/30 14:53:22 DEBUG : Received GET request on auth server to "/"
Got code
2020/06/30 14:53:22 DEBUG : You have specified to dump information. Please be noted that the Accept-Encoding as shown may not be correct in the request and the response may not show Content-Encoding if the go standard libraries auto gzip encoding was in effect. In this case the body of the request will be gunzipped before showing it.
2020/06/30 14:53:22 DEBUG : >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
2020/06/30 14:53:22 DEBUG : HTTP REQUEST (req 0xc0006e2300)
2020/06/30 14:53:22 DEBUG : POST /oauth2_token HTTP/1.1
Host: api.pcloud.com
User-Agent: rclone/v1.52.0-003-g764b90a5-beta
Content-Length: 121
Authorization: XXXX
Content-Type: application/x-www-form-urlencoded
Accept-Encoding: gzip

code=h47.......................................
&grant_type=authorization_code&redirect_uri=http%3A%2F%2Flocalhost%3A53682%2F
2020/06/30 14:53:22 DEBUG : >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
2020/06/30 14:53:23 DEBUG : <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
2020/06/30 14:53:23 DEBUG : HTTP RESPONSE (req 0xc0006e2300)
2020/06/30 14:53:23 DEBUG : HTTP/1.1 200 OK
Connection: close
Content-Length: 57
Cache-Control: private, max-age=0
Content-Type: application/json; charset=utf-8
Date: Tue, 30 Jun 2020 12:53:22 GMT
Etag: "Etix..............................................."
Server: CloudHTTPd-API v1.1
Vary: Accept-Encoding
X-Error: 2012

{
"result": 2012,
"error": "Invalid 'code' provided."
}
2020/06/30 14:53:23 DEBUG : <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
2020/06/30 14:53:23 DEBUG : >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
2020/06/30 14:53:23 DEBUG : HTTP REQUEST (req 0xc0003f6c00)
2020/06/30 14:53:23 DEBUG : POST /oauth2_token HTTP/1.1
Host: api.pcloud.com
User-Agent: rclone/v1.52.0-003-g764b90a5-beta
Content-Length: 186
Content-Type: application/x-www-form-urlencoded
Accept-Encoding: gzip

client_id=DnONSzyJXpm&client_secret=RU...............................&
code=h4..................................&grant_type=authorization_code&redirect_uri=http%3A%2F%2Flocalhost%3A53682%2F
2020/06/30 14:53:23 DEBUG : >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
2020/06/30 14:53:24 DEBUG : <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
2020/06/30 14:53:24 DEBUG : HTTP RESPONSE (req 0xc0003f6c00)
2020/06/30 14:53:24 DEBUG : HTTP/1.1 200 OK
Connection: close
Content-Length: 57
Cache-Control: private, max-age=0
Content-Type: application/json; charset=utf-8
Date: Tue, 30 Jun 2020 12:53:24 GMT
Etag: "EtixHW............................"
Server: CloudHTTPd-API v1.1
Vary: Accept-Encoding
X-Error: 2012

{
"result": 2012,
"error": "Invalid 'code' provided."
}
2020/06/30 14:53:24 DEBUG : <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
2020/06/30 14:53:24 DEBUG : Closing auth server
2020/06/30 14:53:24 DEBUG : Closed auth server with error: accept tcp 127.0.0.1:53682: use of closed network connection
2020/06/30 14:53:24 Failed to configure token: failed to get token: oauth2: server response missing access_token

OK...

Did you fill in client_id and client_secret? These need to stay blank.

Are you using 2FA with pcloud? If so you might need to disable it temporarily.

I can't think of anything else - I just tried it with pcloud and it worked for me.

I was using no client_id and no client_secret, and I have not used 2FA either. This is really strange. What is about this error message in the debug? Any idea?

{
"result": 2012,
"error": "Invalid 'code' provided."
}

Indeed!

It means that the rclone provided the wrong cryptographic code to pcloud which is why I asked about the client_id and client_secret.

Did you ever get to put your password in at pcloud? I'm guessing not but I'm not sure.

It would be worth trying the latest beta - just in case...

Yes, I can login to pcloud on web and with the desktop client. I also get the login mask when I am writing 'rclone authorize "pcloud" '&enter. After entering my credentials, I get even the message 'Success! All done. Please go back to rclone.'

I have even tried it with a different pc (notebook) and a mobile internet connection - same result.

... and the same error message when trying on my macbook.

What does this part of the debug-log mean?

Waiting for code...
2020/06/30 19:15:49 DEBUG : Received GET request on auth server to "/"

using v1.52.0, i just created a pcloud remote on windows 10.

rclone about pcloud:
Total:   5G
Used:    114.429M
Free:    4.888G

I see. Any idea, what I can do to collect more useful information?

it was easy to do, took about one minute.

as per the https://rclone.org/pcloud/

same result, as always: :frowning:
Storage> 26
** See help for pcloud backend at: https://rclone.org/pcloud/ **

Pcloud App Client Id
Leave blank normally.
Enter a string value. Press Enter for the default ("").
client_id>
Pcloud App Client Secret
Leave blank normally.
Enter a string value. Press Enter for the default ("").
client_secret>
Edit advanced config? (y/n)
y) Yes
n) No (default)
y/n>
Remote config
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
    If your browser doesn't open automatically go to the following link: http://127.0.0.1:53682/auth?state=1pzM633Jvr6h3-QXSiiQuA
    Log in and authorize rclone for access
    Waiting for code...
    Got code
    2020/06/30 19:25:10 Failed to configure token: failed to get token: oauth2: server response missing access_token

Isn't it possible it's working with old pcloud accounts but not with my new one anymore?
Would be very strange, but...

short summary: I have tried it with kubuntu, mint, osx and different internet access...

...it does work with dropbox.

But when logging in to dropbox, after entering my credentials I get a window with ' rclone would like access to the files and folders in your Dropbox.'

However, I do not get something like that after entering the credentials for pcloud.

...but this is probably only dropbox specific.

i am using firefox, what about you?

when i created the remote, i was already logged into pcloud.com website.