Skip to content

URI malformed issue from @angular-devkit's dependency library Vite #28436

@satheesh-kumar-m

Description

@satheesh-kumar-m

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

Don't known / other

Is this a regression?

Yes

Description

Just created new angular application(version - 17.3.9) using below command,
ng new url-test-app
then start application using below command,
npm start
Now navigate to below URL,
http://localhost:4200/
Now just add new query param with value %_24Q3, for example,
http://localhost:4200/?testParam=test%_24Q3

We will get below issue, Please help to fix this issue.
Not able to handle this with angular error handler

URI malformed
    at decodeURI (<anonymous>)
    at viteTransformMiddleware (file:///D:/angular/url-test-app/node_modules/vite/dist/node/chunks/dep-k5wXcrSr.js:63436:19)
    at call (file:///D:/angular/url-test-app/node_modules/vite/dist/node/chunks/dep-k5wXcrSr.js:42750:7)
    at next (file:///D:/angular/url-test-app/node_modules/vite/dist/node/chunks/dep-k5wXcrSr.js:42694:5)
    at viteHMRPingMiddleware (file:///D:/angular/url-test-app/node_modules/vite/dist/node/chunks/dep-k5wXcrSr.js:64700:13)
    at call (file:///D:/angular/url-test-app/node_modules/vite/dist/node/chunks/dep-k5wXcrSr.js:42750:7)
    at next (file:///D:/angular/url-test-app/node_modules/vite/dist/node/chunks/dep-k5wXcrSr.js:42694:5)
    at next (file:///D:/angular/url-test-app/node_modules/vite/dist/node/chunks/dep-k5wXcrSr.js:42672:14)
    at viteCachedTransformMiddleware (file:///D:/angular/url-test-app/node_modules/vite/dist/node/chunks/dep-k5wXcrSr.js:63421:9)
    at call (file:///D:/angular/url-test-app/node_modules/vite/dist/node/chunks/dep-k5wXcrSr.js:42750:7
    ```

![image (4)](https://github.com/user-attachments/assets/3e24bf0f-f566-4b08-a549-be150e0929e3)


### Please provide a link to a minimal reproduction of the bug

_No response_

### Please provide the exception or error you saw

_No response_

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

_No response_

### Anything else?

_No response_

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions