Description
What were you trying to do?
I was attempting to update the version of installed NativePHP software on Windows 11.
What happened?
The Update went well right until the software started. The JS Client fails due to %appdata%\APPNAME\storage
being outdated. Deleting the storage folder while the app was closed fixed the issue but expecting administration to manually delete files on end user PCs just to update software is unreasonable.
How to reproduce the bug
- Create an app with NATIVEPHP_APP_VERSION=1.0.0 and a Bootstrap 5.x frontend.
- Build with wine32 on Linux
- Install in Windows VM
- Update APP to version 1.1.0
- Install in Windows VM (uninstalling previous does not change the outcome, the
%appdata%
persists as it should).
Results in: Client side Javascript errors for Bootstrap.
Results in: outdated View. View also links to invalid/outdated Javascript which first made me think it was a JS cache issue. It is a view cache issue.
Package Versions
^0.8.5 -> latest | old version was 0.7.4
PHP Version
^8.3.0
Laravel Version
^11.31
Node Version
latest
Which operating systems have you seen this occur on?
Windows
OS version
Windows 11
Notes
- I will provide you with reproducible binaries within the next few days if the issue is not known.
A simple solution would have the installer force delete %appdata%\APPNAME\storage
since it may contain outdated bundled files and views. The storage gets rebuilt automatically on app launch.
The current attempt to hijack bootstrap/app.php to automagically delete storage on version mismatch with a version.txt to compare has failed so far.