Skip to content

Debugging & Hot Reload is Broken When App's Base Path is Changed #46809

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
1 task done
daytonjallen opened this issue Feb 22, 2023 · 3 comments
Closed
1 task done

Debugging & Hot Reload is Broken When App's Base Path is Changed #46809

daytonjallen opened this issue Feb 22, 2023 · 3 comments
Labels
area-blazor Includes: Blazor, Razor Components bug This issue describes a behavior which is not expected - a bug. feature-hot-reload This issue is related to the Hot Reload feaature Pillar: Dev Experience Priority:1 Work that is critical for the release, but we could probably ship without

Comments

@daytonjallen
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

Debugging and hot reload is broken when app base path is changed in index.html and launchsettings.json.

Expected Behavior

Debugging and hot reload with a different base path should work

Steps To Reproduce

Repo reproducing problem here:
https://github.com/daytonjallen/HotReloadPathIssueRepro

  1. Start new blazor wasm project
  2. Update base path in index.html
  3. Update paths in launchsettings.json (problem exists when using both the IIS & http run configs)
  4. Try to debug project

App will fail to load due to exceptions from not finding blazor-hotreload.js etc:

image

Exceptions (if any)

blazor.webassembly.js:1

   System.AggregateException: One or more errors occurred. (Failed to fetch dynamically imported module: http://localhost:65439/_framework/blazor-hotreload.js

TypeError: Failed to fetch dynamically imported module: http://localhost:65439/_framework/blazor-hotreload.js)
---> Microsoft.JSInterop.JSException: Failed to fetch dynamically imported module: http://localhost:65439/_framework/blazor-hotreload.js
TypeError: Failed to fetch dynamically imported module: http://localhost:65439/_framework/blazor-hotreload.js
at Microsoft.JSInterop.JSRuntime.d__16`1[[Microsoft.JSInterop.IJSObjectReference, Microsoft.JSInterop, Version=7.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60]].MoveNext()
at Microsoft.AspNetCore.Components.WebAssembly.HotReload.WebAssemblyHotReload.InitializeAsync()
at Microsoft.AspNetCore.Components.WebAssembly.Hosting.WebAssemblyHost.RunAsyncCore(CancellationToken cancellationToken, WebAssemblyCultureProvider cultureProvider)
at Program.

$(String[] args) in C:\Users\dallen\source\repos\HotReloadPathIssueRepro\HotReloadPathIssueRepro\Program.cs:line 11
--- End of inner exception stack trace ---

.NET Version

7.0.200

Anything else?

Visual Studio Version: 17.5.0

image

@mkArtakMSFT mkArtakMSFT added area-blazor Includes: Blazor, Razor Components bug This issue describes a behavior which is not expected - a bug. labels Feb 23, 2023
@mkArtakMSFT mkArtakMSFT added this to the 8.0-preview3 milestone Feb 23, 2023
@ghost
Copy link

ghost commented Mar 1, 2023

Thanks for contacting us.

We're moving this issue to the .NET 8 Planning milestone for future evaluation / consideration. We would like to keep this around to collect more feedback, which can help us with prioritizing this work. We will re-evaluate this issue, during our next planning meeting(s).
If we later determine, that the issue has no community involvement, or it's very rare and low-impact issue, we will close it - so that the team can focus on more important and high impact issues.
To learn more about what to expect next and how this issue will be handled you can read more about our triage process here.

@mkArtakMSFT mkArtakMSFT added the feature-hot-reload This issue is related to the Hot Reload feaature label Mar 1, 2023
@damien-c-d
Copy link

I am also experiencing this issue.

Visual Studio Enterprise 17.6.3

.NET SDK:
Version: 7.0.304
Commit: 7e794e2806

Runtime Environment:
OS Name: Windows
OS Version: 10.0.22621
OS Platform: Windows
RID: win10-x64
Base Path: C:\Program Files\dotnet\sdk\7.0.304\

Host:
Version: 7.0.7
Architecture: x64
Commit: 5b20af47d9

@ghost
Copy link

ghost commented Oct 4, 2023

Thanks for contacting us.

We're moving this issue to the .NET 9 Planning milestone for future evaluation / consideration. We would like to keep this around to collect more feedback, which can help us with prioritizing this work. We will re-evaluate this issue, during our next planning meeting(s).
If we later determine, that the issue has no community involvement, or it's very rare and low-impact issue, we will close it - so that the team can focus on more important and high impact issues.
To learn more about what to expect next and how this issue will be handled you can read more about our triage process here.

@mkArtakMSFT mkArtakMSFT added the Priority:1 Work that is critical for the release, but we could probably ship without label Jan 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-blazor Includes: Blazor, Razor Components bug This issue describes a behavior which is not expected - a bug. feature-hot-reload This issue is related to the Hot Reload feaature Pillar: Dev Experience Priority:1 Work that is critical for the release, but we could probably ship without
Projects
None yet
Development

No branches or pull requests

5 participants
@javiercn @daytonjallen @mkArtakMSFT @damien-c-d and others