laurent22 / joplin

Joplin - the privacy-focused note taking app with sync capabilities for Windows, macOS, Linux, Android and iOS.
https://joplinapp.org
Other
46.06k stars 5.01k forks source link

Some items cannot be decrypted. #4403

Closed chumayu closed 2 years ago

chumayu commented 3 years ago

Environment

Joplin version: 1.6.8 Platform: Windows OS specifics: 10 x64

Steps to reproduce

  1. Install Joplin
  2. Import few notes from Evernote
  3. Encrypt
  4. Made sync via Dropbox
  5. Install Joplin on another PC (Windows 10 x64)
  6. made sync
  7. Enter master key (for decrypt)

Describe what you expected to happen

Joplin pop-up "Some items cannot be decrypted."

Items that cannot be decrypted Joplin failed to decrypt these items multiple times, possibly because they are corrupted or too large. These items will remain on the device but Joplin will no longer attempt to decrypt them.

Resource: bc13186baa9fbc0f3365faa2b3b20331Retry Resource: a37400b3e3c80a92bd5820dc22db54b7Retry Resource: b419023244ccf4193a7d2c3696ced5c6Retry Resource: 80d8e899b2ae5762063a1a0ae5f819b7Retry Resource: 9d35fef6501baab68c343fcd67a3698bRetry Resource: 096ef8339f70975f977e2f49abf0b706Retry Resource: e86fc2a27f9adc48bf814d5c2cdbd2b7Retry Retry All Attachments Not downloaded: 0 Downloading: 0 Downloaded and decrypted: 139 Downloaded and encrypted: 7 Created locally: 3 Error: 0

When i try reinstall Joplin and made sync i receive same error but different attachment can't decrypted. I try several time, all time different q-ty not decrypted files.

Logfile

log.txt console.txt

fnl commented 3 years ago

I have the same problem; I have thousands of attachments, and some fail. However, if I open the Notes Attachments Tool, I cannot search for the Resource IDs there, to understand which ones are failing and maybe delete them. How do I fix the problem?

fnl commented 3 years ago

I just realized that if attachments could be sorted by ID, then at least I'd have a chance of finding them manually.

chumayu commented 3 years ago

@fnl you can find which attachments "not decrypted" simple by search in notes

roman-r-m commented 3 years ago

I have the same problem; I have thousands of attachments, and some fail. However, if I open the Notes Attachments Tool, I cannot search for the Resource IDs there, to understand which ones are failing and maybe delete them. How do I fix the problem?

You can run a query directly against the joplin database to find the attachments

bugsbunny88 commented 3 years ago

Hey guys, chumayu ; not to derail your thread but I have the exact same issue ; initially it was 2 notes, and now its 25+ searched on the net and came across this thread.

"find attachments "not decrypted" simple by search in notes is there a unique statement you are putting in like site:not decrypted or some coding thing? because just typing not decrypted is not doing it for me.

roman-r-m ; "you can run a query directly against the joplin database"

  • this comment is not helpful at all to an individual like me . I have no idea what that means or the steps involved. can you kindly elaborate man.
chumayu commented 3 years ago

@bugsbunny88 in pop-up "Some items cannot be decrypted. View them now" you can see list of resources. if you try use search you can find them in some of notes (toggle to markdown editor).

chumayu commented 3 years ago

That not help you to recovery this decrypt that files but you know what files you lost)

roman-r-m commented 3 years ago

this comment is not helpful at all to an individual like me . I have no idea what that means or the steps involved. can you kindly elaborate man.

I guess if you've no experience with such things you'd better use chumayu's solution as it's safer.

chumayu commented 3 years ago

In any case, it is not clear how long this problem will be solved and whether it will be solved at all. I would not like to put my recordings in clear text.

fnl commented 3 years ago

This is popping up again, I thought "retry all" had gotten rid of the issue. So now I tried searching with "not decrypted" as well as with "encrypted" in the search bar, but do not get any results, other than notes containing those keywords. Can someone help me out what the exact search syntax to use would be?

fnl commented 3 years ago

Figured out how to at least get rid of those items - I am simply deleting them from Dropbox; Though that implied living with the fact that I have no idea what items those were. But figuring out what the attachments were on the machine without decryption problems for those 31 items would have been a chore. Overall, it would be really nice to have that feature - I guess it's time to roll up my sleeves or at least make a donation to the project, as overall Joplin indeed seems the only worthy Evernote alternative around. :)

roman-r-m commented 3 years ago

