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
So far our QA team has only reported this issue on Android.
Current Behavior
It seems the capacitor local web server returns 404 status for empty files, even if the file exists, so I get an error to say the the CSS chunk load failed. With webpack and code splitting, this can prevent parts of the app from loading.
The file does exist in my bundle but is a blank file. My webpack build apparently produces some empty CSS files - why, I'm not sure, but if it affects me it could affect other users.
Expected Behavior
The return status should be 200 OK with Content-Length: 0.
Code Reproduction
Add an empty CSS file to your public directory. To your html file, add a <link rel="stylesheet" type="text/css" href="emptyfile.css">. You will notice that the request fails and the chrome Network Tools tab says that the response code is "404 OK".
Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Capacitor, please create a new issue and ensure the template is fully filled out.
Bug Report
Capacitor Version
Platform(s)
So far our QA team has only reported this issue on Android.
Current Behavior
It seems the capacitor local web server returns 404 status for empty files, even if the file exists, so I get an error to say the the CSS chunk load failed. With webpack and code splitting, this can prevent parts of the app from loading.
The file does exist in my bundle but is a blank file. My webpack build apparently produces some empty CSS files - why, I'm not sure, but if it affects me it could affect other users.
Expected Behavior
The return status should be
200 OK
withContent-Length: 0
.Code Reproduction
Add an empty CSS file to your
public
directory. To your html file, add a<link rel="stylesheet" type="text/css" href="emptyfile.css">
. You will notice that the request fails and the chrome Network Tools tab says that the response code is "404 OK".Other Technical Details
npm --version
output: 6.14.5node --version
output: v12.18.2pod --version
output (iOS issues only):Additional Context
I guess the cause is this:
https://github.com/ionic-team/capacitor/blob/main/android/capacitor/src/main/java/com/getcapacitor/WebViewLocalServer.java#L393
The text was updated successfully, but these errors were encountered: