Open escatg opened 4 years ago
Thanks for reporting. Could you please provide a full sample (not code snippets) so I can reproduce?
As a workaround, you can redistribute your app in the way that nw.exe resides in the same directory tree of package.json.
Here is a minimal sample with which the bug can be reproduced on Windows. It can take several tries, but after the second window containing a webview closes, the temporary nw folder is often emptied.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
NWJS Version : 0.46.3 Operating System : Windows 10
Expected behavior
After removing a webview element from the DOM, we can create another one, add it to the DOM, and load the same page again into it.
Actual behavior
After the webview element is removed from the DOM and garbage collected, some or all files from the temporary directory (unzip of application files) are deleted. This means assets like css, images are missing and it is not possible to load the same page in a new webview.
We can see that as soon as the chromium process dedicated to the webview stops, the deletion starts. Procmon confirms it is nw.exe that is deleting files.
Could it be a result of that change a83eb54 from #5208 ?