# Sync error "Unexpected token d in JSON at position 4

**URL:** <https://discourse.joplinapp.org/t/sync-error-unexpected-token-d-in-json-at-position-4/37660>\
**Category:** Support\
**Created:** [16 April 2024 10:03 UTC](https://discourse.joplinapp.org/t/sync-error-unexpected-token-d-in-json-at-position-4/37660 "2024-04-16T10:03:10Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Liz](https://avatars.discourse-cdn.com/v4/letter/l/7ab992/32.png) [@Liz](https://discourse.joplinapp.org/u/Liz)\
**Post date:** [16 April 2024 10:03 UTC](https://discourse.joplinapp.org/t/sync-error-unexpected-token-d-in-json-at-position-4/37660/1 "2024-04-16T10:03:11Z")

</div>

### Operating system

Linux

### Joplin version

2.14.20

### Desktop version info

Desktop app version : 2.14.20  
Iphone app version : 12.14.6

### Sync target

Nextcloud

### Editor

Markdown Editor

### What issue do you have?

Hello,

I have a sync error on my desktop app and my iphone app:

- For desktop, the error is is "11:39:34: Synchronizer: SyntaxError: On file 1f078c603cae43d185d508c78042dd80.md: Unexpected non-whitespace character after JSON at position 4  
at JSON.parse ()"
- For iphone :  
Fetched item: 4/26.  
Completed 16/04/2024 11:50 (4s)  
Last error: Syntaxerror: On file 1f078c603cae43d185d508c78042dd80.md: JSON Parse error: Unexpected token: d

Previously:

- I had another missing error (based on missing type), and I corrected it by deleting EOL characters in end of note files (included the one 1f078c603cae43d185d508c78042dd80.md) in notes stored in Nextcloud
- Then I obtained the non-white character error in my Desktop app and token error in my iphone app
- I updated the version of Desktop Joplin with no resolution

Maybe a file corruption?  
Other ideas ?

Best regards,

### Screenshots

 ![iphone-joplin-error.png](https://canada1.discourse-cdn.com/flex028/uploads/cozic/original/3X/c/5/c5e3e5a209b2f8051c772f58c7e8bcecab05f0d0.png)

### Log file

[sync-error.txt](https://discourse.joplinapp.org/uploads/short-url/1PHiidLpqfKsmhGvnW2gxUuFWWQ.txt) (6.63 KB)

---

<div class="post-metadata">

**Author:** ![andbenn](https://yyz2.discourse-cdn.com/flex028/user_avatar/discourse.joplinapp.org/andbenn/32/21502_2.png) [@andbenn](https://discourse.joplinapp.org/u/andbenn)\
**Post date:** [17 April 2024 16:37 UTC](https://discourse.joplinapp.org/t/sync-error-unexpected-token-d-in-json-at-position-4/37660/2 "2024-04-17T16:37:06Z")

</div>

This is one of your notes. Something happened to it.

You could copy the 1f078..dd80.md file to a new name and open it in a text editor. Perhaps make a new note and copy from the text editor back into Joplin and then deleting the bad one from within Joplin.

Others may have better ideas.

---

<div class="post-metadata">

**Author:** ![Liz](https://avatars.discourse-cdn.com/v4/letter/l/7ab992/32.png) [@Liz](https://discourse.joplinapp.org/u/Liz)\
**Post date:** [18 April 2024 08:25 UTC](https://discourse.joplinapp.org/t/sync-error-unexpected-token-d-in-json-at-position-4/37660/3 "2024-04-18T08:25:12Z")

</div>

I deleted the bad one, and it correctly synchronize now. I hope it will continue to work.

---

<div class="post-metadata">

**Author:** ![laurent](https://avatars.discourse-cdn.com/v4/letter/l/ce7236/32.png) [@laurent](https://discourse.joplinapp.org/u/laurent)\
**Post date:** [18 April 2024 08:39 UTC](https://discourse.joplinapp.org/t/sync-error-unexpected-token-d-in-json-at-position-4/37660/4 "2024-04-18T08:39:09Z")

</div>

Make sure you don't open any of the Joplin files from Nextcloud as that would corrupt the file (even if you don't make any change), just in case that was the issue.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex028/uploads/cozic/original/3X/1/c/1c948e33314e232a0927789508474d8624f4270b.png) [@system](https://discourse.joplinapp.org/u/system)\
**Post date:** [18 May 2024 08:39 UTC](https://discourse.joplinapp.org/t/sync-error-unexpected-token-d-in-json-at-position-4/37660/5 "2024-05-18T08:39:23Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
