How to replicate the following error: Tried to overwrite existing file object

Hi,

I have caught this error from a user of our offline mobile app.

However, I can’t seem to figure out how the user was able to generate this error and have tried to replicate it manually on a dummy class by for instance deleting the row in the database and then persisting the same updated row into the database again or tampering with the file content.
It was unsuccessful. I have seen the error before also in other contexts.

Can anybody in the Appfarm dev team shed some light on how technically the error can occur?

Kind regards
Torgeir

Hi,

This error should be thrown if you attempt to persist an already persisted fileObject. Upload Complete on your fileObject must be true for the error to be thrown.

// Erik

1 Like

Could I call you later today? Need like 5 min for some questions about this.

Hi,

I’m not available for a call at the moment, but you can reach out to us at support@appfarm.com :smile:

// Erik

1 Like

Noted. Thanks for the help and the quick reply :wink: