tutao / tutanota

Tuta is an email service with a strong focus on security and privacy that lets you encrypt emails, contacts and calendar entries on all your devices.
https://tuta.com
GNU General Public License v3.0
5.97k stars 513 forks source link

Uncaught BadRequestError: DELETE /rest/tutanota/mailservice #5770

Open ganthern opened 1 year ago

ganthern commented 1 year ago

Reported for 3.114.x, 3.115.x, 3.116.2 on browser and desktop. We may have a problem with deleting stuff from trash through the search / from subfolders of the trash.

Messages failing to be removed from trash after selecting all search results and confirming permanent deletion.

Client: win32
Type: PREMIUM
Tutanota version: 3.114.1
Timestamp (UTC): Sun, 13 Aug 2023 12:57:15 GMT
User agent:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) tutanota-desktop/3.114.1 Chrome/112.0.5615.165 Electron/24.2.0 Safari/537.36
BadRequestError
Error message: 400: NbiyCz0----9 | DELETE /rest/tutanota/mailservice
Stacktrace:
BadRequestError: 400: NbiyCz0----9 | DELETE /rest/tutanota/mailservice
at d0 (asset://app/common-min-14a25bc9.js:1:8951)
at d.onload (asset://app/worker.js:12:23441)

Re recent error reports... items that failed to be "permanently deleted from trash" were apparently in a sub-folder under trash...

Another one:

This popped up while I was selecting all loaded items in search, and simultaneously items were being permanently removed from trash folder as a result of previously selected action against previous search results... Number of emails selected was counting down as messages were being removed.

Received error after confirming requested action to permanently delete selected items in search results from the trash folder.

Server Log: folder is neither spam or trash in all cases I checked.

Note: This seems like a pure server issue, we should either mark Trash/Spam Subfolders as TRASH or SPAM when created or traverse the tree and check if they're descendants of those when trying to finally delete.

vitoreiji commented 1 year ago

From another report, it seems the folders the mails were in had been deleted, but not the mails, i.e., the MailFolder instance was deleted, but not the Mail list. Actually I think I misunderstood the other report, I think you're right, @ganthern

vitoreiji commented 1 year ago
  1. Enable search
  2. Move (searchable) mail to custom folder
  3. Delete folder
  4. Search for mail, it will show up in results
  5. Try to delete mail
  6. See error
ganthern commented 1 year ago

This is now also tracked as server issue #1582