Skip to content

mail.ru.cloud oauth2 fails sporadically #3988

Closed

Description

@Alexey-github

Hello,
Please support add oauth2 authorization Mail.ru Cloud.
error: Failed to authorize: oauth2: server response missing access_token

Activity

  1. self-assigned this
    on Feb 21, 2020
  2. ivandeex commented on Feb 24, 2020

    @ivandeex
    Member

    Probably relates to #3637

  3. ivandeex commented on Feb 24, 2020

    @ivandeex
    Member

    @Alexey-github Please provide more details. When did the problem start? Is it sporadic?

  4. ivandeex commented on May 17, 2020

    @ivandeex
    Member

    Closed due to lack of user response.

  5. smokeev-dev commented on Oct 26, 2020

    @smokeev-dev

    Hello. I have the same problem... I just install new remote (mail.ru) with interactive config.

    root@h:~# rclone lsd ser-mail:
    2020/10/26 21:20:50 Failed to create file system for "ser-mail:": Failed to authorize: oauth2: server response missing access_token

  6. ivandeex commented on Oct 26, 2020

    @ivandeex
    Member

    Please run rclone lsd -vvv ser-mail:, replace secrets by xxx and send here the log.

  7. 6 remaining items

  8. ivandeex commented on Dec 13, 2020

    @ivandeex
    Member

    We need to go deeper, ask rclone to dump HTTP

    rclone lsd mailru: --dump headers,bodies -vvv
    
    Here is my collapsible log with secrets replaced by xxx ...
    2020/12/13 22:43:36 DEBUG : rclone: Version "v1.53.3" starting with parameters ["./bin/rclone" "lsd" "mrall:" "--dump" "headers,bodies" "-vvv"]
    2020/12/13 22:43:36 DEBUG : Using config file from "/home/xxx/.rclone.conf"
    2020/12/13 22:43:36 DEBUG : Creating backend with remote "mrall:"
    2020/12/13 22:43:36 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/12/13 22:43:36 INFO  : []: Valid token not found, authorizing.
    2020/12/13 22:43:36 DEBUG : >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
    2020/12/13 22:43:36 DEBUG : HTTP REQUEST (req 0xc000214200)
    2020/12/13 22:43:36 DEBUG : POST /token HTTP/1.1
    Host: o2.mail.ru
    User-Agent: rclone/v1.53.3
    Content-Length: 100
    Content-Type: application/x-www-form-urlencoded
    Accept-Encoding: gzip
    
    client_id=cloud-win&grant_type=password&password=xxx&username=xxx%40mail.ru
    2020/12/13 22:43:36 DEBUG : >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
    2020/12/13 22:43:36 DEBUG : <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
    2020/12/13 22:43:36 DEBUG : HTTP RESPONSE (req 0xc000214200)
    2020/12/13 22:43:36 DEBUG : HTTP/2.0 200 OK
    Content-Length: 174
    Cache-Control: no-cache,no-store,must-revalidate
    Content-Type: application/json;charset=UTF-8
    Date: Sun, 13 Dec 2020 19:43:36 GMT
    Expires: Sat, 14 Dec 2019 19:43:36 GMT
    Last-Modified: Sun, 13 Dec 2020 22:43:36 GMT
    Pragma: no-cache
    Server: nginx
    Strict-Transport-Security: max-age=31536000; includeSubDomains; preload
    X-Frame-Options: DENY
    X-Host: fau35.m.smailru.net
    X-Mru-Request-Id: e4fd5303
    
    {"expires_in":3600,"refresh_token":"xxx","access_token":"xxx","token_type":"Bearer"}
    2020/12/13 22:43:36 DEBUG : <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
    2020/12/13 22:43:36 DEBUG : mrall: Saved new token in config file
    2020/12/13 22:43:36 DEBUG : >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
    2020/12/13 22:43:36 DEBUG : HTTP REQUEST (req 0xc000214a00)
    2020/12/13 22:43:36 DEBUG : GET /api/m1/file?access_token=xxx&home=&limit=2147483647&offset=0 HTTP/1.1
    Host: cloud.mail.ru
    User-Agent: rclone/v1.53.3
    Accept: */*
    Accept-Encoding: gzip
    
    2020/12/13 22:43:36 DEBUG : >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
    2020/12/13 22:43:36 DEBUG : <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
    2020/12/13 22:43:36 DEBUG : HTTP RESPONSE (req 0xc000214a00)
    2020/12/13 22:43:36 DEBUG : HTTP/1.1 200 OK
    Content-Length: 217
    Cache-Control: no-store, no-cache, must-revalidate
    Connection: keep-alive
    Content-Security-Policy-Report-Only: default-src *.cloud.mail.ru *.clob.mail.ru *.cloud.mail.ru *.datacloudmail.ru *.cldmail.ru *.mail.ru *.imgsmail.ru *.files.attachmail.ru *.mradx.net *.gemius.pl *.weborama.fr *.adriver.ru *.serving-sys.com featherservices.aviary.com d42hh4005hpu.cloudfront.net dme0ih8comzn4.cloudfront.net feather-client-files-aviary-prod-us-east-1.s3.amazonaws.com  *.yandex.ru; script-src 'unsafe-inline' 'unsafe-eval' *.cloud.mail.ru *.datacloudmail.ru *.cldmail.ru *.mail.ru *.imgsmail.ru *.files.attachmail.ru *.mradx.net *.yandex.ru *.odnoklassniki.ru odnoklassniki.ru *.ok.ru ok.ru *.scorecardresearch.com www.google-analytics.com www.googletagmanager.com featherservices.aviary.com d42hh4005hpu.cloudfront.net dme0ih8comzn4.cloudfront.net feather-client-files-aviary-prod-us-east-1.s3.amazonaws.com yastatic.net cdn.consentmanager.mgr.consensu.org consentmanager.mgr.consensu.org; img-src data: *; style-src 'unsafe-inline' *.mail.ru *.imgsmail.ru *.files.attachmail.ru *.mradx.net featherservices.aviary.com d42hh4005hpu.cloudfront.net dme0ih8comzn4.cloudfront.net feather-client-files-aviary-prod-us-east-1.s3.amazonaws.com cdn.consentmanager.mgr.consensu.org; font-src data: cloud.mail.ru *.imgsmail.ru *.files.attachmail.ru *.mradx.net featherservices.aviary.com d42hh4005hpu.cloudfront.net dme0ih8comzn4.cloudfront.net feather-client-files-aviary-prod-us-east-1.s3.amazonaws.com; frame-src *.mail.ru *.datacloudmail.ru *.cldmail.ru docs.mail.ru *.officeapps.live.com *.mradx.net yastatic.net; object-src data: blob: https://*; report-uri https://cspreport.mail.ru/cloud/; worker-src blob: *.mail.ru; connect-src https://*.mail.ru https://www.google-analytics.com https://www.googletagmanager.com https://stats.g.doubleclick.net https://ok.ru https://*.yandex.ru https://analytics.google.com https://corsapi.imgsmail.ru https://vk.com;
    Content-Type: application/json; charset=utf-8
    Date: Sun, 13 Dec 2020 19:43:36 GMT
    Expires: Sat, 14 Dec 2019 19:43:36 GMT
    Pragma: no-cache
    Server: nginx
    Strict-Transport-Security: max-age=15768000; includeSubDomains; preload
    X-Content-Type-Options: nosniff
    X-Email: [email protected]
    X-Frame-Options: SAMEORIGIN
    X-Host: clof6.i.mail.ru
    X-Page-Id: 
    X-Req-Id: xxx
    X-Server: lightning
    X-Timestamp: 1607888616
    X-Timing: 0.0887761116027832
    X-Ua-Compatible: IE=Edge
    X-Upstream-Time: 35979873.757
    X-Xss-Protection: 1; mode=block; report=https://cspreport.mail.ru/xxssprotection
    
    {"email":"[email protected]","body":{"count":{"folders":23,"files":1},"tree":"xxx","name":"/","grev":439719,"kind":"folder","rev":368763,"type":"folder","home":"/"},"time":1607888616912,"status":200}
    2020/12/13 22:43:36 DEBUG : <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
    2020/12/13 22:43:36 DEBUG : >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
    2020/12/13 22:43:36 DEBUG : HTTP REQUEST (req 0xc000215500)
    2020/12/13 22:43:36 DEBUG : POST /api/m1/folder?access_token=xxx&limit=2147483647&offset=0 HTTP/1.1
    Host: cloud.mail.ru
    User-Agent: rclone/v1.53.3
    Content-Length: 8
    Accept: */*
    Content-Type: application/x-www-form-urlencoded
    Accept-Encoding: gzip
    
    home=%2F
    2020/12/13 22:43:36 DEBUG : >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
    2020/12/13 22:43:37 DEBUG : <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
    2020/12/13 22:43:37 DEBUG : HTTP RESPONSE (req 0xc000215500)
    2020/12/13 22:43:37 DEBUG : HTTP/1.1 200 OK
    Content-Length: 4505
    Cache-Control: no-store, no-cache, must-revalidate
    Connection: keep-alive
    Content-Security-Policy-Report-Only: default-src *.cloud.mail.ru *.clob.mail.ru *.cloud.mail.ru *.datacloudmail.ru *.cldmail.ru *.mail.ru *.imgsmail.ru *.files.attachmail.ru *.mradx.net *.gemius.pl *.weborama.fr *.adriver.ru *.serving-sys.com featherservices.aviary.com d42hh4005hpu.cloudfront.net dme0ih8comzn4.cloudfront.net feather-client-files-aviary-prod-us-east-1.s3.amazonaws.com  *.yandex.ru; script-src 'unsafe-inline' 'unsafe-eval' *.cloud.mail.ru *.datacloudmail.ru *.cldmail.ru *.mail.ru *.imgsmail.ru *.files.attachmail.ru *.mradx.net *.yandex.ru *.odnoklassniki.ru odnoklassniki.ru *.ok.ru ok.ru *.scorecardresearch.com www.google-analytics.com www.googletagmanager.com featherservices.aviary.com d42hh4005hpu.cloudfront.net dme0ih8comzn4.cloudfront.net feather-client-files-aviary-prod-us-east-1.s3.amazonaws.com yastatic.net cdn.consentmanager.mgr.consensu.org consentmanager.mgr.consensu.org; img-src data: *; style-src 'unsafe-inline' *.mail.ru *.imgsmail.ru *.files.attachmail.ru *.mradx.net featherservices.aviary.com d42hh4005hpu.cloudfront.net dme0ih8comzn4.cloudfront.net feather-client-files-aviary-prod-us-east-1.s3.amazonaws.com cdn.consentmanager.mgr.consensu.org; font-src data: cloud.mail.ru *.imgsmail.ru *.files.attachmail.ru *.mradx.net featherservices.aviary.com d42hh4005hpu.cloudfront.net dme0ih8comzn4.cloudfront.net feather-client-files-aviary-prod-us-east-1.s3.amazonaws.com; frame-src *.mail.ru *.datacloudmail.ru *.cldmail.ru docs.mail.ru *.officeapps.live.com *.mradx.net yastatic.net; object-src data: blob: https://*; report-uri https://cspreport.mail.ru/cloud/; worker-src blob: *.mail.ru; connect-src https://*.mail.ru https://www.google-analytics.com https://www.googletagmanager.com https://stats.g.doubleclick.net https://ok.ru https://*.yandex.ru https://analytics.google.com https://corsapi.imgsmail.ru https://vk.com;
    Content-Type: application/json; charset=utf-8
    Date: Sun, 13 Dec 2020 19:43:37 GMT
    Expires: Sat, 14 Dec 2019 19:43:37 GMT
    Pragma: no-cache
    Server: nginx
    Strict-Transport-Security: max-age=15768000; includeSubDomains; preload
    X-Content-Type-Options: nosniff
    X-Email: [email protected]
    X-Frame-Options: SAMEORIGIN
    X-Host: clof6.i.mail.ru
    X-Page-Id: 
    X-Req-Id: xxx
    X-Server: lightning
    X-Timestamp: 1607888617
    X-Timing: 0.0842609405517578
    X-Ua-Compatible: IE=Edge
    X-Upstream-Time: 35979873.894
    X-Xss-Protection: 1; mode=block; report=https://cspreport.mail.ru/xxssprotection
    
    {"email":"[email protected]","body":{"count":{"folders":23,"files":1},"tree":"333031313632613130303030","name":"/","grev":439719,"size":882826070631,"sort":{"order":"asc","type":"name"},"kind":"folder","rev":368763,"type":"folder","home":"/","list":[{"count":{"folders":13,"files":2},"tree":"333031313632613130303030","name":"ableton","grev":24029,"size":2133936100,"kind":"folder","rev":9492,"type":"folder","home":"/ableton"},{"count":{"folders":28,"files":0},"tree":"333031313632613130303030","name":"books","grev":319966,"size":17029777420,"kind":"folder","rev":24396,"type":"folder","home":"[[[SNIP]]]"}]},"time":1607888617044,"status":200}
    2020/12/13 22:43:37 DEBUG : <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
    [snip]
               0 1970-01-01 03:00:00        -1 test
    190826369184 1970-01-01 03:00:00        -1 videos
    2020/12/13 22:43:37 DEBUG : 5 go routines active
    

    Please do the same and let's compare.

  9. lxnglz commented on Dec 13, 2020

    @lxnglz

    After my previous post I used another tool to connect to the mail.ru cloud, and apparently it remembered something somehow. Because now the log does not contain this line: "[]: Valid token not found, authorizing.". And rclone successfully connects to the cloud. So, to return to the clean state I need to erase that "token" whatever it means. How could I do that?

  10. ivandeex commented on Dec 13, 2020

    @ivandeex
    Member

    Use any text editor e.g. notepad,
    edit text file C:\Users\YourUserName\.config\rclone\rclone.conf,
    find section [YourMailruRemote],
    insert # in the beginning of the line token=... (or remove it completely),
    save,
    retry your command

  11. lxnglz commented on Dec 14, 2020

    @lxnglz

    I am afraid, this is no longer reproducible for me. I cleared the token and still it could successfully log into the cloud.
    I suspect, this was something on the mail.ru side. I had problems with the other tool I am using until yesterday, but then, after I had logged in through the web, something was probably reset on their side, and so now all means are working fine.
    If this happens again, I will try to collect the debug information and post it here.
    thanks.

  12. ivandeex commented on Dec 14, 2020

    @ivandeex
    Member

    Might be related to 2-factor authentication forced on mailru account #3637 (documented in https://rclone.org/mailru)

  13. changed the title [-]Mail.ru Cloud oauth2[/-] [+]mail.ru.cloud oauth2 fails sporadically[/+] on Dec 14, 2020
  14. lxnglz commented on Dec 14, 2020

    @lxnglz

    No, no. I don't have it turned on. The 2F-authentication is definetely off. I suspect, the storage was almost full and this created some side effects, eventhough technicall there was still some spare space. If this happens again, I will do my best to collect as much info as I can.

  15. ivandeex commented on Jan 9, 2021

    @ivandeex
    Member

    I am afraid, this is no longer reproducible for me. I cleared the token and still it could successfully log into the cloud.

    Bottom line: this was reported three times for last year but never confirmed. Let's put this ticket on hold.

  16. vol1ura commented on Jan 12, 2021

    @vol1ura

    I have the same problems with my mail.ru account. The 2F-authentification is on and I need oauth2 authorization.
    rclone lsd -vvv mailru:
    2021/01/12 17:55:25 DEBUG : rclone: Version "v1.50.2" starting with parameters ["rclone" "lsd" "-vvv" "mailru:"]
    2021/01/12 17:55:25 DEBUG : Using config file from "/home/user/.config/rclone/rclone.conf"
    2021/01/12 17:55:25 INFO : []: Valid token not found, authorizing.
    2021/01/12 17:55:26 Failed to create file system for "mailru:": Failed to authorize: oauth2: server response missing access_token

  17. ivandeex commented on Jan 12, 2021

    @ivandeex
    Member

    2FA is unsupported yet as explicitly stated in the docs

  18. ivandeex commented on Jan 17, 2021

    @ivandeex
    Member

    closing this out in favor of #3637

  19. locked as off topic and limited conversation to collaborators on Jan 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions