# Sync error: "Missing required property: type\_:"

**URL:** <https://discourse.joplinapp.org/t/sync-error-missing-required-property-type/9491>\
**Category:** Support\
**Created:** [19 June 2020 08:17 UTC](https://discourse.joplinapp.org/t/sync-error-missing-required-property-type/9491 "2020-06-19T08:17:38Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![wawrzek](https://yyz2.discourse-cdn.com/flex028/user_avatar/discourse.joplinapp.org/wawrzek/32/4247_2.png) [@wawrzek](https://discourse.joplinapp.org/u/wawrzek)\
**Post date:** [19 June 2020 08:17 UTC](https://discourse.joplinapp.org/t/sync-error-missing-required-property-type/9491/1 "2020-06-19T08:17:38Z")

</div>

Hi,

I use Dropbox to synchronize files between a few clients (e.g. Mac, Linux and Android). That worked fine, until on a Mac client I edited a file in the Joplin Dropbox directory. In the file I edited only the content, not metadata on the end of the file.

Since then, I see following error message in Mac clients:

```auto
Completed: 18/06/2020 22:59
Last error: Error: Missing required property: type_:

```

and in Linux one:

```auto
Fetched items: 5/9.
Completed: 19/06/2020 09:06
Last error: Error: On file 27805ddb4e5a4fde890cba9a3912d19b.md: Missing required property: type_:

```

The actual note file which content matches the content 27805ddb4e5a4fde890cba9a3912d19b.md cannot be synced. Actually, looks like nothing is synced after the break.

What should I do?

**Version on Mac:**  
Copyright © 2016-2020 Laurent Cozic  
Joplin 1.0.218 (prod, darwin)

Client ID: 353f5d2f6c1b4a6ca9ee73d4e2d8157c  
Sync Version: 1  
Profile Version: 30  
Keychain Supported: Yes

Revision: 5be8c2c (master)

**Version on Linux:**  
"Joplin 1.0.201 (prod, linux)

Client ID: b59333338c814e368d5c71c2fefe5320  
Sync Version: 1  
Profile Version: 28

Revision: e65af8c (master)"

---

<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:** [19 June 2020 08:24 UTC](https://discourse.joplinapp.org/t/sync-error-missing-required-property-type/9491/2 "2020-06-19T08:24:30Z")

</div>

There’s a plan to rename the .md files on the sync target to .bin, to show they shouldn’t be edited. In the meantime you can try to remove the last newline characters from your file.

---

<div class="post-metadata">

**Author:** ![wawrzek](https://yyz2.discourse-cdn.com/flex028/user_avatar/discourse.joplinapp.org/wawrzek/32/4247_2.png) [@wawrzek](https://discourse.joplinapp.org/u/wawrzek)\
**Post date:** [19 June 2020 08:51 UTC](https://discourse.joplinapp.org/t/sync-error-missing-required-property-type/9491/3 "2020-06-19T08:51:11Z")

</div>

Thanks for very prompt response. It helped!

Interesting, I didn’t see extra line in Vim, even if I looked for both CR and LF.

---

<div class="post-metadata">

**Author:** ![sciurius](https://yyz2.discourse-cdn.com/flex028/user_avatar/discourse.joplinapp.org/sciurius/32/132_2.png) [@sciurius](https://discourse.joplinapp.org/u/sciurius)\
**Post date:** [19 June 2020 19:20 UTC](https://discourse.joplinapp.org/t/sync-error-missing-required-property-type/9491/4 "2020-06-19T19:20:02Z")

</div>

It is not an _extra_ line, the last line may **not** be followed by a newline for reasons only the Joplin gods know.

When the file is edited with vi it should display “[noeol]”, e.g.

```auto
"127108ae05174b29a623f0226c689e76.md" [noeol] 13L, 431C

```

---

<div class="post-metadata">

**Author:** ![gamejunkie](https://yyz2.discourse-cdn.com/flex028/user_avatar/discourse.joplinapp.org/gamejunkie/32/4353_2.png) [@gamejunkie](https://discourse.joplinapp.org/u/gamejunkie)\
**Post date:** [24 June 2020 21:26 UTC](https://discourse.joplinapp.org/t/sync-error-missing-required-property-type/9491/5 "2020-06-24T21:26:26Z")

</div>

Apologies for dual-posting this with Github, but I am not sure which is the correct issue forum to use.

=============  
Hello! I am seeing this issue as well now, and it appears to be an issue with every file that I attempt to edit. I checked the .md file on NextCloud and all appeared to be in order. What I am noticing is adding new files works fine, but any subsequent edits generates a sync error. I have not attempted to edit anything outside of the UI.

Sync Log Error:

Error: On file e62af337869a4bcdade7cd58025368c3.md: Missing required property: type\_: test

test

tttttt

id: e62af337869a4bcdade7cd58025368c3  
parent\_id: e231a3b071e1419abce813b44fb82715  
created\_time: 2020-06-24T20:56:20.508Z  
updated\_time: 2020-06-24T20:56:52.029Z  
is\_conflict: 0  
latitude: 0.00000000  
longitude: 0.00000000  
altitude: 0.0000  
author:  
source\_url:  
is\_todo: 0  
todo\_due: 0  
todo\_completed: 0  
source: joplin-desktop  
source\_application: net.cozic.joplin-desktop  
application\_data:  
order: 1593032180508  
user\_created\_time: 2020-06-24T20:56:20.508Z  
user\_updated\_time: 2020-06-24T20:56:52.029Z  
encryption\_cipher\_text:  
encryption\_applied: 0  
markup\_language: 1  
is\_shared: 0

Here is the metadata block from that test note.

id: e62af337869a4bcdade7cd58025368c3 parent\_id: e231a3b071e1419abce813b44fb82715 created\_time: 2020-06-24T20:56:20.508Z updated\_time: 2020-06-24T20:56:52.029Z is\_conflict: 0 latitude: 0.00000000 longitude: 0.00000000 altitude: 0.0000 author: source\_url: is\_todo: 0 todo\_due: 0 todo\_completed: 0 source: joplin-desktop source\_application: net.cozic.joplin-desktop application\_data: order: 1593032180508 user\_created\_time: 2020-06-24T20:56:20.508Z user\_updated\_time: 2020-06-24T20:56:52.029Z encryption\_cipher\_text: encryption\_applied: 0 markup\_language: 1 is\_shared: 0 type\_: 1

Based on the error message above, it is almost like it is failing to load the type\_ value from the metadata block.

One other note: I did just recently move to my own NextCloud instance hosted on a DigitalOcean Droplet, but never attempted to edit files via that mechsnism.

---

<div class="post-metadata">

**Author:** ![tessus](https://yyz2.discourse-cdn.com/flex028/user_avatar/discourse.joplinapp.org/tessus/32/13_2.png) [@tessus](https://discourse.joplinapp.org/u/tessus)\
**Post date:** [24 June 2020 22:04 UTC](https://discourse.joplinapp.org/t/sync-error-missing-required-property-type/9491/6 "2020-06-24T22:04:00Z")

</div>

You are not supposed to edit the file on the sync target. (I’m not sure why people insist on screwing around with data on the sync target.) Laurent should change the format to binary. Are you going to hexedit then?

Also, did you miss the part where there MUST NOT BE an EOL (end of line = return / line feed) at EOF (end of file). e.g. When you do a `cat file`, the prompt will not be in the next line, but in the same as the last line of text. Or vi will tell you `[noeol]` as scurius has already mentioned.

---

<div class="post-metadata">

**Author:** ![gamejunkie](https://yyz2.discourse-cdn.com/flex028/user_avatar/discourse.joplinapp.org/gamejunkie/32/4353_2.png) [@gamejunkie](https://discourse.joplinapp.org/u/gamejunkie)\
**Post date:** [24 June 2020 22:05 UTC](https://discourse.joplinapp.org/t/sync-error-missing-required-property-type/9491/7 "2020-06-24T22:05:16Z")

</div>

I never edited any files. That is what I said in my last paragraph.

---

<div class="post-metadata">

**Author:** ![tessus](https://yyz2.discourse-cdn.com/flex028/user_avatar/discourse.joplinapp.org/tessus/32/13_2.png) [@tessus](https://discourse.joplinapp.org/u/tessus)\
**Post date:** [24 June 2020 22:11 UTC](https://discourse.joplinapp.org/t/sync-error-missing-required-property-type/9491/8 "2020-06-24T22:11:26Z")

</div>

Apologies, I missed that part.

However, I bet if I checked one file on your sync target, it would have an EOL at EOF.

Maybe some other issue with your sync software. e.g. you nextcloud sync client. Did you by any chance sync that directory also to your local disk? Theoretically the SW should not touch the files… But you won’t believe what I’ve seen… Maybe a process changed the files and synced them back.  
Some people had similar issues when using Syncthing on Android 10.

---

<div class="post-metadata">

**Author:** ![tessus](https://yyz2.discourse-cdn.com/flex028/user_avatar/discourse.joplinapp.org/tessus/32/13_2.png) [@tessus](https://discourse.joplinapp.org/u/tessus)\
**Post date:** [24 June 2020 22:18 UTC](https://discourse.joplinapp.org/t/sync-error-missing-required-property-type/9491/9 "2020-06-24T22:18:21Z")

</div>

I have to buy groceries, but will be back in about 1h. Until then, you could try the following on one .md file that doesn’t sync (on the sync target):

```auto
truncate -s -1 filename.md

```

If it syncs, your files on the sync target have a problem. For what reason ever and we have to figure out why that is.

---

<div class="post-metadata">

**Author:** ![gamejunkie](https://yyz2.discourse-cdn.com/flex028/user_avatar/discourse.joplinapp.org/gamejunkie/32/4353_2.png) [@gamejunkie](https://discourse.joplinapp.org/u/gamejunkie)\
**Post date:** [24 June 2020 22:18 UTC](https://discourse.joplinapp.org/t/sync-error-missing-required-property-type/9491/10 "2020-06-24T22:18:41Z")

</div>

No worries! Thanks for the help. I did not even install the NextCloud sync on my windows machine because that NextCloud instance is solely for Joplin. What did happen is I was forced to move away from ServiceMetric as a NextCloud provider. I guess the $5/year was too good to be true and they shut down. This forced me to set up a small Ubuntu 20.04 droplet on Digital Ocean. I installed Snap version of NextCloud, configured it, and installed the Jopin Web App on it to support sync.

I then went to my Windows machine and did the following:

1.) Made a JEX backup  
2.) Deleted everything in Joplin. **NOTE:** I did not delete my JoplinProfile folder, which I probably should have.  
3.) Changed the Sync endpoint.  
4.) Did a restore of the JEX file.  
5.) Synchronized all files to NextCloud.  
6.) On my phone, I deleted everything, udpated the endpoint, and resynced.

Everything seemed to work great. All content was pushed up to the server and came back down to the phone. No problem. That was Sunday.

What I noticed today was that any edits all stopped syncing with the errors I posted. New file creations sync fine. Any subsequent edits break. ALso, any attempt to edit an existing note also renders it broken.

---

<div class="post-metadata">

**Author:** ![gamejunkie](https://yyz2.discourse-cdn.com/flex028/user_avatar/discourse.joplinapp.org/gamejunkie/32/4353_2.png) [@gamejunkie](https://discourse.joplinapp.org/u/gamejunkie)\
**Post date:** [24 June 2020 22:35 UTC](https://discourse.joplinapp.org/t/sync-error-missing-required-property-type/9491/11 "2020-06-24T22:35:13Z")

</div>

I tried your suggesting of truncating one character from my test .md file. After examining it in vi, but not saving, the last character was a 1. type-:1

After truncating, the one was gone. I then attempted my local sync and I get the same error, but now the log no longer shows the 1. Seems like the EOL may not be the issue…

I also tried restoring the Joplin version from 1.0.220 as 1.0.224 dropped today. That displayed the same issue.

What I am going to do now is start from scratch.

1.) Delete my Joplin Profile  
2.) Delete everything in NextCloud  
3.) Restore my JEX backup on Windows  
4.) Sync to NextCloud

Hope for the best!

---

<div class="post-metadata">

**Author:** ![tessus](https://yyz2.discourse-cdn.com/flex028/user_avatar/discourse.joplinapp.org/tessus/32/13_2.png) [@tessus](https://discourse.joplinapp.org/u/tessus)\
**Post date:** [25 June 2020 00:01 UTC](https://discourse.joplinapp.org/t/sync-error-missing-required-property-type/9491/12 "2020-06-25T00:01:28Z")

</div>

This is really odd. Your steps to move the notes are fine and valid.

Since my truncate command removed the 1 your file had no EOL at EOF, so your test file should have synced normally.

---

<div class="post-metadata">

**Author:** ![gamejunkie](https://yyz2.discourse-cdn.com/flex028/user_avatar/discourse.joplinapp.org/gamejunkie/32/4353_2.png) [@gamejunkie](https://discourse.joplinapp.org/u/gamejunkie)\
**Post date:** [25 June 2020 00:42 UTC](https://discourse.joplinapp.org/t/sync-error-missing-required-property-type/9491/13 "2020-06-25T00:42:48Z")

</div>

Same exact problem. Here is the sequence that led to the error.

1.) Fresh import from JEX after deleting Joplin Profile and everything on the NextCloud server.  
2.) Sync with NextCloud. All seemed to work normally.  
3.) Edit a single note via the Windows Joplin UI (1.0.224)  
4.) Sync to the server (appeared successful).  
5.) Hit synchronize again and receive same type\_: missing error.

Ugh. Not sure what my next steps should be. The only thing materially different from the past two years is I am hosting my own instance of NextCloud.

---

<div class="post-metadata">

**Author:** ![gamejunkie](https://yyz2.discourse-cdn.com/flex028/user_avatar/discourse.joplinapp.org/gamejunkie/32/4353_2.png) [@gamejunkie](https://discourse.joplinapp.org/u/gamejunkie)\
**Post date:** [25 June 2020 00:56 UTC](https://discourse.joplinapp.org/t/sync-error-missing-required-property-type/9491/14 "2020-06-25T00:56:00Z")

</div>

A few more bits of detail after some testing.

The following steps seem to lead up to the corruption:

1.) Take an existing note that has not been edited since I noticed this behavior.  
2.) Edit it. This seems to sync with the server normally and I get a log message indicating one file synced.  
3.) Attempt to Edit again. Synchronization produces the type missing error.

The other thing I noted is that I can take a corrupt file and delete. This seems to be synced to the server properly and i do not receive any more failures until I attempt to edit using the steps I mentioned above.

---

<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:** [25 June 2020 17:45 UTC](https://discourse.joplinapp.org/t/sync-error-missing-required-property-type/9491/15 "2020-06-25T17:45:39Z")

</div>

[gamejunkie](https://discourse.joplinapp.org/u/gamejunkie), at this step:

> 2.) Edit it. This seems to sync with the server normally and I get a log message indicating one file synced.

Could you get the file on the sync target and see if it is valid or not (you can upload it somewhere and we can check too).

That will help determine if the file is corrupted when it's uploaded or later, when it's downloaded.

---

<div class="post-metadata">

**Author:** ![gamejunkie](https://yyz2.discourse-cdn.com/flex028/user_avatar/discourse.joplinapp.org/gamejunkie/32/4353_2.png) [@gamejunkie](https://discourse.joplinapp.org/u/gamejunkie)\
**Post date:** [25 June 2020 17:47 UTC](https://discourse.joplinapp.org/t/sync-error-missing-required-property-type/9491/16 "2020-06-25T17:47:36Z")

</div>

Hi Laurent - I definitely looked at it and it seemed correct. There was a type\_id there and it was of type “1”. @tessus asked that I run a truncate of one char on it from the command line, which I did, and what remained was type\_: , which indicates the “1” was the last char and there was no extraneous EOL.

---

<div class="post-metadata">

**Author:** ![gamejunkie](https://yyz2.discourse-cdn.com/flex028/user_avatar/discourse.joplinapp.org/gamejunkie/32/4353_2.png) [@gamejunkie](https://discourse.joplinapp.org/u/gamejunkie)\
**Post date:** [25 June 2020 17:57 UTC](https://discourse.joplinapp.org/t/sync-error-missing-required-property-type/9491/17 "2020-06-25T17:57:12Z")

</div>

Here is some more info. I checked my test file on the server and here is what I could see in VI.

 ![image](https://canada1.discourse-cdn.com/flex028/uploads/cozic/original/2X/e/e88733ecfb2b18823091c3fa63a2bd394f46c84c.png)

I then did a RAW EXPORT from my windows client and checked the same .md file. Here is what appears locally.

 ![image](https://canada1.discourse-cdn.com/flex028/uploads/cozic/original/2X/d/d878e7722a21070aedec819c899e411705046f0c.png)

---

<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:** [25 June 2020 18:00 UTC](https://discourse.joplinapp.org/t/sync-error-missing-required-property-type/9491/18 "2020-06-25T18:00:06Z")

</div>

Thanks for checking. So it seems the file is indeed correct on server, but then it’s on download that it somehow gets truncated? That’s very strange. Could you post the log before and after this bug happens? [https://joplinapp.org/debugging](https://joplinapp.org/debugging)

---

<div class="post-metadata">

**Author:** ![gamejunkie](https://yyz2.discourse-cdn.com/flex028/user_avatar/discourse.joplinapp.org/gamejunkie/32/4353_2.png) [@gamejunkie](https://discourse.joplinapp.org/u/gamejunkie)\
**Post date:** [25 June 2020 18:01 UTC](https://discourse.joplinapp.org/t/sync-error-missing-required-property-type/9491/19 "2020-06-25T18:01:05Z")

</div>

Finally, here is what appears in the logs.

 ![image](https://canada1.discourse-cdn.com/flex028/uploads/cozic/original/2X/b/b15cd406b13c41d350bc072f44e011a15b806fbb.png)

---

<div class="post-metadata">

**Author:** ![gamejunkie](https://yyz2.discourse-cdn.com/flex028/user_avatar/discourse.joplinapp.org/gamejunkie/32/4353_2.png) [@gamejunkie](https://discourse.joplinapp.org/u/gamejunkie)\
**Post date:** [25 June 2020 18:12 UTC](https://discourse.joplinapp.org/t/sync-error-missing-required-property-type/9491/20 "2020-06-25T18:12:50Z")

</div>

Here is a sanitized version of the log. I removed the actual note text and left the log messages.

[log\_error\_example.txt](https://discourse.joplinapp.org/uploads/short-url/xzNc1Lk86F10RjApXfZVmGLcZqg.txt) (2.5 KB)

[Next page](https://discourse.joplinapp.org/t/sync-error-missing-required-property-type/9491.md?page=2)
