Skip to content

Location incorrectly handled when served from a base path containing regex-specific characters. #49179

Closed

Description

@wartab

Which @angular/* package(s) are the source of the bug?

common, router

Is this a regression?

Yes

Description

When serving an Angular build from the file system (such as in Electron), if Angular is served from a path containing regex-syntax characters, the Angular router gets lost.

The bug was introduced in Angular 5.1.1 after this commit:
#48489

Serving Angular from the following path would fail:
C:/Users/MyUser(Test)/my-project

Please provide a link to a minimal reproduction of the bug

No reproduction link as it is environment specific.

Please provide the exception or error you saw

When this happens, the Angular application goes blank and only the error "NG04002" is shown in console with nothing else going on.

Please provide the environment you discovered this bug in (run ng version)

Angular CLI: 15.1.6
Node: 16.18.0
Package Manager: npm 8.19.2
OS: win32 x64

Angular: 15.1.5
... animations, cdk, common, compiler, compiler-cli, core, forms
... language-service, localize, material
... material-moment-adapter, platform-browser
... platform-browser-dynamic, router

Package                         Version
---------------------------------------------------------
@angular-devkit/architect       0.1501.6
@angular-devkit/build-angular   15.1.6
@angular-devkit/core            15.1.6
@angular-devkit/schematics      15.1.6
@angular/cli                    15.1.6
@schematics/angular             15.1.6
rxjs                            7.8.0
typescript                      4.9.5

Anything else?

No response

Activity

  1. sankeerth125 commented on Feb 23, 2023

    @sankeerth125
  2. added
    regression
    P2
    area: common
    on Feb 23, 2023
  3. added this to the Backlog milestone on Feb 23, 2023
  4. added a commit that references this issue on Feb 27, 2023
    f0e9260
  5. angular-automatic-lock-bot commented on Mar 30, 2023

    @angular-automatic-lock-bot

    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.

  6. locked and limited conversation to collaborators on Mar 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2area: commonregressionstate: has PR

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions