
Announcements
I have an App with around 35 screens that uses a custom connector to connect to multiple APIs to perform CRUD operations.
Also, almost all the screens are using Barcode Scanner control.
Sometimes I am seeing this message on the device as shown below. I have followed all the recommendations from MS and enabled the option to cache recently visited screens. There is no pattern for this issue, it happens only when the app goes in the background and I try to bring it in the foreground to access it.
I checked the JS Heap size on the browser, and it is maximum going upto 110 MB, not sure if this is ideal for powerapps ?
Does anyone have any idea what could be the reason for this and any possible solutions ? Thanks in advance.
Here is the official response received from Microsoft.
Issue:
The app Closed Unexpectedly
Resolution:
As we checked internally so here iOS Web Views are governed by the settings defined in Apple's Safari Browser, which by default has Intelligent Tracking Prevention (ITP) enabled and 3rd Party Cookies blocked. This means that any attempts to re-login the user silently might fail since cookies are dropped or their access prevented by ITP.
This security mechanisms are implemented on Safari, Braver and soon Chromium based Browsers (Edge and Chrome), since issuing refresh tokens via Browsers is considered a security concern. Cross-Site Scripting attacks can steal refresh tokens and use them until they expire. As a result, the first refresh token issue is only valid 24h (besides the initial token duration) after which the login requires user interaction. This behavior + ITP results in the experience the user is reporting.
At the moment there are no easy solutions for this behavior, silent authentication calls are a best effort scenario and might not be fulfilled. While programmatically (using MSAL libraries) this might be possible, the outcome will always be dictated by the Browser settings.
In short, you can try to uncheck 'Block 3rd Party Cookies" and uncheck 'Prevent Cross Site Tracking' in the Safari Settings, meaning Silent Authentication might go through since access to the Cookies will not be compromised.
https://learn.microsoft.com/en-us/troubleshoot/power-platform/power-apps/isolate-and-troubleshoot-common-issues/troubleshooting-startup-issues?tabs=safari-ios