Sync error: "Missing required property: type_:"

Hmm, ok that’s quite incredible it seems one byte is missing from the file then. Are you able to inspect the requests being made with Wireshark or similar?

If you go to Nextcloud and download the file there directly, is the file complete?

Actually, just after you get this corrupted file in Joplin, if you check again on Nextcloud is the final byte missing there too?

I am not able to reproduce the error following these steps.

Perhaps it’s something wrong with the server. @gamejunkie, would you be able to provide test credentials so that I can give it a try?

First - my replies are being severely throttled by Discourse because it views me as a noob!

I was able to grab a Wireshark capture, but then realized that all interactions with NetCloud are via TLS, which seems to make a capture less than useful.

What is interesting is upon inspection of the file in both places (NextCloud and the local RAW JEX backup), there does not appear to be any corruption. The type field is there in both locations. It is almost as if there is a potential off-by-one error when processing/diffing the file post-edit.

One other thing I did in order to reduce the overall complexity is to remove the beta version of the Joplin Web App for NextCloud.

Finally, per your last comment, let me set up a NextCloud user for you so you can create a folder and set up sync. Maybe it is something with the NextCloud instance I installed. Is there a way I can privately get you the credentials?

Yes if you could send me a PM that would work (just click on my name)

I also downloaded the file directly from the NextCloud web UI and it appears to be complete (no missing type).

Interesting, the problematic file looked fine in Vi for me. I accidentally open in another editor and notice an extra line.
Have you tried to expose both Carriage Return (CR) and Line Feed (LF) and https://stackoverflow.com/questions/3860519/see-line-breaks-and-carriage-returns-in-editor

So I did some more testing on this and finally have a fairly simple set of repro steps:

1.) Completely remove everything on NextCloud and delete JoplinProfile on desktop.
2.) Create a test notebook and a simple test note and sync.
3.) I am not able to reproduce the issue at all. Works perfectly.
4.) Delete JoplinProfile on my laptop and sync.
5.) Edit note on laptop, sync, and test again on desktop. Everything works perfectly.
6.) Sync to my iPhone.
7.) Everything syncs down correctly.
8.) Edit test note on my iPhone and sync.
9.) Everything seems to work, but if I edit again I start getting the type_ missing error.
10.) Sync on desktop also starts exhibiting the type_ error.

So, from what I can ascertain, there appears to be a regression with the iOS build. @laurent this shoud be pretty easy to replicate using the NextCloud account I set up for you. My test file was dead simple and just contained a little bit of text.

For now, I will stop using Joplin on my iPhone. Let me know if there is anything else I can do to help work through this issue. I use Joplin daily and am willing to help out wherever possible.

1 Like

@gamejunkie, I’ve tested with the account you’ve provided but unfortunately couldn’t replicate. I’ve tried with and without encryption, modifying notes on desktop or iOS, and followed the steps above, but it’s always working for me.

Could it be some problem specific to your network?

What version of iPhone is it by the way?

Hi @laurent - I am at a loss. My iPhone is an 11 Pro Max running 13.5.1. The Joplin iOS app is the latest from the App Store. Everything has been working perfectly as long as I do not attempt to sync to my phone. Once the phone gets involved with edits, I start seeing the type_ errors on all platforms. Regarding my network, my desktop is running though a hard-wired network with what I would consider a pretty standard setup. What I did not try was attempting a phone sync over cellular instead of over wifi. I will try that. I can say I repeated this exact test twice a few days ago with the same result. Since then, I have been using Joplin heavily (desktop only) and have not encountered any issues at all.

I was experiencing symptoms like this (missing required property), but was also seeing some file locking errors - as I was just trying Joplin for the first time today with a Nextcloud instance only recently configured, I wasn’t certain what the issue was.

It seems it may have been a performance-related issue on the Nextcloud side - after investigating the file locking issue and seeing reports that Nextcloud without a Redis cache instance has file-lock-related performance issues, I setup Redis, and the ‘missing required property’ and file lock errors ceased without any other changes.

Is Redis in use for your Nextcloud instance?

1 Like

I started getting these errors as well. They appear quite often and require me to re-create notes locally, or edit files manually on the server. It seems to have started since updating to Nextcloud 19, not sure if this is a coincidence. It happens so often that I have to fix files 5-10 times a day.

I use Redis for file locking. Doesn’t joplin have its own file locking system as well?

I get other similar issues as well, like “Invalid property is_shared”

@kainz0r, there’s another thread about this. There’s a bug in Nextcloud 19, which causes files to be corrupted.

@laurent this issue is still very much prevalent in NextCloud 25.

The errors seems to happen specifically with syncing Tags and Images the most for me.

Android: Joplin 2.12.2

Linux: 2.12.17

Last error: 
Error: On file 2b228beb9cdd49929f92958551af8201.md:
Missing required property: type_: 2023-06-29-15-36-17.jpeg 
id: 2b228beb9cdd49929f92958551af8201
mime: image/jpeg 
filename: 
created_time: 2023-07-12T16:14:51.985Z
updated_time: 2023-07-12T16:14:51.985Z
user_created_time: 2023-07-12T16:14:51.985Z
user_updated_time: 2023-07-12T16:14:51.985Z
file_extension: jpeg
encryption_cipher_text:
encryption_applied: 0
encryption_blob_encrypted: 0
size: 11717
is_shared: 0
share_id:
master_key_id:
type_: 4

Reading the various comments in multiple threads here- it's unclear what is best course of action to resolve these bug that blocks full syncing.

UPDATE: after deleting the file which was generating the error on Android Tag id: 0f8a5d... the Desktop app synced, but now the Android is showing the Image error id: 2b228b... after deleting that file too, syncing seems to resume on both ends.

Is there a way to not lose this data and resolve the issue?

Can you share the file that's causing the issue?

Can you share the file that's causing the issue?

Unfortunately not, since I deleted it to resolve the issue. But if it happens again, I will.

Usually it means that an extra newline has been added at the end of that file. Did you by any chance modify this file directly on Nextcloud?

Also closing this old post. Please create a new one if the issue is still happening. But given that it's never been reported for Joplin Cloud, my guess is on a misconfigured server or someone manually edited the files on the sync target