Error: no entity to update: app - Firestore Cloud Function
Most likely, the document for event.data.uid
does not exist. The documentation for update() states:
The update will fail if applied to a document that does not exist.
Use set() instead.