If you use Joplin on Android or iOS and are seeing the "Some Items Cannot Be Decrypted" orange banner at the top of the Joplin app, this may be due to an encryption issue in recent versions of Joplin. If clicking the banner and then clicking the "Retry All" button does not make the errors go away permanently, and the same errors exist on more than one device, this is due to the items being corrupted on the server, likely due to the bug here Mobile: Entering the wrong password in encryption config causes local notes to be encryted with a corrupt or non-existent encryption key · Issue #14975 · laurent22/joplin · GitHub. Despite the title, this does not require the wrong encryption password being entered, in order to occur. This issue will be fixed in the Joplin 3.6 release for mobile, however if you currently have items which cannot be decrypted, they will not automatically be fixed when you upgrade.
This guide details how to remove these items which cannot be decrypted, in order to make the banner go away. This method will work for all sync targets, including Joplin Cloud, and only requires that you have a computer with Joplin desktop and Python installed. Note that if any of the items which cannot be decrypted are of type "Note_tag", you cannot delete those items using this method, as there is no API available to delete a Note_tag by id.
DISCLAIMER: Using this method will permanently delete the items which could not be decrypted, on all devices. Usually the corrupted items will just be from the default Welcome notebook which is created when you install Joplin on new device, but if you have made any local changes which have never been synced, these changes will be lost.
These steps should be done using a computer and Joplin desktop:
- Create a full jex backup of your data, using File, Export all, JEX - Joplin Export File. If not all expected data is synced and decrypted on your Joplin desktop client, or if you are unsure, also create a full jex backup on one or more of your other devices
- Install Python 3 if not already installed
- In Joplin desktop, go to Tools, Options, Web Clipper. Click "Enable Web Clipper Service"
- Make a note of the port number and the authorisation token
- Copy the following script into a text file and save it as delete-item.py:
import sys
import urllib.request
import urllib.error
def http_delete(url):
req = urllib.request.Request(url, method="DELETE")
try:
with urllib.request.urlopen(req) as resp:
resp.read()
print(f"[OK] {url} -> {resp.status}")
except urllib.error.HTTPError as e:
if e.code == 404:
return # ignore missing
try:
body = e.read().decode()
except Exception:
body = "<no body>"
print(f"[HTTP ERROR] {url} -> {e.code} {e.reason}")
print(body)
except Exception as e:
print(f"[ERROR] {url} -> {e}")
def main():
if len(sys.argv) != 4:
print("Usage: python script.py <token> <port> <id>")
sys.exit(1)
token = sys.argv[1]
port = sys.argv[2]
item_id = sys.argv[3]
base = f"http://127.0.0.1:{port}"
# Permanent deletes (supported)
http_delete(f"{base}/notes/{item_id}?token={token}&permanent=1")
http_delete(f"{base}/folders/{item_id}?token={token}&permanent=1")
# Normal deletes (no permanent flag)
http_delete(f"{base}/resources/{item_id}?token={token}")
http_delete(f"{base}/tags/{item_id}?token={token}")
http_delete(f"{base}/revisions/{item_id}?token={token}")
if __name__ == "__main__":
main()
- Go to Help, Synchronisation status, to see the items which could not be decrypted:
- Open a terminal / command prompt
- Now, run the python script, passing the authorisation token noted earlier as parameter 1, the port as parameter 2, and the id of the item to delete as parameter 3. Do this for all items in the in the list on the Synchronisation status screen, where the id is the 32 character hash between Note/Folder/Resource/Revision and the "Retry" button for each entry. An example usage of the script is as follows:
C:\Data\Profile\Documents\delete-item.py b2c77e04546e5b6355245e0807ab3f6f67dfb75de42d89e0c28f17f2ddfa8ba3d134e11c2b48f84a29fd2306f9b32288d5f7473cc8467q4fb8592ecc00ac4d68 41184 1e12cf6fe6a6487fbcf155a403b5d0e0
- For each run of the script, if it completed successfully, there should be a response something like this:
[OK] http://127.0.0.1:41184/notes/de410e69b5e746f694666caac364b2de?token=b2c77e045... - After running script for all ids, click the "Retry all" button on the Synchronisation status screen. These items should now disappear along with the orange banner, and won't come back. If this is the case on Joplin desktop, click the Synchronise button on the main screen, and once completed, click Synchronise on all your other devices. This should remedy the issue, but if not, click the "Retry all" button the Synchronisation status screen on each device after syncing

