abraunegg / onedrive

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

Brand new install on Ubuntu 20, receiving 400 Bad Request, OneDrive for Bus #1316

Closed noMoreUserNamesAvailableAnymore closed 3 years ago

noMoreUserNamesAvailableAnymore commented 3 years ago

Note: Before submitting a bug report, please ensure you are running the latest 'onedrive' client as built from 'master' and by using the latest available DMD compiler. Refer to the readme on building the client for your system.

Bug Report Details

Describe the bug A clear and concise description of what the bug is.

Application and Operating System Details:

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

To Reproduce Steps to reproduce the behavior if not causing an application crash:

  1. run onedrive
  2. Go to URL that is generated
  3. Login to M365
  4. Copy the URI
  5. Paste URI into terminal
  6. See error
onedrive 
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: https://login.microsoftonline.com/common/oauth2/nativeclient?code=<redacted>
onedrive.OneDriveException@src/onedrive.d(874): HTTP request returned status code 400 (Bad Request)
{
    "correlation_id": "e467363c-ea7b-42b5-bf1f-a7efb17c7302",
    "error": "invalid_grant",
    "error_codes": [
        9002313
    ],
    "error_description": "AADSTS9002313: Invalid request. Request is malformed or invalid.\r\nTrace ID: 49d692f0-9d95-47ea-8cf2-1201e9cfc900\r\nCorrelation ID: e467363c-ea7b-42b5-bf1f-a7efb17c7302\r\nTimestamp: 2021-03-03 18:19:16Z",
    "error_uri": "https:\/\/login.microsoftonline.com\/error?code=9002313",
    "timestamp": "2021-03-03 18:19:16Z",
    "trace_id": "49d692f0-9d95-47ea-8cf2-1201e9cfc900"
}
----------------
??:? [0x555e2392d9d9]
??:? [0x555e2392ccb5]
??:? [0x555e2392db65]
??:? [0x555e2392bf58]
??:? [0x555e2392b8c5]
??:? [0x555e239397a8]
??:? void rt.dmain2._d_run_main2(char[][], ulong, extern (C) int function(char[][])*).runAll() [0x7f8b8e8069db]
??:? _d_run_main2 [0x7f8b8e8067ee]
??:? _d_run_main [0x7f8b8e80665d]
??:? __libc_start_main [0x7f8b8e3f20b2]
??:? [0x555e239045ed]

I have granted access to the entire org from the onmicrosoft admin account and verified that it is in Azure AD enterprise applications.

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

Complete Verbose Log Output A clear and full log of the problem when running the application in the following manner (ie, not in monitor mode):

onedrive --synchronize --verbose <any of your other needed options>

Run the application in a separate terminal window or SSH session and provide the entire application output including the error & crash. When posing the logs, Please format log output to make it easier to read. See https://guides.github.com/features/mastering-markdown/ for more details.

Application Log Output:

Verbose console log output goes here

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

Additional context Add any other context about the problem here.

Bug Report Checklist

abraunegg commented 3 years ago

@noMoreUserNamesAvailableAnymore You have installed the client from the Ubuntu Universe using a package. This is not supported.

Please read:

noMoreUserNamesAvailableAnymore commented 3 years ago

Thank you, I did not notice that the add-apt-repository ppa:yann1ck/onedrive command failed saying it could not find the user or group yann1ck, so the rest of the commands that were waiting in the wing just looked at the existing repositories. Thanks again.

abraunegg commented 3 years ago

@noMoreUserNamesAvailableAnymore

Thank you, I did not notice that the add-apt-repository ppa:yann1ck/onedrive command failed saying it could not find the user or group yann1ck, so the rest of the commands that were waiting in the wing just looked at the existing repositories. Thanks again.

Just to close this out - I suspect then that you either typed in something incorrect or something else occurred.

Below is the exact output from a Ubuntu 20.04.01 system:

alex@ubuntu-20-LTS:~$ cat /etc/lsb-release 
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=20.04
DISTRIB_CODENAME=focal
DISTRIB_DESCRIPTION="Ubuntu 20.04.1 LTS"
alex@ubuntu-20-LTS:~$ sudo add-apt-repository ppa:yann1ck/onedrive
[sudo] password for alex: 
 A free Microsoft OneDrive Client which supports OneDrive Personal, OneDrive for Business, OneDrive for Office365 and SharePoint. This powerful and highly configurable client can run on all major Linux distributions, FreeBSD, or as a Docker container. It supports one-way and two-way sync capabilities and securely connects to Microsoft OneDrive services.