But figuring out what the attachments were on the machine without decryption problems for those 31 items would have been a chore.

If you have ids of the encrypted attachments, you just put them (one by one) in Joplin's search. This way you can at the very least see the notes where these attachments are referenced. Maybe from this you can understand what these attachments are.

seanieb commented 3 years ago

Seeing an uptick in this. I'm not sure what might be causing this. It's happened with files uploaded from the iOS app and the Desktop app. I'm using Dropbox to sync, I've 4 keys active on each app, with 4 devices (3 MacOS, 1 iOS).

Figured out how to at least get rid of those items - I am simply deleting them from Dropbox; Though that implied living with the fact that I have no idea what items those were. But figuring out what the attachments were on the machine without decryption problems for those 31 items would have been a chore.

@fnl There's tool in Joplin for this. Go to Tools > Note attachments. Having said that, that too could be improved by allowing searching on the page. I'm forced to copy that page and do a control-f to find the id of the file that's not decrypting.

One other tip, that @roman-r-m mentioned, you can search for file id's in Joplin. It's useful to give context about which notes the files are attached to.

johnr365 commented 3 years ago

Hi 👋🏻 I'm getting this same problem: "Some items cannot be decrypted."

It referenced a hash of an attachment, which I searched and deleted (within Joplin).

This hasn't cleared the error message. What's the next step, please? Thanks!

seanieb commented 3 years ago

I've been able to fix this issue when it does happen by just copying the un-currupted encrypted version of the file from Dropbox. Joplin uses the Dropbox API, and doesn't write directly to your local version of Dropbox. So for the Desktop version of the App with the Dropbox app installed, you are storing two versions of your notes and attachments on that computer.

cp ~/Dropbox/Apps/Joplin/.resource/[INSERT FILE ID HERE] ~/.config/joplin-desktop/resources/[INSERT FILE ID HERE].crypted

Edit: I found that the issue for me was the file was being only partially downloaded or corrupted: https://github.com/laurent22/joplin/issues/4472

johnr365 commented 3 years ago

I've been able to fix this issue when it does happen by...

Thanks @seanieb - that seems to have fixed it! No more yellow warning messages coming up.

chumayu commented 3 years ago

Great @seanieb for you solution. But anyway that should be resolved by dev team in application. I hope that will be near future.

bugsbunny88 commented 3 years ago

On my end it would add more items on a daily basis ; only way about it was deleting the images . It all has to do with images in your notes (atleast in my case) . Anywho , long term solution for now . I have decrypted everything. and will encrypt everything until devs get this fixed . good luck .

sif commented 3 years ago

Hi, I just read the entire thread. I just want to say that I occasionally get this problem too. It's only an issue if I try to make a photobook.

chumayu commented 3 years ago

@sif you mean when in note few images come in sequence

sif commented 3 years ago

@chumayu I think so.

CapZhang commented 3 years ago

I have the same problem. I have deleted the attachment that reported the error, but the annoying yellow prompt still pops up.

fred-croix commented 3 years ago

I've been able to fix this issue when it does happen by just copying the un-currupted encrypted version of the file from Dropbox. Joplin uses the Dropbox API, and doesn't write directly to your local version of Dropbox. So for the Desktop version of the App with the Dropbox app installed, you are storing two versions of your notes and attachments on that computer.

cp ~/Dropbox/Apps/Joplin/.resource/[INSERT FILE ID HERE] ~/.config/joplin-desktop/resources/[INSERT FILE ID HERE].crypted

Edit: I found that the issue for me was the file was being only partially downloaded or corrupted:

4472

This works for me. thank you !

pfbrowning commented 3 years ago

I've been able to fix this issue when it does happen by...

Thanks @seanieb! This workaround fixes the issue for me.

However, I find that I have to repeat this each time I configure a new instance of Joplin (such as for a fresh OS install).

saarantras commented 3 years ago

It seems like a "redownload" button in addition to the "retry decryption" button would be a fairly straightforward fix. Or just store the encrypted files with some kind of checksum or hash, and just auto re-download when the hash doesn't match. Corrupted downloads happen with a low frequency, but if you have a lot of attachments (like me) this is a real annoyance.

stale[bot] commented 3 years ago

Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. You may comment on the issue and I will leave it open. Thank you for your contributions.

bridder commented 3 years ago

Hi,

I am having the same experience with this problem, and I do not know how to fix it.

Some users above said to "copy the uncorrupted file from Dropbox". Copy it to "where", exactly? Apologies if I am overlooking something obvious. Other users suggested that hitting "Retry All" eventually solves the problem. I can keep trying that, but I've hit it about 4 or 5 times so far with no improvement.

