Home / GitHub Page

Item cannot be null error

Hey all,

I’ve a problem with syncing one if my notebooks. Here’s the error message:
Error: On file a1c18e993e2040bc8a135496d8c83989.md: Item cannot be null

And here are the contents of the markdown file:

id: a1c18e993e2040bc8a135496d8c83989 parent_id: de5b00c4f5d945c8848830f82f6e90c3 created_time: updated_time: 2019-07-21T07:31:34.091Z is_conflict: latitude: longitude: altitude: author: source_url: is_todo: todo_due: todo_completed: source: source_application: application_data: order: user_created_time: user_updated_time: encryption_cipher_text: JED010000220115a7a6e5887b418f82d04238191de80a0003ba{“iv”:“4BwxKwhXLNK6UcYawJYSyA==”,“v”:1,“iter”:1000,“ks”:128,“ts”:64,“mode”:“ocb2”,“adata”:"",“cipher”:“aes”,“salt”:“tBvMiqC+YtM=”,“ct”:“content ommited”} encryption applied: 1 type : 1type_: 1

It is encrypted and contains simply a link to a resource. It is an embedded picture. I’ve edited and synced this file successfully a few times before. The last edit went wrong.

I find markdown contents are different to all other files. Here’s a working file:

id: 4f85320421724118aaf49140f1e9db40 parent_id: 709d489141cf443782ffb30ae5b304d2 item_type: item_id: item_updated_time: title_diff: body_diff: metadata_diff: encryption_cipher_text: JED010000220115a7a6e5887b418f82d04238191de80a00059e{“iv”:“kZ63OYLsn5Cydh5whSS5VQ==”,“v”:1,“iter”:1000,“ks”:128,“ts”:64,“mode”:“ocb2”,“adata”:"",“cipher”:“aes”,“salt”:“82triVO/VLw=”,“ct”:“content ommited”} encryption_applied: 1 updated_time: 2019-06-30T15:01:23.344Z created time: type : 13

Here’s the log file output right before the error:

2019-07-21 09:53:37: “Sync: finished: Synchronisation finished [1563695616445]”
2019-07-21 09:53:37: "Operations completed: "
2019-07-21 09:53:37: “fetchingTotal: 3”
2019-07-21 09:53:37: “fetchingProcessed: 1”
2019-07-21 09:53:37: “Total folders: 15”
2019-07-21 09:53:37: “Total notes: 37”
2019-07-21 09:53:37: “Total resources: 21”
2019-07-21 09:53:37: “There was some errors:”
2019-07-21 09:53:37: “Error: On file a1c18e993e2040bc8a135496d8c83989.md: Item cannot be null
Error: On file a1c18e993e2040bc8a135496d8c83989.md: Item cannot be null
at Function.itemClass (/usr/share/joplin/resources/app/lib/models/BaseItem.js:100:20)
at Function.unserialize (/usr/share/joplin/resources/app/lib/models/BaseItem.js:399:26)
at loadContent (/usr/share/joplin/resources/app/lib/synchronizer.js:542:30)”
2019-07-21 09:53:37: “Setting up recurrent sync with interval 300”

I sync the files via syncthing to my Android phone where I get the same error.

Version:
image

Thanks!

Did you manually edit the .md file? Because the markdown doesn’t seem to be valid. Maybe copy and paste here exactly as it is and wrap it in a code block to be sure.

id: a1c18e993e2040bc8a135496d8c83989
parent_id: de5b00c4f5d945c8848830f82f6e90c3
created_time:
updated_time: 2019-07-21T07:31:34.091Z
is_conflict:
latitude:
longitude:
altitude:
author:
source_url:
is_todo:
todo_due:
todo_completed:
source:
source_application:
application_data:
order:
user_created_time:
user_updated_time:
encryption_cipher_text: JED010000220115a7a6e5887b418f82d04238191de80a0003ba{"iv":"4BwxKwhXLNK6UcYawJYSyA==","v":1,"iter":1000,"ks":128,"ts":64,"mode":"ocb2","adata":"","cipher":"aes","salt":"tBvMiqC+YtM=","ct":"M+tPQ2E1tF9SHA/4MFENX2ei0wkrcPgwZmQysFetTpMgGPkW8ZDx7Lm/J+q6j/h+vhFWxp4JPox6MXSZM70tUWQbS51r5xWwaTqrbenJVkSVPhQ4OPTd9PeqbPoH3Fqs04tATpwQnWMjNRl1zP9Sk+rFjL084IAKKRvtJdD/AVH/VYhl3m8Xvp7ackoUPwgQ/KhjGceBVuvtQrafALjQ+8xDviy1dF3p5/pNnnPG9qE7CL2pUqeMZLqD41ITIKA+HOQd1Re53EkYsasEaZjQykKuEoSrdvL2tiubtT7bZIiEEc5dw36Whw3tW9h23xXrgWmpt38qsuGmAD80g8fUJx8WAsiSKXxChLsIWNpg7wDxs3Y5BRwrquK4eMVCRJTfamL4Uzy9kYdsCQdNJyp745Ajv/B1KVddzAsC2jqfqdlhoSbtX2OHV1FEeBvyr+STOCyglVolikUymZDEkfvCMSo8ytgvRbY/oxqs7cOq3RDvsuJS1RnbO0u6/9bksqh8ad0blGNd/gfyMxAgUnBYhJLtgkYn26Oeb5ZJDXX6goMcTF4VE8t6U9MlauPzWOLmgm0wH6RIliXo7rKjNM7XrnuqQeelfD1WjDv0+h4FwlsKeqQWCe7S5Tl8bk0O/AVrgaiVDbfVwa7xW5/fa4udQTcrY5NKDh58fDXB28pncfDZMFLZ8zXbrQJsST216VbkGvR9xEOLL4fq7DRz+RvqdiivJphYZX8wBavZgG2WG0KcTom/tyQwvcWtHaGhBH/f5tNIqS2R8rOmoFhqg9IuSa6noG6j4Tl2A6uu+oZGjLFwnuCK"}
encryption_applied: 1
type_: 1type_: 1

