Android crashing, likely lost encryption keys/phantom encrypted content

Operating system

Android

Joplin version

2.13.10

Desktop version info

Windows 2.12.19

Sync target

Joplin Cloud

Editor

Rich Text Editor

What issue do you have?

I'm very happy with Joplin overall, but I've encountered an error that makes it unusable for now on my phone. Every time I open the app, it tries syncing/decrypting and then Android gives me the error "Joplin has stopped". This happens within ~30s every time I open it, but if I quickly cancel the sync or open without a wifi/4g connection, it can stay open and stable for much longer.

This started on Joplin Android v2.13.3 database v43, Android v9, syncing to Joplin cloud with e2ee. Most notes were created in (/imported into) Joplin Windows v2.12.19 from Evernote v6.

Syncing from one Windows PC to another works fine. But both of my Android devices are useless for now (HTC U11 Life and Sony xz1 compact).

I suspect that this is an issue with the data it's trying to sync rather than a bug, as it suddenly started happening after I made two identifiable changes to my database on Joplin desktop:

  1. I installed a bunch of plugins and started using them.
  2. I transferred a few notes over manually from Evernote (simple copy and paste of content as it was only a few) because I'd continued making them there during the transition. This included one with a ~10mb video. I then decided to delete the video so it wouldn't take ages to sync and decrypt (the irony). But I clearly don't know how Joplin handles deleting of this kind of content! Initially, I only deleted the link within the note. I realised then that the file was still there, so I right-clicked on a link to a smaller video file within the same note, used the option to point me to it in the database folder, sorted the folder by size and deleted the largest file (an mp4). The first time I re-opened Joplin, it gave me a sync error saying this file was now missing. So I produced a tiny text file in there with the same name (and mp4 extension) and this seemed to make Joplin for Windows happy.

After these changes, I left Android to sync and decrypt as much as possible - at first, each time it crashed, it did do some sync+decrypt work before crashing, but eventually it seemed to stick on one particular note and it would no longer make progress when I opened the app.

If I remember correctly, I deleted the note which originally contained the videos and copied most of the text+image content to a replacement note before switching off note history and forcing a sync to cloud.

I've scoured this forum for related issues and followed advice after advice where it semed relevant. This included multiple reinstalls on Android, which I think has created a bunch, maybe dozens, of encryption keys (I had until recently been entering my encryption key immediately after linkig each new Android installation to Joplin Cloud) so may have fallen foul of this issue Encrypted orphaned tags lingering and prompting for missing master key although Windows only lists the one, good, key.

  • My latest attempt included:
    • Uninstalled Android app, deleted the net.cozic.joplin folder
    • On Windows: Deleted all "Welcome" notebooks, deleted all tags, switched off all plugins, switched off encryption, force clean re-upload to cloud.
    • Reinstalled Android app (now v2.13.10), linked to Joplin Cloud and attempted to download all notes before entering any encryption key.
    • Sync went for a few hours, then Android app crashed. Crashing repeatedly each time I open it (which has been the outcome of every attempted fix). Errors in log include:
      • "One of the revision to be deleted is encrypted"
      • "Network request failed at anonymous"
      • Also, the warning "Aborted deletion of old revisions because one of the revisions is still encrypted"
  • My next attempt, based on the chance that note history being "off" is less effective at cleaning out old content (Encrypted (using E2E) attachments after deletion - #5 by tessus) than setting note history to one day and then waiting out that day, is to do exactly that, before repeating the above again. Don't feel particularly hopeful about this though...

Fortunately, there are very few (if any) notes created yet on Android, except for numerous "Welcome" notebooks, which I've deleted. So I haven't lost any content, just a lot of time.

Sorry for the info dump - hopefully there's a way out of this! Having Joplin work on Android is very important to me.

I would be very thankful for help on this please. i really am stuck

It's hard to digest all of this dump and come up with a useful recommendation.
But some of your points make me believe that you should

  • backup your desktop data
  • verify (including logs) that your two desktop devices still sync flawlessly
  • do NO LONGER attempt to add or remove any notes or attachments manually
  • and start from scratch on only one Android device .... until it works.

Thanks ajay and I appreciate that this is a difficult situation to interpret.

What precisely do you mean by "start fresh"? I've tried another fresh sync from cloud to one android device again (after uninstalling and deleting remnant files, then waiting over a day), but still no luck.

What I've been trying to say is:

  • you mentioned several Android devices -> use only one until it works
  • if possible use a stock - plain - simple Android (not a device which has been messed around for months and years, with apps added / removed or rooted)
  • clean this one from all residual Joplin files and typical problem makers (like unsupported firewalls etc). You could use the AVG cleaner, you may have to pay for the pro version
  • restart then install Joplin, latest version
    NOW
  • start from scratch
1 Like

Thanks Ajay.

Just got back to this after being away (had to use Evernote for a few weeks :cry: )

Going back to your earlier mention of logging on the "syncing ok" PCs, I checked today and see a lot of:

"DevTools failed to load source map: Could not load content for file:///C:/Users/Joe/AppData/Local/Programs/Joplin/resources/app.asar/[various map file names].js.map: Unexpected end of JSON input"

and also there's:

image

...where both warnings are identical:

Thanks Again Ajay. Just to say that I've already been doing as close as I realistically can to your advice.

This post suggests I may have to go nuclear: Joplin trying to sync file from note, but file has been removed - #7 by JackGruber - Could anybody advise if it's possible to have Joplin for Windows installed and logged into one ("source") account, and also Joplin portable open and running on the same machine at the same time, and logged into a different ("destination") account? This as a way to essentially abandon my existing account and hopefully leave these issues behind.

Or as per your previous advice to another user here Bug report: Attachments not syncing - #9 by ajay, how would I replicate the step of deleting the profile on Joplin Cloud, to continue using my existing account?

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.