race condition when saving 1:1 references from client
I have a specialized FileDocument “CoverPdf” and I will only have write access if has a non-empty 1:1 reference to the form object which I own “CoverZipHelper”. Here’s the access rule: [Cover.CoverZipHelper_PdfFile/Cover.CoverZipHelper/System.owner = '[%CurrentUser%]'] I’m using the File Dropper widget to upload it and it fails randomly 1 time out of 10 with a pop-up: Error saving files! Error: Network Error In the browser dev tools I see that the instantiate and commit requests succeeded, but the POST request was forcibly closed on the server side. In the Studio Console I see Uploading file failed: Write access denied for member 'Name' of object 'Cover.CoverPdf' [User 'demo_covervendor' with session id 'a37bc3df-XXXX-XXXX-XXXX-XXXXXXXXf97c' and roles 'CoverVendor'] The commit request DOES include the non-empty reference and the POST request starts AFTER the commit request returned. Why is this happening?
The error indicates access violation of the attribute Name of Cover.CoverPdf (inherited). Does the user has write rights on that attribute? Does the situation occurs when the name has been changed?