Hundreds of attachments not downloading on Android

Hi,

I am a new user. I have been testing Joplin over the past week and have run into a problem on Android. Yesterday I moved hundreds of attachments into Joplin. They show up fine on the Desktop version however on Android they only show up as a link with a download icon.

  • Clicking on the link doesn’t download the attachment.
  • I have the configuration set to Attachment download behavior: Always
  • The files are various types: pdf, docx, jpg, png etc.
    Clicking on the Synchronize button give me the result: “Complete: 01/10/2019 12:04.”

All of the notes and attachments that I have added prior to yesterday look like they have downloaded successfully.

If I look at the Encryption Config I see:
Decrypted items: 3511 / 3706

If I look at the Sync Log I see the RevisionService: maintenance: Starting, collection created, created revision for 0 notes, Operation Complete. This all looks normal.

The Total notes, Total resources, Total Folders in the log matches the Synchronization log on the Desktop but the attachments just don’t show up.

If I click the “Errors Only” button I see one error that looks like it may be related:

“DecryptionWorker:”, “{“message”:“Row too big to fit into CursorWindow requiredPos=15, totalRows=17”, “code” : 0}”

Has anyone seen this before, any ideas on how I can proceed forward?

What version?

Hi Laurent,

1.0.169

I am using the portable version.

2019-10-01%2016_36_17-Joplin

I also just found a note that had only 3 file:/// links but the note on android is empty. So it isn’t just attachments but some of the inline notes content is also missing.

I just noticed that although the Synchronize appears to complete successfully. This error appears in the log every time I click the sync button:
“DecryptionWorker:”, “{“message”:“Row too big to fit into CursorWindow requiredPos=15, totalRows=17”, “code” : 0}”

Is there a way to find out what the DecryptionWorker is hanging up on?

What version on Android?

The version is 1.0.169. I have attached a screenshot in the post above showing the exact version information.

That’s obviously the desktop version. How about the Android version?

Oops sorry: 1.0.306
Database v24
FTS enabled: 1

Could you try v307 from there to see if it fixes the issue please? https://github.com/laurent22/joplin-android/releases/tag/android-v1.0.307

Normally it has a fix for this specific problem.

I just upgraded to 1.0.307. Similar results but I have an update:

I just found this post where the user describes a large note was causing a similar problem: Synchronization error on Android

I found one large note that was a webpage, around 300kb. I deleted it and I got a little further. I am now on:

3519 / 3725 under Encryption Config

So I got another 8 notes according to the Encryption Config however it looks like it actually decrypted more than 8. It didn’t decrypt all of them however and I still get the same error message in the log I guess it is still choking on something.

I downloaded DB Browser for SQLite and I am looking for other large notes. Do you know what the limit is for each note in terms of lines, characters or mb?

Also, I found a few discussions here about a similar error: https://stackoverflow.com/questions/51959944/sqliteblobtoobigexception-row-too-big-to-fit-into-cursorwindow-requiredpos-0-t

Does Joplin store any blob data in the database or are all attachments just links to the resource folder?

Any other suggestions on what I can look for to fix this issue and sync the data? Am I on the right track or are there other things I could be looking for?

Could you post the Android log here as it’s hard to tell otherwise.

I looked at the body field in the notes table on Windows. I had two web pages from the webclipper plugin that were around 300,000 characters. I deleted these notes and tried to sync again without success. The next largest note is only 30,000 characters so I don’t think it is a large note problem anymore.

After I removed that first large note, it said it only decrypted 8 more notes however it actually decrytped more than that, maybe around 50? There are still many notes with download icon attachments and I still have the empty note as well, not sure how many others.

After deleting the first large note I was at Decrypted items: 3520/3726 in the Encrypted Config screen.

Then after I deleted the two web pages I get:

Decrypted items: 3516 / 3723

I also did a test and tried to attach a new image to an existing note from the desktop and sync it, same results, I just get a download icon and the error shows up in the log