Items that cannot be decrypted Joplin failed to decrypt these items multiple times, possibly because they are corrupted or too large. These items will remain on the device but Joplin will no longer attempt to decrypt them. Nine items always fail to decrypt.

Resource: d598630fdff84a59bebba8ff3d98e764Retry Resource: 8e3fb8ca119a4321944605304cb68c9cRetry Resource: 6f014ab34f864bafa1d674486db35404Retry Resource: 1e634223723942c4bb240d946777022eRetry Resource: dcbcf867aa6547dd8737312413132089Retry Resource: a38e1b02089f45788343848cafbdb208Retry Resource: 7ba5e1ef6c8a4eaeada6f4d979c94c16Retry Resource: e10b926ed640486ba2ad755e151c7fc8Retry Resource: 524139e88dca48f0827a2b1b9722256fRetry Retry All Attachments Not downloaded: 0 Downloading: 0 Downloaded and decrypted: 157 Downloaded and encrypted: 9 Created locally: 3 Error: 0

bridder commented 3 years ago

I've been able to fix this issue when it does happen by just copying the un-currupted encrypted version of the file from Dropbox. Joplin uses the Dropbox API, and doesn't write directly to your local version of Dropbox. So for the Desktop version of the App with the Dropbox app installed, you are storing two versions of your notes and attachments on that computer.

cp ~/Dropbox/Apps/Joplin/.resource/[INSERT FILE ID HERE] ~/.config/joplin-desktop/resources/[INSERT FILE ID HERE].crypted

Edit: I found that the issue for me was the file was being only partially downloaded or corrupted:

4472

Hi,

I tried seanieb's fix, and it does appear to have worked. The error has cleared up, and the obnoxious yellow error banner is gone, too.

The problem appeared under the same circumstance seanieb said he usually has to use the fix: I had just done a fresh OS install (pop_os! 21.04, using the flatpak version of Joplin).

stale[bot] commented 3 years ago

Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. You may comment on the issue and I will leave it open. Thank you for your contributions.

saarantras commented 3 years ago

This is still an issue as of Joplin 2.1.9.

stale[bot] commented 3 years ago

Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. You may comment on the issue and I will leave it open. Thank you for your contributions.

bridder commented 3 years ago

This may still be an issue. I cannot reinstall my OS to test if the issue still exists.

On Mon, Sep 6, 2021 at 3:18 PM stale[bot] @.***> wrote:

Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. You may comment on the issue and I will leave it open. Thank you for your contributions.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/laurent22/joplin/issues/4403#issuecomment-913820314, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADDWT5VAKHTRHCOYTIIO433UAUHYRANCNFSM4WNMPKVQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

saarantras commented 3 years ago

This may still be an issue. I cannot reinstall my OS to test if the issue still exists.

You don't have to reinstall your OS to test it: just make a new user-account, install joplin, and sync. The appropriate fix (a download checksum & automatic re-downloads) hasn't been implemented yet, so I think this issue should remain open.

stale[bot] commented 3 years ago

Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. You may comment on the issue and I will leave it open. Thank you for your contributions.

saarantras commented 3 years ago

Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. You may comment on the issue and I will leave it open. Thank you for your contributions.

This is still an issue.

fnl commented 3 years ago

I, too, can confirm that after completing the below instructions and retrying the sync again, the yellow warning went away and the image files got successfully decrypted:

https://github.com/laurent22/joplin/issues/4403#issuecomment-775357728

So this is still an open issue, although I cannot really contribute more to the "why" of this bug, either. If of any use, in my case, the files where Mac OSX screenshot png files I had dropped into the offending note on a different machine.

saarantras commented 3 years ago

One way to get at the "why" might be to do the following: Next time the bug occurs, look at both the .crypted resource in your joplin directory AND the one from your dropbox. If the dropbox one is a larger filesize, it's probably what was speculated above: this is an issue with partial downloads. If not, it's some other problem. FYI, I recently switched from Dropbox to Amazon (better pricing) and completely stopped having this problem, even after doing a "large" sync operation (syncing all of my notes). Possibly amazon's downloads are more reliable..?

github-actions[bot] commented 2 years ago

Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. You may comment on the issue and I will leave it open. Thank you for your contributions.

github-actions[bot] commented 2 years ago

Closing this issue after a prolonged period of inactivity. If this issue is still present in the latest release, feel free to create a new issue with up-to-date information.