Case not created: System.QueryException: List has no rows for assignment to SObject
You are processing emails via Email to Case Premium and receive an email with the following error message:
An error occurred while trying to deliver the attached email.
You may wish to report the following information to the owner of email@example.com.
The apex class E2CP.ProcessMessage failed due to: System.QueryException: List has no rows for assignment to SObject
Check to make sure the context user does not lose read and write access to the case after initial insert. This can occur in organizations that have a private sharing model for cases and not using a context user with permissions to Modify All cases. If your organization has recently made changes in the role hierarchy, sharing rules or other security related changes, that is likely the culprit.
Because E2CP updates cases just after they are initially inserted as a part of processing, and when subsequent emails are received, the context user must retain read and write access at all times.
This is by design given Salesforce platform security features.