Skip to content

URL resolution of main.dart.js is broken after migrating to 3.24 #153077

@jezell

Description

@jezell

Steps to reproduce

Set base href in document to "/"
Make a web app that uses url path strategy
Try to refresh app from "/someURL"

Expected results

main.dart.js is loaded from /main.dart.js

Actual results

/ is stripped from base url during URL resolution and main.dart.js is loaded relative to document instead of root

This regression is caused by recent changes here:

https://github.com/flutter/engine/blob/main/lib/web_ui/flutter_js/src/utils.js
https://github.com/flutter/engine/blob/main/lib/web_ui/flutter_js/src/entrypoint_loader.js

In 3.22 the / is not stripped, but in 3.24 it is stripped.

Code sample

Code sample
[Paste your code here]

Screenshots or Video

Screenshots / Video demonstration

[Upload media here]

Logs

Logs
[Paste your logs here]

Flutter Doctor output

Doctor output
[Paste your output here]

Metadata

Metadata

Assignees

No one assigned

    Labels

    r: duplicateIssue is closed as a duplicate of an existing issue

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions