pydio / pydio-sync

Python version of the Pydio synchronization client
https://pydio.com
GNU General Public License v3.0
82 stars 32 forks source link

No JSON object could be decoded #162

Open mcr-ksh opened 6 years ago

mcr-ksh commented 6 years ago

I found that the client sync will stall with a JSON error. The real error why the entire sync is halted is not visible to the enduser. The file should be ignored and the rest should be sync.

2017-10-27 12:57:19 INFO 123145374449664 Thread-1 logging : 1627 | info | Scanning for changes since last application launch 2017-10-27 12:57:19 INFO 123145378656256 Thread-2 logging : 1627 | info | Starting permanent monitor 2017-10-27 12:57:19 INFO 123145374449664 Thread-1 logging : 1627 | info | Loading remote changes with sequence 367 for job id filesync.ironsoftware.de-my-files 2017-10-27 12:57:21 INFO 123145374449664 Thread-1 logging : 1627 | info | Loading local changes with sequence 739 for job id filesync.ironsoftware.de-my-files 2017-10-27 12:57:21 INFO 123145374449664 Thread-1 logging : 1627 | info | Reducing changes for filesync.ironsoftware.de-my-files 2017-10-27 12:57:22 INFO 123145374449664 Thread-1 logging : 1627 | info | resp.content: <?xml version="1.0" encoding="UTF-8"?><tree ><message type="ERROR">/Folder/FW_Filename?.eml contains forbbiden characters</message></tree> 2017-10-27 12:57:22 ERROR 123145374449664 Thread-1 logging : 1601 | error | Unexpected Error: No JSON object could be decoded Traceback (most recent call last): File "/Users/charles/Desktop/TeamCity/buildAgent/work/e8d36552535a0061/build/pydio-agent/out01-PYZ.pyz/pydio.job.continous_merger", line 555, in run File "/Users/charles/Desktop/TeamCity/buildAgent/work/e8d36552535a0061/build/pydio-agent/out01-PYZ.pyz/pydio.job.change_stores", line 444, in detect_unnecessary_changes File "/Users/charles/Desktop/TeamCity/buildAgent/work/e8d36552535a0061/build/pydio-agent/out01-PYZ.pyz/pydio.job.change_stores", line 472, in filter_w_stat File "/Users/charles/Desktop/TeamCity/buildAgent/work/e8d36552535a0061/build/pydio-agent/out01-PYZ.pyz/pydio.sdkremote.remote", line 548, in bulk_stat File "/Users/charles/Desktop/TeamCity/buildAgent/work/e8d36552535a0061/build/pydio-agent/out01-PYZ.pyz/json", line 338, in loads File "/Users/charles/Desktop/TeamCity/buildAgent/work/e8d36552535a0061/build/pydio-agent/out01-PYZ.pyz/json.decoder", line 366, in decode File "/Users/charles/Desktop/TeamCity/buildAgent/work/e8d36552535a0061/build/pydio-agent/out01-PYZ.pyz/json.decoder", line 384, in raw_decode ValueError: No JSON object could be decoded

fotis400 commented 6 years ago

I do face the same issue.

One of my syncs is not working due to this.

jkirk commented 6 years ago

I just stumbled over this error again:

2018-04-03 00:54:27 INFO    140358323271424 Thread-3 logging : 1627 | info | Loading local changes with sequence 2224 for job id archiv.loesungsweg.com-lw
2018-04-03 00:54:27 INFO    140358323271424 Thread-3 logging : 1627 | info | Reducing changes for archiv.loesungsweg.com-lw
2018-04-03 00:54:28 ERROR   140358323271424 Thread-3 logging : 1601 | error | Unexpected Error: No JSON object could be decoded
Traceback (most recent call last):
  File "/home/pydio/tcAgent/work/a00136d723583ad3/build/pydio-agent/out01-PYZ.pyz/pydio.job.continous_merger", line 546, in run
  File "/home/pydio/tcAgent/work/a00136d723583ad3/build/pydio-agent/out01-PYZ.pyz/pydio.job.change_stores", line 457, in detect_unnecessary_changes
  File "/home/pydio/tcAgent/work/a00136d723583ad3/build/pydio-agent/out01-PYZ.pyz/pydio.job.change_stores", line 485, in filter_w_stat
  File "/home/pydio/tcAgent/work/a00136d723583ad3/build/pydio-agent/out01-PYZ.pyz/pydio.sdkremote.remote", line 528, in bulk_stat
  File "/home/pydio/tcAgent/work/a00136d723583ad3/build/pydio-agent/out01-PYZ.pyz/json", line 338, in loads
  File "/home/pydio/tcAgent/work/a00136d723583ad3/build/pydio-agent/out01-PYZ.pyz/json.decoder", line 366, in decode
  File "/home/pydio/tcAgent/work/a00136d723583ad3/build/pydio-agent/out01-PYZ.pyz/json.decoder", line 384, in raw_decode
ValueError: No JSON object could be decoded

This happenend after trying to add a file like this Link to Konflikte gewaltfrei lösen, 12.4. | 7 Tage Ö1.desktop (which was created by dragging the Link from Firefox to the Pydio-Folder). After removing the file from Pydio-Folder, PydioSync started working again. Re-adding the file as Link to Konflikte gewaltfrei lösen, 12.4. - 7 Tage Ö1.desktop (replacing | with -) did not cause the error.

Please support the | character in filenames.

jabarkarim commented 6 years ago

Hi there,

For Windows and OSX users only here is where you can get the Pydio Sync client bug fixes and latest improvements: https://download.pydio.com/pub/pydio-sync/develop/packages/

Please try it and let us know if it helps.

Regards

serverbroad commented 5 years ago

Hi JabarKarim, The file via links is not working see attache of screenshot kindly fix and revet

Thanks

Best Regards

image

jkirk commented 4 years ago

Nearly two years later, I stumbled over this problem and error again. (And there was no file with a | character in its filename.)

The machine in subject is running:

I debugged this problem a bit further:

% sqlite3 changes.sqlite # in `~/.local/share/Pydio/example.com-my-workspace`
sqlite> select target from ajxp_changes;
/folder_b/filename2.ods
/folder/sA 2016/"Folder"
/folder/sA 2016/"Folder"/filename.xyz

(The output is modified.)

So, yes, a folder was named "Folder" (with(!) quotation marks as part of the folder name). I am not sure who to blame, but it seems that "quotation marks" are a valid character in Linux (see: https://stackoverflow.com/a/31976060/2142030), so I think Pydio (and the JSON-Parser) should handle them as well.

What I did to fix that problem:

Files were synced fine and the problem went away.

Not sure of any of this things were needed. The next time I will just check the files which are going to be changed and rename them (note for myself):