You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
DevTools pages create bad URLs when the base contains ?wasm=true #5365
The cacheBust param and all following are tacked on to the end instead of adding to the existing query parameters like wasm=true. Additionally, we shouldn't need the # sign which may be getting added by VS code.
@kenzieschmoll how would I reproduce this? Where is the wasm=true coming from? Is it being added in the value that comes in the server-started json event?
If so, I think we currently assume the URL is just a "base url" because we may also append page names like /inspector.
We can change this to parse the URI and insert the parts at the correct place, but it may be worth checking whether IntelliJ has similar assumptions that will need updating too (@jwren fyi).
changed the title [-]Open DevTools In the Browser creates bad URL[/-][+]DevTools pages create bad URLs when the base contains `?wasm=true`[/+]on Dec 6, 2024
If you open DevTools from VS code (as long as you are on flutter beta or master), and then open the DevTools settings menu, you'll see a check box to enable WASM. This will store a setting to DevTools preferences. The next time you open DevTools in the browser from VS code, the wasm=true parameter should be applied.
I can reproduce this - it happens when we ask the DevTools server to open DevTools in the browser. It seems to have some code that still assumes we're using the # fragment for the URL. I'll update it and verify it fixes this.
Activity
DanTup commentedon Dec 6, 2024
@kenzieschmoll how would I reproduce this? Where is the
wasm=truecoming from? Is it being added in the value that comes in the server-started json event?If so, I think we currently assume the URL is just a "base url" because we may also append page names like
/inspector.We can change this to parse the URI and insert the parts at the correct place, but it may be worth checking whether IntelliJ has similar assumptions that will need updating too (@jwren fyi).
[-]Open DevTools In the Browser creates bad URL[/-][+]DevTools pages create bad URLs when the base contains `?wasm=true`[/+]kenzieschmoll commentedon Dec 6, 2024
If you open DevTools from VS code (as long as you are on flutter beta or master), and then open the DevTools settings menu, you'll see a check box to enable WASM. This will store a setting to DevTools preferences. The next time you open DevTools in the browser from VS code, the
wasm=trueparameter should be applied.The
wasmparameter is set in the DevTools flutter_bootstrap.js logic: https://github.com/flutter/devtools/blob/master/packages/devtools_app/web/flutter_bootstrap.js/#L60And it is set when the preference changes: https://github.com/flutter/devtools/blob/master/packages/devtools_app/lib/src/shared/preferences/preferences.dart/#L176
For the issue I was hitting, I already had the preference enabled, so it was most getting set from the bootstrap logic.
DanTup commentedon Dec 9, 2024
I can reproduce this - it happens when we ask the DevTools server to open DevTools in the browser. It seems to have some code that still assumes we're using the # fragment for the URL. I'll update it and verify it fixes this.
DanTup commentedon Dec 9, 2024
I've opened a fix at https://dart-review.googlesource.com/c/sdk/+/399681.
[dds] Build DevTools URL using querystring, not fragment
DanTup commentedon Jan 8, 2025
This was fixed by dart-lang/sdk@acf43c7