abraunegg / onedrive

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

response is not a valid JSON object #1530

Closed VincentFrangi closed 3 years ago

VincentFrangi commented 3 years ago

Bug Report Details

For no reason, after checking log of daemon, got an error now:

ERROR: An error was returned from OneDrive and the resulting response is not a valid JSON object

Application and Operating System Details:

curl 7.77.0 (x86_64-pc-linux-gnu) libcurl/7.77.0 OpenSSL/1.1.1k zlib/1.2.11 zstd/1.5.0 libidn2/2.3.1 libpsl/0.21.1 (+libidn2/2.3.0) libssh2/1.9.0 nghttp2/1.43.0
Release-Date: 2021-05-26
Protocols: dict file ftp ftps gopher gophers http https imap imaps mqtt pop3 pop3s rtsp scp sftp smb smbs smtp smtps telnet tftp
Features: alt-svc AsynchDNS GSS-API HSTS HTTP2 HTTPS-proxy IDN IPv6 Kerberos Largefile libz NTLM NTLM_WB PSL SPNEGO SSL TLS-SRP UnixSockets zstd
NAME        FSTYPE FSVER LABEL UUID                                 FSAVAIL FSUSE% MOUNTPOINTS
nvme0n1
├─nvme0n1p1 vfat   FAT32       3398-C936                             510.7M     0% /boot/efi
└─nvme0n1p2 ext4   1.0         75f0ca82-361a-4135-ad6b-30a8d477a9e2  390.7G    11% /

Error occurered trying to do :

onedrive --synchronize --verbose

debug_output.log

Log:

[.......]
Processing Projects/duckHouse2/parts
The directory has not changed
Processing Projects/duckHouse2/parts/Profil de palplanches pour façade Scie à mélèze sib. brute 26x144x5100 mm.pdf
The file has not changed
Processing Projects/duckHouse2/parts/README.md
The file has not changed
Processing Projects/duckHouse2/parts/support_charniere.stl
The file has not changed
Processing Projects/duckHouse2/Cabane.FCStd2
The file has not changed
Processing Projects/duckHouse2/Cabane.FCStd1
The file has not changed
Processing Projects/duckHouse2/Cabane.FCStd
The file has not changed
Processing Projects/duckHouse2/build
The directory has not changed
Processing Projects/duckHouse2/build/floor.FCStd2
The file has not changed
Processing Projects/duckHouse2/build/floor.FCStd1
The file has not changed
Processing Projects/duckHouse2/build/floor.FCStd
The file has not changed
Processing Projects/duckHouse2/build/DuckHouse.FCStd2
The file has not changed
Processing Projects/duckHouse2/build/DuckHouse.FCStd1
The file has not changed
Processing Projects/duckHouse2/build/DuckHouse.FCStd
The file has not changed
Processing Projects/CNC
The directory has not changed
Processing Projects/CNC/README.md
The file has not changed
Uploading new items of ~/OneDrive
ERROR: An error was returned from OneDrive and the resulting response is not a valid JSON object
ERROR: Increase logging verbosity to assist determining why.
ERROR: An error was returned from OneDrive and the resulting response is not a valid JSON object
ERROR: Increase logging verbosity to assist determining why.
Skipping item - excluded by skip_file config: ./Vincent_Gestion/Gestion/Biens_vendu/2552_Orpond_Hauptstr214_214A/Formulaires/.~lock.ConventionAchatOrpond.odt#
Skipping item - excluded by skip_dir config: ./Vincent_Gestion/Gestion/Biens/2000_Neuchatel/Bourgogne_48_50/Bourgogne48/Appartements/2eme_Millieu/Archives
Skipping item - excluded by skip_dir config: ./Vincent_Gestion/Gestion/Biens/2000_Neuchatel/Bourgogne_48_50/Bourgogne48/Appartements/1er_Millieu/Archives
Skipping item - excluded by skip_dir config: ./Vincent_Gestion/Gestion/Biens/2000_Neuchatel/Bourgogne_48_50/Technique/Stores/Archives
Skipping item - excluded by skip_dir config: ./Vincent_Gestion/Gestion/Biens/2610_StImier/Passage_Reine-Berthe_1/Apparements/1er_Ouest/Archives
Skipping item - excluded by skip_dir config: ./Vincent_Gestion/Gestion/Biens/2610_StImier/Passage_Reine-Berthe_1/Apparements/2eme_Est/Archives
Applying changes of Path ID: 41A28A518B2AB52B!109
Updated Remaining Free Space: 85803308075

Bug Report Checklist

Thank you

abraunegg commented 3 years ago

@VincentFrangi

ERROR: An error was returned from OneDrive and the resulting response is not a valid JSON object
ERROR: Increase logging verbosity to assist determining why.