Link to Github for more information:
https://github.com/abraunegg/onedrive
 More info: https://launchpad.net/~yann1ck/+archive/ubuntu/onedrive
Press [ENTER] to continue or Ctrl-c to cancel adding it.

Hit:1 http://au.archive.ubuntu.com/ubuntu focal InRelease
Get:2 http://au.archive.ubuntu.com/ubuntu focal-updates InRelease [114 kB]
Get:3 http://au.archive.ubuntu.com/ubuntu focal-backports InRelease [101 kB]   
Get:4 http://au.archive.ubuntu.com/ubuntu focal/main DEP-11 48x48 Icons [98.4 kB]
Get:5 http://ppa.launchpad.net/yann1ck/onedrive/ubuntu focal InRelease [18.1 kB]  
Get:6 http://au.archive.ubuntu.com/ubuntu focal/main DEP-11 64x64 Icons [163 kB]              
Get:7 http://security.ubuntu.com/ubuntu focal-security InRelease [109 kB]
Get:8 http://au.archive.ubuntu.com/ubuntu focal/main DEP-11 64x64@2 Icons [15.8 kB]
Get:9 http://au.archive.ubuntu.com/ubuntu focal/universe DEP-11 48x48 Icons [3,016 kB]         
Get:10 http://ppa.launchpad.net/yann1ck/onedrive/ubuntu focal/main amd64 Packages [568 B]    
Get:11 http://ppa.launchpad.net/yann1ck/onedrive/ubuntu focal/main Translation-en [264 B]                       
Get:12 http://security.ubuntu.com/ubuntu focal-security/main i386 Packages [195 kB]  
Get:13 http://au.archive.ubuntu.com/ubuntu focal/universe DEP-11 64x64 Icons [7,794 kB]
Get:13 http://au.archive.ubuntu.com/ubuntu focal/universe DEP-11 64x64 Icons [7,794 kB]
Get:16 http://security.ubuntu.com/ubuntu focal-security/main amd64 Packages [521 kB]       
Get:13 http://au.archive.ubuntu.com/ubuntu focal/universe DEP-11 64x64 Icons [7,794 kB]
Get:18 http://security.ubuntu.com/ubuntu focal-security/main Translation-en [112 kB]                                                                                                         
Get:19 http://security.ubuntu.com/ubuntu focal-security/main amd64 DEP-11 Metadata [24.3 kB]                                                                                                 
Get:20 http://security.ubuntu.com/ubuntu focal-security/main DEP-11 48x48 Icons [11.0 kB]                                                                                                    
Get:21 http://security.ubuntu.com/ubuntu focal-security/main DEP-11 64x64 Icons [16.5 kB]                                                                                                    
Get:22 http://security.ubuntu.com/ubuntu focal-security/main DEP-11 64x64@2 Icons [29 B]                                                                                                     
Get:23 http://security.ubuntu.com/ubuntu focal-security/main amd64 c-n-f Metadata [7,072 B]                                                                                                  
Get:24 http://security.ubuntu.com/ubuntu focal-security/restricted amd64 Packages [132 kB]                                                                                                   
Get:25 http://security.ubuntu.com/ubuntu focal-security/restricted i386 Packages [14.9 kB]                                                                                                   
Get:26 http://security.ubuntu.com/ubuntu focal-security/restricted Translation-en [19.5 kB]                                                                                                  
Get:27 http://security.ubuntu.com/ubuntu focal-security/restricted amd64 c-n-f Metadata [392 B]                                                                                              
Get:28 http://security.ubuntu.com/ubuntu focal-security/universe i386 Packages [427 kB]                                                                                                      
Get:29 http://security.ubuntu.com/ubuntu focal-security/universe amd64 Packages [542 kB]                                                                                                     
Get:30 http://security.ubuntu.com/ubuntu focal-security/universe Translation-en [77.9 kB]                                                                                                    
Get:31 http://security.ubuntu.com/ubuntu focal-security/universe amd64 DEP-11 Metadata [58.2 kB]                                                                                             
Get:32 http://security.ubuntu.com/ubuntu focal-security/universe DEP-11 48x48 Icons [26.7 kB]                                                                                                
Get:33 http://security.ubuntu.com/ubuntu focal-security/universe DEP-11 64x64 Icons [46.0 kB]                                                                                                
Get:34 http://security.ubuntu.com/ubuntu focal-security/universe DEP-11 64x64@2 Icons [29 B]                                                                                                 
Get:35 http://security.ubuntu.com/ubuntu focal-security/universe amd64 c-n-f Metadata [10.4 kB]                                                                                              
Get:36 http://security.ubuntu.com/ubuntu focal-security/multiverse amd64 Packages [14.8 kB]                                                                                                  
Get:37 http://security.ubuntu.com/ubuntu focal-security/multiverse i386 Packages [2,520 B]                                                                                                   
Get:38 http://security.ubuntu.com/ubuntu focal-security/multiverse Translation-en [3,160 B]                                                                                                  
Get:39 http://security.ubuntu.com/ubuntu focal-security/multiverse amd64 c-n-f Metadata [340 B]                                                                                              
Get:13 http://au.archive.ubuntu.com/ubuntu focal/universe DEP-11 64x64 Icons [7,794 kB]                                                                                                      
Get:40 http://au.archive.ubuntu.com/ubuntu focal/universe DEP-11 64x64@2 Icons [44.3 kB]                                                                                                     
Get:41 http://au.archive.ubuntu.com/ubuntu focal/multiverse DEP-11 48x48 Icons [23.1 kB]                                                                                                     
Get:42 http://au.archive.ubuntu.com/ubuntu focal/multiverse DEP-11 64x64 Icons [192 kB]                                                                                                      
Get:43 http://au.archive.ubuntu.com/ubuntu focal/multiverse DEP-11 64x64@2 Icons [214 B]                                                                                                     
Get:44 http://au.archive.ubuntu.com/ubuntu focal-updates/main i386 Packages [434 kB]                                                                                                         
Get:45 http://au.archive.ubuntu.com/ubuntu focal-updates/main amd64 Packages [841 kB]                                                                                                        
Get:46 http://au.archive.ubuntu.com/ubuntu focal-updates/main DEP-11 64x64 Icons [87.9 kB]                                                                                                   
Get:47 http://au.archive.ubuntu.com/ubuntu focal-updates/main DEP-11 64x64@2 Icons [29 B]                                                                                                    
Get:48 http://au.archive.ubuntu.com/ubuntu focal-updates/main amd64 c-n-f Metadata [12.8 kB]                                                                                                 
Get:49 http://au.archive.ubuntu.com/ubuntu focal-updates/restricted amd64 Packages [155 kB]                                                                                                  
Get:50 http://au.archive.ubuntu.com/ubuntu focal-updates/restricted i386 Packages [16.2 kB]                                                                                                  
Get:51 http://au.archive.ubuntu.com/ubuntu focal-updates/restricted Translation-en [23.2 kB]                                                                                                 
Get:52 http://au.archive.ubuntu.com/ubuntu focal-updates/restricted amd64 c-n-f Metadata [436 B]                                                                                             
Get:53 http://au.archive.ubuntu.com/ubuntu focal-updates/universe amd64 Packages [746 kB]                                                                                                    
Get:54 http://au.archive.ubuntu.com/ubuntu focal-updates/universe i386 Packages [555 kB]                                                                                                     
Get:55 http://au.archive.ubuntu.com/ubuntu focal-updates/universe Translation-en [155 kB]                                                                                                    
Get:56 http://au.archive.ubuntu.com/ubuntu focal-updates/universe amd64 DEP-11 Metadata [302 kB]                                                                                             
Get:57 http://au.archive.ubuntu.com/ubuntu focal-updates/universe DEP-11 48x48 Icons [200 kB]                                                                                                
Get:58 http://au.archive.ubuntu.com/ubuntu focal-updates/universe DEP-11 64x64 Icons [349 kB]                                                                                                
Get:59 http://au.archive.ubuntu.com/ubuntu focal-updates/universe DEP-11 64x64@2 Icons [29 B]                                                                                                
Get:60 http://au.archive.ubuntu.com/ubuntu focal-updates/universe amd64 c-n-f Metadata [16.2 kB]                                                                                             
Get:61 http://au.archive.ubuntu.com/ubuntu focal-updates/multiverse amd64 Packages [21.6 kB]                                                                                                 
Get:62 http://au.archive.ubuntu.com/ubuntu focal-updates/multiverse i386 Packages [4,356 B]                                                                                                  
Get:63 http://au.archive.ubuntu.com/ubuntu focal-updates/multiverse Translation-en [5,508 B]                                                                                                 
Get:64 http://au.archive.ubuntu.com/ubuntu focal-updates/multiverse amd64 DEP-11 Metadata [2,468 B]                                                                                          
Get:65 http://au.archive.ubuntu.com/ubuntu focal-updates/multiverse DEP-11 48x48 Icons [29 B]                                                                                                
Get:66 http://au.archive.ubuntu.com/ubuntu focal-updates/multiverse DEP-11 64x64 Icons [2,638 B]                                                                                             
Get:67 http://au.archive.ubuntu.com/ubuntu focal-updates/multiverse DEP-11 64x64@2 Icons [29 B]                                                                                              
Get:68 http://au.archive.ubuntu.com/ubuntu focal-updates/multiverse amd64 c-n-f Metadata [596 B]                                                                                             
Get:69 http://au.archive.ubuntu.com/ubuntu focal-backports/universe i386 Packages [2,932 B]                                                                                                  
Get:70 http://au.archive.ubuntu.com/ubuntu focal-backports/universe amd64 Packages [4,032 B]                                                                                                 
Get:71 http://au.archive.ubuntu.com/ubuntu focal-backports/universe amd64 DEP-11 Metadata [1,768 B]                                                                                          
Get:72 http://au.archive.ubuntu.com/ubuntu focal-backports/universe DEP-11 48x48 Icons [2,809 B]                                                                                             
Get:73 http://au.archive.ubuntu.com/ubuntu focal-backports/universe DEP-11 64x64 Icons [3,944 B]                                                                                             
Get:74 http://au.archive.ubuntu.com/ubuntu focal-backports/universe DEP-11 64x64@2 Icons [29 B]                                                                                              
Get:75 http://au.archive.ubuntu.com/ubuntu focal-backports/universe amd64 c-n-f Metadata [224 B]                                                                                             
Fetched 18.4 MB in 44s (422 kB/s)                                                                                                                                                            
Reading package lists... Done
W: http://au.archive.ubuntu.com/ubuntu/dists/focal/universe/dep11/by-hash/SHA256/52805f5b7237153f9b4173b0bfe51917175eff5ca0f9feeb6d4dfcdd88918f70: Automatically disabled Acquire::http::Pipeline-Depth due to incorrect response from server/proxy. (man 5 apt.conf)
alex@ubuntu-20-LTS:~$ sudo apt-get update
Hit:1 http://au.archive.ubuntu.com/ubuntu focal InRelease
Hit:2 http://au.archive.ubuntu.com/ubuntu focal-updates InRelease
Hit:3 http://au.archive.ubuntu.com/ubuntu focal-backports InRelease
Hit:4 http://security.ubuntu.com/ubuntu focal-security InRelease
Hit:5 http://ppa.launchpad.net/yann1ck/onedrive/ubuntu focal InRelease
Reading package lists... Done
alex@ubuntu-20-LTS:~$ sudo apt install onedrive
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following additional packages will be installed:
  libphobos2-ldc-shared90
