85
Views
3
Comments
'Offline mode' errors
Application Type
Mobile

Hi!

I've tried hard to create allow my app to work offline, without detrimental user experience.

For example, most data served is served via local storage. And I've managed to get offline sync functionality working ok. Where server calls or connectivity is required, I've used  the GetNetworkStatus.IsOnline pattern, and not made the calls if the device isn't online.

I've checked every client and server action, and made sure all of the storage operations are local and not remote, but my app is filled with "Request failed with an error" messages.

The detail in the Service Centre Error Logs are vague, such as this:

MessageRequest failed with an error

Environment InformationeSpaceVer: Id=7261, PubId=0, CompiledWith=11.17.0.36291RequestUrl: https://personal-4plka1hb.outsystemscloud.com/EDApp/moduleservices/log?clientTimeInMillis=1669544363825 (Method: POST)AppDomain: /LM/W3SVC/7/ROOT/EDApp-31-133139897912004209FilePath: C:\OutSystems\Sandboxes\YTPMX8004\Platform Server\running\EDApp\ClientIp: 94.10.165.242DeviceUUID: f2801418bb00c474Locale: en-USDateFormat: dd-MM-yyyyPID: 18160 ('w3wp', Started='11/26/2022 10:00:33 PM', Priv=821Mb, Virt=2115873Mb)TID: 217Thread Name:.NET: 4.0.30319.42000Client Runtime Packages: client-runtime-core= 3.26.0;client-runtime-view-framework-react= 3.4.0;client-runtime-widgets= 3.8.0;DeviceModel: Pixel 7 ProDeviceUUID: f2801418bb00c474OperatingSystem: Android 13NativeShell: 11.3.3AppVersionCode: 148AppVersionName: 1.50NetworkStatus: OfflineCordova: 10.1.1Client-Side Log

StackCommunicationException: Request failed with an error    at c.onError (https://personal-4plka1hb.outsystemscloud.com/EDApp/scripts/OutSystems.js?1nhYy7PiFzKULqzn_dhH3g:3:7308)    at XMLHttpRequest. (https://personal-4plka1hb.outsystemscloud.com/EDApp/scripts/OutSystems.js?1nhYy7PiFzKULqzn_dhH3g:3:2648)

Is there a way I can identify the process, so I can hopefully handle it, and the errors in a way that doesn't look bad to the user?

I should say, functionally, the app works well and displays everything I want it to, even with the errors!

Thanks

2022-08-03 04-32-50
Ravi Punjwani

Hi Leigh,

If you can regenerate this error with some actions it would be easier to find out the cause.

Connect your device and debug it on Google Chrome. Perform some UI actions. It should show some network activity which can help you find out the root cause.

2021-11-22 00-14-28
Leigh Rogers

Thank you.
I'm not sure how to do this, so it's going to take me a few days to figure it out and get it done. 
Will update when I do.
Thanks

2022-08-03 04-32-50
Ravi Punjwani

Hi Leigh,

Here's a quick guide on how to do it and avoid spending days on this. It shouldn't take too long to gather the logs.

https://developer.chrome.com/docs/devtools/remote-debugging/

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.