Skip to content

application builder: font download failing #26215

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
1 task
cexbrayat opened this issue Nov 3, 2023 · 1 comment · Fixed by #26218
Closed
1 task

application builder: font download failing #26215

cexbrayat opened this issue Nov 3, 2023 · 1 comment · Fixed by #26218

Comments

@cexbrayat
Copy link
Member

Command

serve

Is this a regression?

  • Yes, this behavior used to work in the previous version

The previous version in which this bug was not present was

No response

Description

If a component uses a font like fontawesome in its template to display an icon, then the served application does not display the icon and the browser console has an error:

downloadable font: download failed (font-family: "Font Awesome 6 Free" style:normal weight:900 stretch:100 src index:0): status=2147746065 source: http://localhost:4200/media/fa-solid-900.woff2 

This issue arises with the application builder but does not happen with the browser builder

Minimal Reproduction

npx @angular/cli@next new fonts-vite --defaults --no-routing --skip-tests
cd fonts-vite
npm install --save-exact @fortawesome/fontawesome-free

Update styles.css to use:

@import '@fortawesome/fontawesome-free/css/all.css';

and change app.component.html to:

<span class="fa fa-power-off"></span>

Run ng serve and see the error in the browser console.

Exception or Error

downloadable font: download failed (font-family: "Font Awesome 6 Free" style:normal weight:900 stretch:100 src index:0): status=2147746065 source: http://localhost:4200/media/fa-solid-900.woff2

Your Environment

Angular CLI: 17.0.0-rc.3
Node: 18.18.2
Package Manager: npm 9.7.1
OS: darwin arm64

Angular: 17.0.0-rc.2
... animations, common, compiler, compiler-cli, core, forms
... platform-browser, platform-browser-dynamic, router

Package                         Version
---------------------------------------------------------
@angular-devkit/architect       0.1700.0-rc.3
@angular-devkit/build-angular   17.0.0-rc.3
@angular-devkit/core            17.0.0-rc.3
@angular-devkit/schematics      17.0.0-rc.3
@angular/cli                    17.0.0-rc.3
@schematics/angular             17.0.0-rc.3
rxjs                            7.8.1
typescript                      5.2.2
zone.js                         0.14.1

Anything else relevant?

Using the browser builder fixes the issue

@alan-agius4 alan-agius4 added freq1: low Only reported by a handful of users who observe it rarely freq2: medium severity3: broken area: @angular-devkit/build-angular devkit/build-angular:dev-server and removed freq1: low Only reported by a handful of users who observe it rarely labels Nov 3, 2023
@alan-agius4 alan-agius4 self-assigned this Nov 3, 2023
alan-agius4 added a commit to alan-agius4/angular-cli that referenced this issue Nov 3, 2023
Unlike assets, output file were not prefixed with a `/`. This change alings these and now files are always prefixed with a slash.

Closes angular#26215
alan-agius4 added a commit to alan-agius4/angular-cli that referenced this issue Nov 3, 2023
Unlike assets, output file were not prefixed with a `/`. This change alings these and now files are always prefixed with a slash.

Closes angular#26215
alan-agius4 added a commit to alan-agius4/angular-cli that referenced this issue Nov 3, 2023
Unlike assets, output file were not prefixed with a `/`. This change alings these and now files are always prefixed with a slash.

Closes angular#26215
alan-agius4 added a commit to alan-agius4/angular-cli that referenced this issue Nov 3, 2023
Unlike assets, output file were not prefixed with a `/`. This change alings these and now files are always prefixed with a slash.

Closes angular#26215 and closes angular#26199
alan-agius4 added a commit to alan-agius4/angular-cli that referenced this issue Nov 3, 2023
Unlike assets, output file were not prefixed with a `/`. This change alings these and now files are always prefixed with a slash.

Closes angular#26215 and closes angular#26199
alan-agius4 added a commit to alan-agius4/angular-cli that referenced this issue Nov 3, 2023
Unlike assets, output file were not prefixed with a `/`. This change alings these and now files are always prefixed with a slash.

Closes angular#26215
alan-agius4 added a commit to alan-agius4/angular-cli that referenced this issue Nov 3, 2023
Unlike assets, output file were not prefixed with a `/`. This change alings these and now files are always prefixed with a slash.

Closes angular#26215
alan-agius4 added a commit that referenced this issue Nov 3, 2023
Unlike assets, output file were not prefixed with a `/`. This change alings these and now files are always prefixed with a slash.

Closes #26215
alan-agius4 added a commit that referenced this issue Nov 3, 2023
Unlike assets, output file were not prefixed with a `/`. This change alings these and now files are always prefixed with a slash.

Closes #26215

(cherry picked from commit 8c76cb2)
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Dec 4, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.