question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Uncaught Error: Automatic publicPath is not supported in this browser

See original GitHub issue

Current 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:

image

This is the browser view when it doesn´t fail:

image

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:open
  • Created a year ago
  • Reactions:2
  • Comments:6

github_iconTop GitHub Comments

2reactions
bridziuscommented, Aug 24, 2022

The same issue can be observed with @nrwl/angular when building Module Federated apps.

1reaction
de-robatcommented, Dec 9, 2022

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

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found