Reproduction Behavior
- Install multiple supported extensions in the browser, which can be Chrome extensions or Firefox extensions (for example: [Extension A, Extension B, Extension C, Extension D, Extension E]).
- Open a webpage (for example https://example.com) and verify that all extensions are functioning normally.
- Switch the browser to the background and keep it running for several hours (ensure that the browser is not force-closed by the iOS app switcher). More aggressive actions can be taken, such as running a large game or opening the camera app for 4K video recording during this time to ensure that the issue can be reproduced, as such actions consume more memory. However, based on my actual experience, switching between several apps often reproduces the issue.
- Return to the browser and observe the following issues:
- Do all open tabs automatically refresh (possibly due to iOS system memory management causing tab discarding)?
- Subsequently, some or all extensions become ineffective, specifically manifested as:
- Sometimes three extensions fail;
- Sometimes two extensions fail;
- Sometimes all extensions fail;
- The failed extensions are random and not fixed to any specific extension or type of functionality.
- Failure means, as seen in the video: the extension cannot open and its functionality is lost, but some extensions can open but their functionality is still ineffective.
- The failed functionality is manifested as having no effect or being unable to inject into the page, such as the extension's content scripts, injected content elements, or other functions not running.
- Please note: manually refreshing the webpage does not restore the functionality of the failed extensions.
- The only way to restore the extensions is:
- Restart the entire browser, or:
- Open the extension management page, disable and re-enable these extensions; of course, both operations are quite cumbersome.
Supplementary Note
1: Irrelevance of Power Saving Mode
- Whether the power-saving mode in the browser settings is turned on or off, the issue still occurs.
- This indicates that the problem does not depend on the power-saving mode, but is more likely related to iOS's background memory management mechanism or the browser's compatibility handling of extensions.
Supplementary Note 2: Randomness
- The number of failed extensions and which specific extensions fail are not fixed each time the issue is reproduced:
- Even when reproducing the test under the same conditions, the combination of failed extensions may still vary each time.
- For example, in one test, extensions A, B, and C may fail, while extensions D and E continue to work; but in another test, it may be extensions A and D that fail, while the remaining extensions function normally.
- When tested multiple times, there are also cases where all extensions fail simultaneously, with all extensions failing being the most common occurrence.
Analysis (Possible Reasons)
iOS system's memory management mechanism and background resource recycling:
* To save device resources, the iOS system may discard some memory-occupying resources (including the extension processes or tab states loaded in the browser) when the application is in the background.
* When the browser is restored from the background to the foreground, the tabs are reloaded, but the extension services may not be correctly initialized or restored.
Expected Behavior
- Stable recovery of extension services:
- When a tab is refreshed or reloaded, all installed extensions should resume normal operation on their corresponding pages:
- Content Scripts should automatically re-inject to enable extension functionality.
- The extension's Service Workers or background processes should be correctly restored to ensure normal communication between extension functionality and the page.
- Regardless of the complexity or number of extensions, all extensions should consistently recover and avoid random failures.
- Consistent extension compatibility management:
- Orion should ensure that different extensions can coordinate and consistently restore functionality during page lifecycle events (such as tab refresh, background switching, reloading), avoiding partial or complete failures.
- Elimination of random failure phenomena:
- The recovery of extension functionality should not be affected by randomness; users should not see unpredictable behavior where certain extensions work at specific times while others fail. (This phenomenon is also reported by most users as extensions occasionally failing.)
- No user intervention required:
- Refreshing or automatically reloading a tab should not require users to manually disable/enable extensions to resolve the issue.
- Users should not need to restart the browser to reactivate extension functionality.
1.3.15 (5)
18