You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: support/dynamics-365/field-service/mobile-app/webview-reset.md
+9-7Lines changed: 9 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,24 +15,26 @@ A WebView reset error while using Field Service Mobile indicates that the code w
15
15
16
16
## The Root Cause
17
17
18
-
A WebView reset occurs when the mobile operating system terminates an application process that is consuming too much memory. The threshold for "too much memory" varies by device and operating system and can affect how reliably the issue can be reproduced on a device. The WebView Reset error dialog is specific to iOS, which runs WebViews on separate, terminable processes outside of the core mobile application process. When this WebView process consumes more memory than the operating system tolerates, the WebView process is terminated. After the mobile system terminates the process to reclaim memory the mobile application detects the loss of the WebView and restarts it, showing a message to the user indicating a WebView Reset occurred. On Android, the WebView isn't run on a separate process so the entire application process is terminated, resulting in an application crash. WebView resets do not occur when using the application on a Desktop browser, however the memory pressure buildup can still be present and investigated in this context.
19
-
It's important to be aware of the impact that poor memory management practices can have on the application experience as you author customizations within the application.
18
+
A WebView reset occurs when the mobile operating system terminates an application process that consumes too much memory. The threshold for "too much memory" varies by device and operating system and can affect how reliably the issue can be reproduced on a device. The WebView Reset error dialog is specific to iOS, which runs WebViews on separate, terminable processes outside of the core mobile application process. When this WebView process consumes more memory than the operating system tolerates, the WebView process is terminated. After the mobile system terminates the process to reclaim memory, the mobile application detects the loss of the WebView and restarts it, showing a message to the user indicating a WebView Reset occurred. On Android, the WebView isn't run on a separate process, so the entire application process is terminated, resulting in an application crash. WebView resets don't occur when using the application on a desktop browser, however the memory pressure buildup can still be present and investigated in this context.
19
+
20
+
> [!IMPORTANT]
21
+
> Poor memory management practices can affect the application experience when you create customizations.
20
22
21
23
## Memory Pressure
22
24
23
25
There are two common causes of memory pressure buildup to be aware of.
24
26
25
-
**Memory Spike** – A memory spike is when a large object is allocated into the WebView process and causes an immediate spike in memory usage. Examples can include storing Base64 representations of images and videos in variables within Power Apps Component Framework controls and Web Resources or utilizing JavaScript libraries that import large resource files like font libraries. If you can reliably reproduce a WebView reset through an action like opening a specific form or interacting with a specific control, you're likely encountering a memory spike.
27
+
**Memory Spike** – A memory spike is when a large object is allocated into the WebView process and causes an immediate spike in memory usage. Examples include storing Base64 representations of images and videos in variables within Power Apps Component Framework controls and Web Resources or utilizing JavaScript libraries that import large resource files like font libraries. If you can reliably reproduce a WebView reset through an action like opening a specific form or interacting with a specific control, you're likely encountering a memory spike.
26
28
27
-
**Memory Leaks** – A memory leak is when memory is allocated within the WebView process but isn't cleaned up when no longer needed due to dangling pointers and references preventing garbage collection from reclaiming the allocated memory. This causes memory pressure buildup over time that can lead to a WebView reset. Examples include adding event listeners to the window object in Javascript but not removing them when navigating away. If you can't reliably reproduce a WebView reset and seem to experience them at random while doing different activities within the application, you're likely encountering a memory leak in the previous activities that you were performing before the reset.
29
+
**Memory Leaks** – A memory leak is when memory is allocated within the WebView process but isn't cleaned up when no longer needed due to dangling pointers and references preventing garbage collection from reclaiming the allocated memory. This causes memory pressure buildup over time that can lead to a WebView reset. Examples include adding event listeners to the window object in JavaScript but not removing them when navigating away. If you can't reliably reproduce a WebView reset and seem to experience them at random while doing different activities within the application, you're likely encountering a memory leak in the previous activities that you performed before the reset.
28
30
29
31
## Debugging Memory Pressure
30
32
31
-
The WebView reset error itself is specific to iOS applications running WebViews and can only be reproduced within that context, however any code causing memory pressure on mobile causes memory pressure buildup on desktop browsers as well. This enables investigation of the root cause of a WebView reset using browser debug tools, like those provided by Microsoft Edge for tracking memory usage: [Fix memory problems - Microsoft Edge Developer documentation](/microsoft-edge/devtools-guide-chromium/memory-problems/)
33
+
The WebView reset error itself is specific to iOS applications running WebViews and can only be reproduced within that context. However, code that causes memory pressure on mobile also causes memory pressure buildup on desktop browsers. You can investigate the root cause of a WebView reset by using browser debug tools, like those provided by Microsoft Edge for tracking memory usage. Learn more in [Fix memory problems - Microsoft Edge Developer documentation](/microsoft-edge/devtools-guide-chromium/memory-problems/).
32
34
33
-
These debugging tools are also available on mobile devices if needed: [Debugging JavaScript Code in Model-Driven Apps](/power-apps/developer/model-driven-apps/clientapi/debug-javascript-code)
35
+
You can also use these debugging tools on mobile devices: [Debugging JavaScript Code in Model-Driven Apps](/power-apps/developer/model-driven-apps/clientapi/debug-javascript-code).
34
36
35
-
When debugging memory issues on iOS directly, Safari memory analysis tools enable you to identify the memory performance of the app module: [Timelines Tab](https://webkit.org/web-inspector/timelines-tab/)
37
+
Use Safari memory analysis tools to check the memory performance of your iOS app module. Learn more in [Timelines Tab](https://webkit.org/web-inspector/timelines-tab/).
0 commit comments