Sorry about the messed up snippets from above :slight_smile:
I’ve edited the file through the Desktop-App and the Android app (no manual edit). I don’t exactly remember on which platform I made the edit which broke the file but I think it was Android.

I have hand edited the file to make it match the other working files and the error is gone. I then revesed my changes through my Android phone and the error has reappeared. It looks like the culprit is that the app appends type_: 1 twice at the end of the file. Remove the second appearance and it works.

Today the problem resurfaced. The problem seems to be the Android Version of Joplin. Desktop never had any problem. Here’s the full unedited (broken) file:

id: 79d65ab4c9864da98f5df1b66f813895
parent_id: ca8680e79cb14ed8952ee9b17e4d53ec
created_time:
updated_time: 2019-08-13T17:45:05.506Z
is_conflict:
latitude:
longitude:
altitude:
author:
source_url:
is_todo:
todo_due:
todo_completed:
source:
source_application:
application_data:
order:
user_created_time:
user_updated_time:
encryption_cipher_text: JED010000220115a7a6e5887b418f82d04238191de80a000392{“iv”:“WBk7joRVYGIJFS2jT5Zl8Q==”,“v”:1,“iter”:1000,“ks”:128,“ts”:64,“mode”:“ocb2”,“adata”:"",“cipher”:“aes”,“salt”:“HNoNY8VPLN4=”,“ct”:“cp/1HtHsO/Eocx6dWVo7jGiS6Y/5RKPNJ5ICz4guhh+UgS48rowYLRL5FYqOshtNl2bB/7PWJOgcNMqanzoLlyfLbslXHYyPMgYInuwibR2HvyECJCEsUU7VnTIOf4vHVhZlfds0PtFsm2tbXyj1uQES9YkMlLMO5fwBrQDr/Ru2IfVxEt26OwKfXiFu5y7rGmHO+vDqjNhpK2jCnkcwXOaHeEnAg7N42hWz/a+U1RP5ayi3Ovxanfyz9uvXvKI52byvawFOPuv8BsmY0kgiMVWpWr8oVGak8r1f2tTq/jXLPoAik2Jmw0QjL0GUbO3TyQghHPa+JIqpD/3e9ScbxVC9SJvg6dvksphUWIirNuUXGiyY+mZbOI7Mf+Jl7Eipxm+F2TJ9z68Sx5ldpntZf7YC6DS14u/vrwy0aXZOiICht6q6WXiwVcOi1HN1NZwsSePb4kB0ZFqq84/b5xPajGlVYjdZGU64hY9xKD6Kv66YY73dRKjoXR7+ZxAdPubo7BBpKuywXUyljoqoRe3LVRtZww01JoTRp5QzApUL0G/OeuUofk4eve/xfHBJtDn3w8idfxkL+EnDN4aH39qbcdE0boRp7oU9hMOLizSkRGDL/QwKfonpjbKQoJ0aBJMT95QLYdtGqgW1TFUX4ClFk4wo039XcClr4tGJBvmn+D3IxG5+tdzIJAKLUvGjzqTI83oJMI4kK+g/me/JVMZbyBDW7O+0muOtReaBvbRX7GKmRvAlmU5MVxuxCdr60/hICEhx4lzx”}
encryption_applied: 1
type_: 17tpDdTchq/WOz0pwMbT4EYkapEqsoHrya+KPH/9"}
encryption_applied: 1
type_: 1

After deleting everything after the first occurence of type_: 1 the file worked but some of the contents where lost.

1 Like