Bug when deleting emails with file attachments

This is a serious bug (reported by me on Github) and needs fixing promptly.An error is seen every time you delete an email that has an attachment in it. The number of files attached is the same as the number of mentions of Communication XXXXYYY (id of file) not found

Installed Apps

ERPNext: v8.3.6 (master)
Frappe Framework: v8.3.10 (master)

If you delete an email/communication that has an attachment you always get an error message when it’s being deleted. There is no message on the console. I have already reported this on github but have further info to debug this much more clearly.

It’s only emails with attachments. At first I believed it was because of permissions on the file doctype that email attachments are of, but even allowing full permissions it makes no difference to getting this error.

This error is also seen on the free hosted account or demo erphnext.com account ie

ie Frappe Cloud Documents For User

in the menu in Setup, which makes this a bit clearer. If I click on an item in the Name column ie a file attachment from an email and Delete this, I receive an error in the console now please see the video below for proof

ie Uncaught TypeError : cannot read property ‘__islocal’ of undefined.
also Uncaught (in promise) TypeError : cannot read property ‘__islocal’ of undefined

Thanks for reporting it on github. We are looking into the same and will update the github issue accordingly.

Thank you

It took me a long time to work out exactly what the problem was.

Julian

@ArundhatiS are you still looking to fix this bug ? It’s been outstanding for a few months now as far as I remember