Please can you perform the verbose debug logging like the application is asking you.

Yes, the application is generating an error, but you need to increase the output verbosity to work out why.

At a minimum, you need to run with:

--verbose --verbose

to capture what is failing and why.

Please perform this action like the application is asking you.

VincentFrangi commented 3 years ago

@VincentFrangi

ERROR: An error was returned from OneDrive and the resulting response is not a valid JSON object
ERROR: Increase logging verbosity to assist determining why.

Please can you perform the verbose debug logging like the application is asking you.

Yes, the application is generating an error, but you need to increase the output verbosity to work out why.

At a minimum, you need to run with:

--verbose --verbose

to capture what is failing and why.

Please perform this action like the application is asking you.

I did it in the debug_output.log file

abraunegg commented 3 years ago

@VincentFrangi My apologies - I missed seeing this when reviewing your initial submission.

OK - based on the sequencing, a call is being made to query OneDrive for this file. It is this query that is failing, however it appears to be failing with an error code that is currently not being handled and has not been seen before. The code currently handles:

So the error being received is something else.

Because it is something else, the value that should contain the file details from OneDrive is not a valid JSON response, hence the error message you are seeing.

Can you re-perform your testing, this time use:

--verbose --verbose --debug-https

This will clearly articulate what the error response is that is being generated by OneDrive. Refer to https://github.com/abraunegg/onedrive/wiki/Generate-https-debug-log-for-support for more details.

Once this HTTPS debug has been done, please strip your auth code from the log file, archive the file and send via email to the support email address.

VincentFrangi commented 3 years ago

Here you have the output of:

onedrive --synchronize --verbose --verbose --debug-https > debug_output.log 2>&1

debug_output.log

abraunegg commented 3 years ago

@VincentFrangi Please can you test the following PR to see if this resolves this issue:

git clone https://github.com/abraunegg/onedrive.git
cd onedrive
git fetch origin pull/1535/head:pr1535
git checkout pr1535
./configure; make clean; make;

To run the PR, you need to run the client from the PR build directory:

./onedrive <any options needed>

When running the PR, your version should be: onedrive v2.4.12-12-ga6b9733 or greater

VincentFrangi commented 3 years ago

pr1535 seem to handle the exception nicely Thank you

Processing Projects/CNC
The directory has not changed
Processing Projects/CNC/README.md
The file has not changed
Uploading new items of ~/OneDrive
Skipping uploading this new file: /home/vincent/OneDrive/Documents/Officiel/Impots/2014/tat Microsoft Money.pdf
Skipping item - OneDrive returned a 'HTTP 400 - Bad Request' when attempting to query if file exists
ERROR: To resolve, rename this local file: /home/vincent/OneDrive/Documents/Officiel/Impots/2014/tat Microsoft Money.pdf
Skipping uploading this new file: /home/vincent/OneDrive/Documents/Officiel/Impots/2017/tat Microsoft Money.pdf
Skipping item - OneDrive returned a 'HTTP 400 - Bad Request' when attempting to query if file exists
ERROR: To resolve, rename this local file: /home/vincent/OneDrive/Documents/Officiel/Impots/2017/tat Microsoft Money.pdf
Skipping item - excluded by skip_file config: ./Vincent_Gestion/Gestion/Biens_vendu/2552_Orpond_Hauptstr214_214A/Formulaires/.~lock.ConventionAchatOrpond.odt#
Skipping item - excluded by skip_dir config: ./Vincent_Gestion/Gestion/Biens/2000_Neuchatel/Bourgogne_48_50/Bourgogne48/Appartements/2eme_Millieu/Archives
Skipping item - excluded by skip_dir config: ./Vincent_Gestion/Gestion/Biens/2000_Neuchatel/Bourgogne_48_50/Bourgogne48/Appartements/1er_Millieu/Archives
Skipping item - excluded by skip_dir config: ./Vincent_Gestion/Gestion/Biens/2000_Neuchatel/Bourgogne_48_50/Technique/Stores/Archives
Skipping item - excluded by skip_dir config: ./Vincent_Gestion/Gestion/Biens/2610_StImier/Passage_Reine-Berthe_1/Apparements/1er_Ouest/Archives
Skipping item - excluded by skip_dir config: ./Vincent_Gestion/Gestion/Biens/2610_StImier/Passage_Reine-Berthe_1/Apparements/2eme_Est/Archives
Applying changes of Path ID: 41A28A518B2AB52B!109
Updated Remaining Free Space: 85803291440
abraunegg commented 3 years ago

@VincentFrangi Thanks for the feedback.

Essentially 'something' in the file name is what is causing this issue for you - it is unclear as to what this is, potentially some sort of weird non-printable character somewhere.

Will mark this as resolved and merge into 'master'

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.