web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Mobile app - Error whe...
Power Apps
Unanswered

Mobile app - Error when trying to retrieve data from network (occasionally)

(0) ShareShare
ReportReport
Posted on by 96

Hello everyone - 

 

Some background:  

PowerApps Mobile app

Using SqlServer for the Data Layer

I have on the app level IfError to catch any exceptions 

I don't get a huge amount of data - it's very small and filtered - possibly 10 rows of data - 

I have also checked on the home screen the "Connection.Connected" status to make sure the user is connected.

 

But occasionally the user will be in an area where the data has issues retrieving, it could be coverage or other problems - 

many of the examples I've seen are consistent errors like filters.

 

I'm wondering if there's been anyone that has looked at using a TryCatch Retry logic on scenarios like this?  

Like --- try up to 3 times and then give up - but place a user friendly message on the screen to try again later or exit to the 

main screen?

 

I didn't see that on the Connections themselves (unless I missed something).

 

Please share your experience and steps you've taken, it's much appreciated.  

Categories:
  • Kuhlani Profile Picture
    82 on at

    As I recall, Connetion.Connected does not give you a good indication of signal quality. 

     

    I've seen recently Connection.Sync popped-up (late last year) which can help you know more about the quality of the connection and make the decision to take the data/request in offline-mode then go online to sync when needed - or at least give the user a better offline mode indicator. 

     

    There is good information about Connection.Sync here: 

    View offline sync status - Power Apps | Microsoft Learn 

     

    You can start from Mobile offline overview - Power Apps | Microsoft Learn

    for deep-dive if you'd like to cover the topic end-to-end and explore new offline features.

  • VishalJhaveri Profile Picture
    1,169 Moderator on at

    Working on Canvas Apps for more than 10,000 hours, I have faced this issue manier times and it is mainly because of the internal issues. This can be resolved on its own after closing and opening the application after certain interval of time.

  • markinwaukesha Profile Picture
    96 on at

    Hi @Kuhlani   when I tried that solution I got the message that it's only available for apps that are

    set for "offline mode"  which requires you to use dataverse.    My database and integrations are all

    built into SqlServer so it would be a large life to move it over.    

     

    I thought about building a custom connector but haven't taken that route yet that would probably be the

    next step.     For now what I have done is added many "If Error" checks into all the Patch, Refresh, ClearCollect - 

    basically anything over the network -  and also included timer and other behavior to check Connection connect

    status.

    Retry is built into the PowerAutomate connections I believe but not on the PowerApps mobile side yet. --  

    There are advantages and disadvantages to using dataverse so for now I am sticking with the SqlServer db.

     

    Thanks for your message 

  • markinwaukesha Profile Picture
    96 on at

    Hi @VishalJhaveri   Agreed what I did, and I mentioned to @Kuhlani also is put checks onto any network

    calls that can be made using IfError  - and also checking the Connection connect status   

    I put a user message up notifying them of the status  - I put a check on Connection for the onVisible, and also

    added a Timer check for it.    Then on the page for the "refresh, clearcollect, patch" events I put the try catch 

    around it so I can gracefully handle it. 

    I have many users also that never close the app, or they have changed their password however don't update

    the Powerapps -  so I have some creative screens to try to handle such conditions.     Eventually I link them

    to a SharePoint where I have a User Document and FAQ to help them out -  such as re-opening the app, closing

    it fully, or even trying again later.    

    Many of the users don't realize that the mobile app uses mobile data so there can be latency and connection

    issues.   I saw the offline mode come available but I have everything built into SqlServer so I am unable to 

    easily shift it there to take advantage of it.   

    For now I am watching the Azure App Insights Dashboards and logs and it seems the Try-Catch I put in there 

    and user messages is working out since the Error counts and traces have been reduced significantly.

     

    Thank you for the reply, much appreciated

  • Kuhlani Profile Picture
    82 on at

    @markinwaukesha I haven't played with the new offline sync. I did it the "classic" way. But what got my attention is that now we have more options for the connection quality. And I totally understand your use case where you have data store out of Dataverse.

     

    Here is a possible workaround - keeping in mind that the objective here is just to get more signal quality options:

     

    • Create one table in Dataverse (the sync table) - Let's say it just captures sync errors.
    • If your app is in a solution, the new offline mode will be available to turn on.
    • When you turn it on, nothing will happen until you add the Dataverse table that you can take offline (Keep the other data sources).

    Now, the new Connection.Sync should be functional although just for the Dataverse table. My thought is that connection quality, is connection quality at the end point regardless of the endpoint you're working with. (big assumption 😄)  

     

    The switch statement below is from the test I did - This was deployed automatically on a modern control (header) when I added the table.

     

    Kuhlani_0-1714456390704.png

    Now you can try to use the Connection.Sync enum while processing the sync. I believe, the relevant ones to avoid sync when present are the ones underlined in the table below. The rest are more relevant for Dataverse.

     

    Kuhlani_1-1714456966004.png

     

    Is it worth the efforts to get two more states of connection quality? "ConnectedWithWarning" and "ConnectedError"? Not sure of the effort you need to apply. Just a potential workaround that hopefully works for you.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 236 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 188 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 130

Last 30 days Overall leaderboard