Errors during Sync

As described earlier, Sync has four stages:

  1. Prepare the data to sync -- usually really quick. When this stage finishes, the Sync progress bar is about 1/4 complete.
  2. Send changes from the device to the backend -- when this stage finishes, the Sync progress bar is about 1/2 complete.
  3. Fetch the latest app definition and data from the backend -- after this stage, the Sync progress bar is about 3/4 complete.
  4. Prepare the data to run on the device -- usually really quick.

Most errors in Sync are observed in the second stage:

  1. If there are network errors, the step is retried a few times. If the failure persists, the Sync is halted. The solution is to retry later when connectivity is better.
  2. If you have poor connectivity or if large images have to be sent as part of the Sync, this step can take a long time and can potentially timeout. The solution is to retry later when connectivity is better.

You can always retry a failed Sync request.

 

If you have made changes in the app and Sync, you may see an error of the form: "Unable to update row in table 'Your-Table-Name. Execution of request failed: https://spreadsheets.google.com/feeds/cells/....... Unable to complete sync."

This error occurs when the AppSheet backend is unable to send your changes onto the cloud storage provider (in this case, Google Sheets). Almost always, this is because the request times out. If this error occurs often, it is usually a clear sign that there are complex cross-sheet formulas in the Google Sheet. Making a simple update to the sheet takes a lot of time to complete because all the formulas are recomputed by Google Sheets. You will need to simplify your Google Sheet, in particular avoiding some cross-sheet formulas.

 

This Change Cannot be Applied

The message "This change cannot be applied because there is a newer version of your app" is displayed if a client attempts to sync after the app definition has been changed on the server. For example, you will see this message if columns have been added or removed from a table and the client is not using the latest version of the application. The local changes queued on the device cannot be applied by the server when this happens.

You can verify this by comparing the client and server application version numbers. You can obtain the client application version number by clicking the menu at the top left and selecting 'About'. You can obtain the server application version number by opening the application in the Editor and going to the Info > Properties tab.

There are two possible remedies when this occurs:

  1. Restore the old version: The app creator can restore the client version of the app, explained here. This will work only if the underlying data sources (spreadsheets) column structure has not changed. Once the old version is restored, the sync should proceed successfully.
  2. Manual recovery: If you cannot restore the old version or are facing some other unrecoverable error, you will have to abandon the changes on the device.
    1. First capture the client's changes by clicking "Show Changes" in the "hamburger" menu at the top left of the mobile app. This will allow you to send yourself a copy of the changes via email, so that you can manually process the changes and add them to the spreadsheet.
    2. This will also create a copy of the changes in a special Recovery folder in the root folder for the app (in the app owner's cloud file system). 
    3. Back on the device, click "Reset Changes" in the menu. This will permanently discard the queued up changes and synchronize the app with the backend

 

Have more questions? Submit a request

0 Comments

Article is closed for comments.