Here is the log file:

https://dl3.pushbulletusercontent.com/ds7QhNGm75rhhE8Hcu5t1ru6NB0AyMLb/syncReport-1569971317397.txt

This is what I see currently in the Encryption Config:

I have been looking at the 2 larger notes that I deleted. They are gone from both the desktop and mobile app however I believe they are still in the dropbox folder. I have a 5.6mb and 2.6mb .md file in my dropbox folder. I can’t be sure if these large files are the ones I deleted because they are encrypted.

They aren’t in the notes table which makes sense because they have been deleted but I did find them both in the sync_items table. Is Joplin still trying to sync these notes even though they have been deleted?

If a note is deleted from desktop and mobile, shouldn’t it also be deleted from dropbox or do you keep these files in dropbox for some reason?

After sync it should be deleted from Dropbox too.

I guess my sync is not working then. Those files remain in dropbox and I get the errors I posted above in the log. Does this mean that the sync doesn’t actually complete properly even though I get a Completed: xxx message?

I am trying to determine how many bad records are in my Dropbox folder. Should the number of .md files in the dropbox folder = the “Total” value reported in the Sync status screen on the devices?

Also, it looks like I only have around 50 notes with the attachments that still have download icons however the Decrypted items still shows 2516 / 2723. Is it possible that Joplin is reading the number of encrypted files wrong? Where does it get this value 2723 from? This doesn’t match the Sync status screen either from what I can tell.

Any ideas on what went wrong from the log I posted? How would you suggest I recover from this? If the dropbox and mobile apps are now in an unknown state?

Also, what is the maximum note size allowed so that I can avoid these issues in the future? I believe the problems I had were from clipping web pages using the tool. Perhaps you could set a limit and not allow the user to save a note that is greater than the maximum size allowed.

Known bugs:link:

  • Resources larger than 10 MB are not currently supported on mobile. They will crash the application so it is recommended not to attach such resources at the moment. The issue is being looked at.
  • Non-alphabetical characters such as Chinese or Arabic might create glitches in the terminal on Windows. This is a limitation of the current Windows console.
  • It is only possible to upload files of up to 4MB to OneDrive due to a limitation of the API being currently used. There is currently no plan to support OneDrive "large file" API.

However, there's a setting in mobile that allows you to only download attachments on demand.

Personally I do not want to have a limit enforced that prevents me from attaching a large file. (Not that I would, since I almost never use attachments.) But if someone uses only the desktop apps, why would such a limit make any sense?

I understand that resources larger than 10 MB are not currently supported and crash the application. This really limits what I had intended to use Joplin for (a knowledge base) and I will have to rethink some things however I understand this limitation.

I do not believe that this caused my sync issue. I am not experiencing any type of app crash either. Rather, I think the issue was caused by a large note (not an attachment). One I followed the instructions from the other user here: Synchronization error on Android and deleted my large note (which didn’t have any resource attachment), many of my links did unencrypt on mobile right away. What I still don’t understand is that I have eliminated all the large notes, I don’t have any resources over 10mb but I am still getting the sync error, I still have encrypted notes on mobile and I have stranded resources in dropbox now.

I would like to know, what is the maximum size of a note that is supported? I have read it might be 1mb, 2mb, 10mb or 50mb in previous posts but I don’t know what the current limitation is.

So I am not speaking about limiting the size of the attachment but limiting the size of the note. If there is a known database limit on how many characters can be stored in the body field of the note table then Joplin should enforce this. Right now the web clipper will allow me to save a large webpage. When I looked at the notes table I had several notes that had 500,000+ characters and were 8mb large. This is data that is stored inside the database not a link to an attachment.

Laurent, can you confirm if the “Row too big to fit into CursorWindow requiredPos=16, totalRows=17” error is caused by a large resource or large note and if so what are the current limits of note size (the inline data)?