Learn More, Pay Less!
Limited Time Offer!
Open Closed

ERR_TOO_MANY_REDIRECTS when loading file https://rsms.me/inter/inter.css #8742


User avatar
0
portx-dev created
  • ABP Framework version: v8.3.3
  • UI Type: Angular
  • Database System: EF Core (MySQL)
  • Tiered (for MVC) or Auth Server Separated (for Angular): yes
  • Exception message and full stack trace:
  • Steps to reproduce the issue:

After logging in, the screen moves to a blank page with no content. I checked the network and there was an error ERR_TOO_MANY_REDIRECTS when downloading the file https://rsms.me/inter/inter.css This error has been occurring for about a week now I would like to know the cause and how to fix it


8 Answer(s)
  • User Avatar
    0
    improwise created

    We are seeing the exact same problem and investigating it. Not sure if it is actually a ABP problem yet or might have other causes as this project used to work last week. Did do some ABP Suite updates since then though that could have caused this.

  • User Avatar
    0
    improwise created

    We are seeing the exact same problem and investigating it. Not sure if it is actually a ABP problem yet or might have other causes as this project used to work last week. Did do some ABP Suite updates since then though that could have caused this.

    Update, this seem to occur only with latest version of Chrome based on our testing, but works fine in Firefox and Edge. Seems like you can get it to work in Chrome by clearing cache, not sure what caused it though and if it might come back.

  • User Avatar
    0
    sumeyye.kurtulus created
    Support Team Angular Expert

    Hello, the latest updates done on our side should not cause such a problem. I was only able to duplicate the problem when I clear the cached data. It also works fine on other browsers including Safari.

    However, if you think that this disrupts the functionality of your application, you can share a sample project through this email: sumeyye.kurtulus@volosoft.com and I can assist you further.

  • User Avatar
    0
    portx-dev created

    @sumeyye.kurtulus

    First, as a short-term solution, switch to an external CDN or move to self-hosting to prevent the problem from recurring in the production environment. For example, if you temporarily change to loading Inter via Google Fonts, at least the redirect problem via rsms.me will not occur. In parallel, it is a good idea to watch the latest information from the Inter font developer (official website, GitHub repository Issue github.com, etc.) and check what happened to rsms.me's CDN. If the official provider of inter.css has changed, update the reference URL according to the documentation. In the long term, it is preferable to design without excessive reliance on external font CDNs. If you host your fonts in-house, you will not be bothered by external factors such as this one. As described in d.rsms.me, Inter fonts are freely available, so there are no problems with the license. If you host them yourself, enable appropriate cache control and compression (gzip/Brotli) and pay attention to performance.

  • User Avatar
    0
    portx-dev created

    Issue When I look at it in Chrome, rsms.me is infinitely redirecting with 301.

    Request 1. rsms.me is cached on disk. I want to attach a query string to rsms.me and delete the cache. Can we, the developers, attach a query string to rsms.me?

    2. Instead of reading rsms.me, how about changing the method so that ABP downloads rsms.me?

  • User Avatar
    0
    EngincanV created
    Support Team .NET Developer

    Instead of reading rsms.me, how about changing the method so that ABP downloads rsms.me?

    This is exactly what it should be. We are testing the situation and considering using the related CSS as a static file. @sumeyye.kurtulus working on that.

    Regards.

  • User Avatar
    0
    portx-dev created

    very thx

    In what version can it be implemented?

  • User Avatar
    0
    sumeyye.kurtulus created
    Support Team Angular Expert

    For the time being, we are not planning to host the fonts ourselves or switch to Google Fonts. However, as a temporary workaround, you can consider loading Inter from an alternative CDN or serving a local copy within your project to avoid issues with rsms.me. The exact fix will be published in the next patch version.

    While a long-term approach should minimize dependencies on external font CDNs, for now, implementing a short-term fix like the below should help mitigate disruptions.

    //app.module.ts
    import { LPX_STYLE_FINAL } from '@volo/ngx-lepton-x.core';
    
    @NgModule({
      providers: [
      ...
        {
          provide: APP_INITIALIZER,
          multi: true,
          useFactory: () => {
            const styles = inject(LPX_STYLE_FINAL);
            return () => {
              const index = styles.findIndex(f => f.bundleName === 'font-bundle');
              if (index !== -1) {
                styles.splice(index, 1);
              }
            };
          },
        },
      ],
     ...
    })
    export class AppModule {}
    
    

    You can refer to Google fonts or add a query parameter for the inter.css in your styles.scss file.

    // styles.scss
    @import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;700&display=swap');
    // @import url('https://rsms.me/inter/inter.css?v=1.0');
    

    Another workaround can be replacing the font-bundle file in the angular.json

          "architect": {
              "options": {
                "styles": [
                ...
                  {
                    "input": "../angular/src/font-bundle.css",
                    "inject": false,
                    "bundleName": "font-bundle"
                  },
                ...
                ],
              },
            },
          }
    
    /* font-bundle.css */
    @import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;700&display=swap');
    /* @import url('https://rsms.me/inter/inter.css?v=1.0'); */
    
Made with ❤️ on ABP v9.2.0-preview. Updated on February 13, 2025, 10:35