The following NEW packages will be installed:
  libphobos2-ldc-shared90 onedrive
0 to upgrade, 2 to newly install, 0 to remove and 245 not to upgrade.
Need to get 1,730 kB of archives.
After this operation, 8,019 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://au.archive.ubuntu.com/ubuntu focal/universe amd64 libphobos2-ldc-shared90 amd64 1:1.20.1-1 [1,215 kB]
Get:2 http://ppa.launchpad.net/yann1ck/onedrive/ubuntu focal/main amd64 onedrive amd64 2.4.10-0~202102221319~ubuntu20.04.1 [516 kB]
Fetched 1,730 kB in 5s (327 kB/s)  
Selecting previously unselected package libphobos2-ldc-shared90:amd64.
(Reading database ... 160861 files and directories currently installed.)
Preparing to unpack .../libphobos2-ldc-shared90_1%3a1.20.1-1_amd64.deb ...
Unpacking libphobos2-ldc-shared90:amd64 (1:1.20.1-1) ...
Selecting previously unselected package onedrive.
Preparing to unpack .../onedrive_2.4.10-0~202102221319~ubuntu20.04.1_amd64.deb ...
Unpacking onedrive (2.4.10-0~202102221319~ubuntu20.04.1) ...
Setting up libphobos2-ldc-shared90:amd64 (1:1.20.1-1) ...
Setting up onedrive (2.4.10-0~202102221319~ubuntu20.04.1) ...
Created symlink /etc/systemd/user/default.target.wants/onedrive.service → /usr/lib/systemd/user/onedrive.service.
Processing triggers for systemd (245.4-4ubuntu3.2) ...
Processing triggers for man-db (2.9.1-1) ...
Processing triggers for libc-bin (2.31-0ubuntu9.1) ...
alex@ubuntu-20-LTS:~$ onedrive --version
onedrive v2.4.10-0~202102221319~ubuntu20.04.1
alex@ubuntu-20-LTS:~$ 
github-actions[bot] commented 3 years ago

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.