Offline app: sync error depending on user role

I have an offline application. I am currently connected to WiFi and able to log in as an Administrator. I receive all the required information on my tablet. So far so good. If I sign in with a User-account (i.e. no Admin user role) I can log in, but after log in I get the message: "A connection error occurred, please try again later" If I click the Synchronize button, I get the info message: "Mobile commonUnsuccessful synchronizationYour changes cannot be synchronized at this moment. They will be synchronized later." Is there a way to debug this? What could cause a connection error based on user roles?  
1 answers

Using the Chrome developer tools with my tablet connected to my pc I was able to do some debugging.

Apparently Mendix adds Xpath constraints toall entities to not send too much data to the tablet. However, these XPath can become quite large and time consuming, in our case resulting in a time-out.

The User could navigate to a flow where a client name was displayed. On synchronization, all clients which could be retrieved by any path would be sent to the tablet. We have multiple paths leading to the Client entity resulting in a huge XPath with multiple or statements.


I solved this by copying the Client name to a new entity only available in the offline part, minimizing the retrieval time and preventing the time out error.



This issue should no longer occur in Mx 7.11.

"We simplified data synchronization for applications. Previously, we tried to filter the data by analyzing your model, but as models get more complicated, this approach became complex as well. Now, all instances of entities used in offline applications will be synchronized to the local database. "