Skip to content

Commit 1e15284

Browse files
authored
Update webview-reset.md
1 parent 6170d13 commit 1e15284

1 file changed

Lines changed: 10 additions & 10 deletions

File tree

support/dynamics-365/field-service/mobile-app/webview-reset.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13,28 +13,28 @@ This article helps you troubleshoot and resolve issues in the [Dynamics 365 Fiel
1313

1414
# WebView Reset overview
1515

16-
A WebView reset error while using Field Service Mobile indicates that too much memory is being consumed by code within the app module. The cause of a WebView reset is the activity that precedes it which causes memory pressure on the WebView process. Model-driven Applications in Power Apps (like Field Service) are web applications that are run within a WebView on the mobile client, leaving them susceptible to memory management policies that mobile operating systems impose on these processes.
16+
A WebView reset error while using Field Service Mobile indicates that the code within the app module is using. The cause of a WebView reset is the activity that precedes it, which causes memory pressure on the WebView process. Model-driven Applications in Power Apps like Field Service are web applications that are run within a WebView on the mobile client. This leaves them susceptible to memory management policies that mobile operating systems impose on these processes.
1717

1818
## The Root Cause
1919

20-
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 has occurred. On Android the WebView is not 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 build up can still be present and investigated in this context.
21-
It is 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.
20+
A WebView reset occurs when the mobile operating system terminates an application process that is consuming too much memory. The threshold for The character 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.
21+
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.
2222

2323
## Memory Pressure
2424

25-
There are two common causes of memory pressure build-up to be aware of.
25+
There are two common causes of memory pressure buildup to be aware of.
2626

27-
**Memory Spike**This 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 PCF 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 are likely encountering a memory spike. <br/>
28-
**Memory Leaks**This is when memory is allocated within the WebView process but is not cleaned up when no longer needed due to dangling pointers and references preventing garbage collection from reclaiming the allocated memory. This causes memory pressure build-up 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 cannot reliably reproduce a WebView reset and seem to experience them at random while doing different activities within the application, you are likely encountering a memory leak in the previous activities that you were performing prior to the reset.
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 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. <br/>
28+
**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.
2929

3030
## Debugging Memory Pressure
3131

32-
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 will also cause memory pressure build-up on desktop browsers. This enables investigation of the root cause of a WebView reset using browser debug tools, like those provided by Edge for tracking memory usage: [Fix memory problems - Microsoft Edge Developer documentation](https://learn.microsoft.com/en-us/microsoft-edge/devtools-guide-chromium/memory-problems/) <br/>
33-
These debugging tools are also available on mobile devices if needed: [Debugging Javascript Code in Model-Driven Apps](https://learn.microsoft.com/en-us/power-apps/developer/model-driven-apps/clientapi/debug-javascript-code) <br/>
34-
When debugging memory issues on iOS using the mobile debugging documentation linked above, Safari memory analysis tools will enable you to identify the memory performance of the app module: [Timelines Tab](https://webkit.org/web-inspector/timelines-tab/)
32+
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](https://learn.microsoft.com/en-us/microsoft-edge/devtools-guide-chromium/memory-problems/) <br/>
33+
These debugging tools are also available on mobile devices if needed: [Debugging JavaScript Code in Model-Driven Apps](https://learn.microsoft.com/en-us/power-apps/developer/model-driven-apps/clientapi/debug-javascript-code) <br/>
34+
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/)
3535

3636
## Related content
3737

38-
- [Debugging Javascript Code in Model-Driven Apps](https://learn.microsoft.com/en-us/power-apps/developer/model-driven-apps/clientapi/debug-javascript-code)
38+
- [Debugging JavaScript Code in Model-Driven Apps](https://learn.microsoft.com/en-us/power-apps/developer/model-driven-apps/clientapi/debug-javascript-code)
3939
- [Fix memory problems - Microsoft Edge Developer documentation](https://learn.microsoft.com/en-us/microsoft-edge/devtools-guide-chromium/memory-problems/)
4040
- [Performance considerations when customizing the mobile app](/dynamics365/field-service/mobile/improve-mobile-performance)

0 commit comments

Comments
 (0)