Uncaught Error: Automatic publicPath is not supported in this browser
See original GitHub issueCurrent Behavior
Newly created application using the react preset randomly fails to load in Firefox
Steps to Reproduce
npx create-nx-workspace --preset=react
cd workspace
nx serve app
Opening http://localhost:4200/
in Firefox and reloading several times results in the mentioned error almost half of the time.
The issue does not seem to occur in Chrome.
Failure Logs
Uncaught Error: Automatic publicPath is not supported in this browser
<anonymous> publicPath:14
<anonymous> runtime.js:630
<anonymous> runtime.js:1326
This is the browser view when it fails:
This is the browser view when it doesn´t fail:
Environment
> NX Report complete - copy this into the issue template
Node : 16.15.0
OS : linux x64
npm : 8.5.5
nx : 14.1.1
@nrwl/angular : Not Found
@nrwl/cypress : 14.1.1
@nrwl/detox : Not Found
@nrwl/devkit : 14.1.1
@nrwl/eslint-plugin-nx : 14.1.1
@nrwl/express : Not Found
@nrwl/jest : 14.1.1
@nrwl/js : 14.1.1
@nrwl/linter : 14.1.1
@nrwl/nest : Not Found
@nrwl/next : Not Found
@nrwl/node : Not Found
@nrwl/nx-cloud : Not Found
@nrwl/nx-plugin : Not Found
@nrwl/react : 14.1.1
@nrwl/react-native : Not Found
@nrwl/schematics : Not Found
@nrwl/storybook : 14.1.1
@nrwl/web : 14.1.1
@nrwl/workspace : 14.1.1
typescript : 4.6.4
rxjs : 6.6.7
---------------------------------------
Community plugins:
Issue Analytics
- State:
- Created a year ago
- Reactions:2
- Comments:6
Top Results From Across the Web
Webpack5 Automatic publicPath is not supported in this browser
The error is caused by a bug in mini-css-extract-plugin 1.3.8 and lower in combination ...
Read more >Automatic publicPath is not supported in this browser - sage
The error shows in the chrome inspect and it says Automatic publicPath is not supported in this browser. But when I remove my...
Read more >Webpack5 Automatic publicPath is not supported in this browser
CSS : Webpack5 Automatic publicPath is not supported in this browser [ Beautify Your Computer : https://www.hows.tech/p/recommended.html ] ...
Read more >Webpack5 Automatic publicPath is not supported in this browser
JavaScript : Webpack5 Automatic publicPath is not supported in this browser [ Gift : Animated Search Engine : https://bit.ly/AnimSearch ] ...
Read more >Webpack5 Automatic publicPath is not supported in this browser
at E:\maktab\Control-panel\newcontrol\final-control\node_modules\css-loader\dist\cjs.js! the error is from the font file bath in fonts.scss. @font-face { font- ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
The same issue can be observed with
@nrwl/angular
when building Module Federated apps.i expierienced a similar issue today, debugging showed that the runtime tries to autodetect the baseurl in the following way: if no public path has been set, then fetch all script tags from the document, get the src attribute of the last script tag you find and take its url to determine the base domain.
i now happen to have a inline scripttag as my last scripttag (injected script from my analytics tag manager) - therefore the error surfaced. the issue is, it sometime did load and it sometimes didn’t as the injection was provoking a racecondition scenario. Just wanted to leave this hear, just in case it helps someone else