Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Angular app doesn't work on Firefox after updating it to Version 8

Tags:

We have updated an Angular app from version 7.2 to version 8. The update process has worked so far and the app can be used locally and in prod mode (on the server) on Chrome, Firefox Developer Edition, Safari, Opera as usual.

But in the normal Firefox browser and Waterfox, the app does not work:

  • The app tries to render while the browser shows the status "Performing a tls handshake to localhost", until at some point a "The connection has timed out" comes.
  • In prod mode, after I have deployed the app, at least the login mask shows up but the performance of the app is so bad that hardly nothing works.

We have created a browserlist file with the following content:

# This file is used by the build system to adjust CSS and JS output to support the specified browsers below.
# For additional information regarding the format and rule options, please see:
# https://github.com/browserslist/browserslist#queries

# You can see what browsers were selected by your queries by running:
# npx browserslist

> 0.5%
last 2 versions
Firefox ESR
not dead
not IE 9-11 # For IE 9-11 support, remove 'not'.

Our tsconfig looks like this:

{
  "compileOnSave": false,
  "compilerOptions": {
    "downlevelIteration": true,
    "importHelpers": true,
    "outDir": "./dist/out-tsc",
    "baseUrl": "src",
    "sourceMap": true,
    "declaration": false,
    "moduleResolution": "node",
    "emitDecoratorMetadata": true,
    "experimentalDecorators": true,
    "target": "es2015",
    "typeRoots": [
      "Node_modules / @ types"
    ]
    "lib": [
      "ES2016"
      "Dom"
    ]
    "module": "esnext"
  }
}

And the area with the ssl configuration inside the angular.json so:

  "serve": {
    "builder": "@angular-devkit/build-angular:dev-server",
    "options": {
      "browserTarget": "farm-management-ui:build",
      "port": 8080,
      "ssl": true,
      "proxyConfig": "src/proxy.conf.js"
    },

We have already successfully executed the following commands:

ng update @ angular / cli --from 7 --to 8 --migrate - only

ng update @ angular / core - from 7 - to 8 --migrate-only

And I have the feeling that if the app is running in Firefox an endless loop is created, because I can't also open other webpages like Stackoverflow and so on..

Why does Firefox suddenly have this behavior and how can we fix this?

like image 442
Codehan25 Avatar asked Jul 01 '19 11:07

Codehan25


People also ask

Does Angular work with Firefox?

Angular DevTools by AngularAngular DevTools extends Firefox DevTools adding Angular specific debugging and profiling capabilities.

Is Firefox no longer supported?

Firefox is still very much alive and well as Mozilla has no plans to stop development of their web browsers for desktop (Windows, macOS, Linux) and mobile versions for iOS and Android.


1 Answers

Changing in tsconfig.json the property target from es2015 to old value es5, application works.

like image 138
marcosalpereira Avatar answered Sep 24 '22 01:09

marcosalpereira