Issues when sync times are very long (120sec+)

I’ve got a particually big app with sync times in excess of 2 mins. Because its so slow we are noticing a coupe of things that might not show up if it was quicker.

On iPhones, the app does not use the internet when the App is minimised
We have 30ish people who submit timesheets. They submit at least one per day, sometimes more. Inside each timesheet there wil be 1 to 10 items in a subtable. What we’ve seen is delays of 3-4 days from someone creating a timeentry to it showing up in google sheets. We know its delayed because we have creation column of Now(), which might have been Thursday. Yet in the spreadsheets it’s mixed in with everyone elses Monday timesheets

Browser tabs don’t work when minimised
We have a multistage action that copies 200+ items in sheet A to sheet B depending on some data in Sheet C (where the action is call). This thing chugs along and takes maybe 5 to 10mins to create those 200 rows. If the user has 2 tabs open in switches to a different one then the above process seems to become paused

Sum(Select(… commands fail do not work
As I said above, the user creates a timesheet. Then in a subtable they list the items they have fitted that day. We have a formula that has to check this item against currently 7000 other items that all the other App users have fitted. To make sure that 2 people can’t both say they fitted the same item. In a browser this works fine. But from the phones we get 10-20 entires per week where the user has been able to create a duplicate of someone else’s work. Its like the phone app reads the table and cannot see the work other people have done. Could this be because background sync doesn’t work when the App is minimised on a phone?

Has anyone else seen anything similar?

0 24 643
24 REPLIES 24

As far as I know background sync is not working on mobile app, but only on pc with browser but while this user keeps app open with the browser.

This would explain it of so. @Steve, @Aleksi is this correct?

“Background sync” is a confusing term.

An AppSheet app does NOTHING if the app isn’t on-screen.

The “background” in “background sync” means a sync can occur “in the background”/“behind the scenes” as you use the app, without the disruption we have to sit through when we explicitly tap the sync button. Background sync includes the sending of queued data changes to the server, and receiving data updates from the server (including recomputed virtual columns), but does NOT include app updates (as far as I can tell).

I knew about the background sync every 30mins. But this is news to me. I was under the assumption that so long as the App is open somewhere on the phone then it would do a sync every 30mins or so. Ditto a browser page.

Updates aren’t an issue here. Its more about getting up to date data

Hmmm. Well this isn’t good then! I knew Appsheet didn’t work with ‘live’ data as such. But this could mean that we can’t trust any data unless a full sync has been done

Not as I understand it. A mobile app in the background is suspended. This is true for most mobile apps.

A desktop browser is not automatically suspended when not in focus, so it remains running and will continue to update.

I have no idea how you drew this conclusion.

What I meant by “…can’t trust and data…” is that if the app is quite slow and the user is fairly fast then, as I’m seeing, the app has barely enough time to upload its own changes and never gets the chance to download new data. Therefore any calculations which rely on data from other App users will be unreliable because there is a very good chance that data will not be there.

Yes, absolutely true.

@tsuji_koichi Why do you think that it would not work with mobile? As far as I know it’s working with mobile devices as well… though this is easy to test.

I made a quick test. App has both options “Delayed sync” and “Automatic updates” ON and I made an update with the laptop/browser. Then after 30 minutes I opened the mobile device where the app was already opened and the record was not updated on the screen. When changing the app’s view and then back to original app view, the update was refreshed without sync.

I’m not sure I follow your process exactly. So you made a change on a browser then you opened a “device”. Do you mean the same PC, browser or an App on something else?

Updated the post

So your saying that mobiles do (or at least should) a background sync for new data? If so then we have a few iPhone users with something blocking this

It should work in a same way with both Android and iOS. And it should work with the adds in the same way than with updates. I made a test with Android.

Hi Aleksi,

Sorry, my preception was wrong indeed.

We also tested here. Update the row from web app. Then leace them as they are for around 30 min.
Open the mobile app which was running on the background (not physically closed) . Upon opening the view, the change was not refrected, but around 30ish second after we open the app, the change was shown without manual sync.
We tested both Androix and iOS for your guidance.

@Takuya_Miyai

@tsuji_koichi No worries

Any chance you have the option “Delta sync” set as OFF?

Sync on start = ON
Delayed Sync = ON
Automatic Updates = ON
App can start offline = OFF
Store content for offline use = OFF
Server Caching = ON
Delta Sync = ON

Please check what happens if you set the Delta sync to OFF.

Ratatosk
Participant V

In my experience you need to:

  • Split the app up into multiple apps where possible. With a menu inside all apps that are the same. This also ensures that the user is in sync when jumping between apps.
  • Force sync where syncronized data is crucial.
  • Offload much of the complex behavior (like copying large datasets between sheets) to apps script.
  • Apps script is your best friend. It is so worth it to have it in your tool kit.
  • Did I mention apps script?

The app has 30 users on a $10 license. I don’t think my client would like to see that cost double or triple

With sync times of almost 2mins this would be impractical

We are looking to push some of the timeconsuming aspects of this into Reports calling Actions. Rather than Actions calling Workflows. But this is a big rewrite

Understood. But It’s not something I’m familar with. Its on my to-do list to learn

But if your client is paying $10 for 30 users they could use any number of apps, since he’s paying per user and not per app

Do we know if Appsheet has any cut off time for either normal or background syncs? Where if a sync hasn’t completed after a period of time it simply terminates and tries again later

I don’t know.

Sync time for 2 mins is just too much significant, better to review your app materially.
If I m app use for that app, I probably wont use.

Top Labels in this Space