abraunegg / onedrive

OneDrive Client for Linux
https://abraunegg.github.io
GNU General Public License v3.0
10.06k stars 859 forks source link

OneDrive authorization link returns empty page #1298

Closed cptully closed 3 years ago

cptully commented 3 years ago

Bug Report Details

onedrive --version onedrive v2.3.13-1build2

Just installed via apt install onedrive

I have tried multiple times to follow the configuration steps and always get stopped at the point of authorizing this client to access my work account. The first time I got a popup window with an allow button so I clicked that and got back a blank page. Inspecting shows no html and no code. I have never seen a response URL. I tried again by openeing a new tab in my browser and inspecting that page. then pasting in the "Authorize this app by visiting:" string. Doing this allowed me to look at the reprocess?ctx... packet on te netwrok tab where I find a response header that looks like the expected value so I pasted that into the command as the response URL and I get back this error message:

onedrive.OneDriveException@src/onedrive.d(874): HTTP request returned status code 400 (Bad Request)
{
    "correlation_id": "a1a38511-f2e4-4bc8-833f-0f6952177b79",
    "error": "invalid_grant",
    "error_codes": [
        9002313
    ],
    "error_description": "AADSTS9002313: Invalid request. Request is malformed or invalid.\r\nTrace ID: f42e253c-3785-436b-98a8-bcdf3faa3d00\r\nCorrelation ID: a1a38511-f2e4-4bc8-833f-0f6952177b79\r\nTimestamp: 2021-02-25 21:19:24Z",
    "error_uri": "https:\/\/login.microsoftonline.com\/error?code=9002313",
    "timestamp": "2021-02-25 21:19:24Z",
    "trace_id": "f42e253c-3785-436b-98a8-bcdf3faa3d00"
}
----------------
??:? [0x563712add9d9]
??:? [0x563712adccb5]
??:? [0x563712addb65]
??:? [0x563712adbf58]
??:? [0x563712adb8c5]
??:? [0x563712ae97a8]
??:? void rt.dmain2._d_run_main2(char[][], ulong, extern (C) int function(char[][])*).runAll() [0x7f8ee54929db]
??:? _d_run_main2 [0x7f8ee54927ee]
??:? _d_run_main [0x7f8ee549265d]
??:? __libc_start_main [0x7f8ee507e0b2]
??:? [0x563712ab45ed]

Application and Operating System Details:


*   Explain your entire configuration setup - is the OneDrive folder shared with any other system, shared with any other platform at the same time, is the OneDrive account you use shared across multiple systems / platforms / Operating Systems and in use at the same time
This account can be accessed via my browser but I am not syncing it to any other computers.

**Note:** Please generate a full debug log whilst reproducing the issue as per [https://github.com/abraunegg/onedrive/wiki/Generate-debug-log-for-support](https://github.com/abraunegg/onedrive/wiki/Generate-debug-log-for-support) and email to support@mynas.com.au

The entire verbose log:

[DEBUG] homePath: HOME environment variable set [DEBUG] homePath: /home/chris [DEBUG] configDirBase: WARNING - no XDG_CONFIG_HOME environment variable set [DEBUG] configDirBase: /home/chris/.config [DEBUG] configDirName: Configuring application to use default config path Using Config Dir: /home/chris/.config/onedrive No config file found, using application defaults [DEBUG] sync_dir: Getting syncDir from config value sync_dir [DEBUG] sync_dir: A '~' was found in configured sync_dir, automatically expanding as SHELL and USER environment variable is set [DEBUG] syncDir: /home/chris/OneDrive Initializing the OneDrive API ... [DEBUG] Downgrading all HTTP operations to HTTP/1.1 by default Authorize this app visiting:

https://login.microsoftonline.com/common/oauth2/v2.0/authorize?client_id=22c49a0d-d21c-4792-aed1-8f163c982546&scope=Files.ReadWrite%20Files.ReadWrite.all%20Sites.ReadWrite.All%20offline_access&response_type=code&redirect_uri=https://login.microsoftonline.com/common/oauth2/nativeclient

Enter the response uri:



**To Reproduce**
Steps to reproduce the behavior if not causing an application crash:
1.  run 'onedrive' on cli
2.  get prompt to visit an authorization URL
3.  Click the 'Allow' button on the prompt dialog
4.  Get a blank screen with no HTML elements visible in the Chrome dev tools

If issue is replicated by a specific 'file' or 'path' please archive the file and path tree & email to support@mynas.com.au 

**Screenshots**
If applicable, add screenshots to help explain your problem.

A screenshot of a white screen won't tell you much...

**Additional context**
Add any other context about the problem here.

### Bug Report Checklist ###
*   [] Detailed description
*   [] Application and Operating System Details provided in full
*   [] Reproduction steps (if applicable)
*   [] Verbose Log Output from your error
*   [] Debug Log generated and submitted
abraunegg commented 3 years ago

@cptully

Just installed via apt install onedrive

This is the cause of your problem. This is not supported as Ubuntu Universe contains old invalid versions.

You are running v2.3.13 which is over 13 months old now. Please uninstall that package, + all dependencies that were installed and please follow the correct installation process as per https://github.com/abraunegg/onedrive/blob/master/docs/INSTALL.md

Specifically for Ubuntu, refer to this: https://github.com/abraunegg/onedrive/blob/master/docs/INSTALL.md#important-information-for-all-ubuntu-and-ubuntu-based-distribution-users

If you want to change this situation, so that you can just install via 'apt install onedrive' consider becoming the package maintainer for Ubuntu.

cptully commented 3 years ago

I will contend that your README.md file needs to be updated. If you really do not want people using the PPA, then don't list in the matrix at the top of the page. Listing there implies that it is working solution.

I read that table saw the instructions for using the PPA and did not read the rest of the file. I know, RTFM, but I did, I just did not read the whole file so I did not see the note below explaining that the PPA is so badly out of date.

abraunegg commented 3 years ago

@cptully

I will contend that your README.md file needs to be updated. If you really do not want people using the PPA, then don't list in the matrix at the top of the page. Listing there implies that it is working solution.

FYI - nothing in the readme.md details Ubuntu package support, that is all in the install.md document, and the table at the top clearly denotes to use the PPA.

I read that table saw the instructions for using the PPA and did not read the rest of the file. I know, RTFM, but I did, I just did not read the whole file so I did not see the note below explaining that the PPA is so badly out of date.

The PPA is up to date (it has the latest version v2.4.10 available), it is the Ubuntu Universe is out-of-date by a major margin. Please re-read the documents again as this is very clearly stated.

If you feel that changes are needed in the documentation, PR's are welcome.