Skip to content
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

Blazor Init Log Messages on Safari #93622

Closed
1 task done
rudiv opened this issue Oct 17, 2023 · 3 comments · Fixed by #97213
Closed
1 task done

Blazor Init Log Messages on Safari #93622

rudiv opened this issue Oct 17, 2023 · 3 comments · Fixed by #97213
Labels
arch-wasm WebAssembly architecture area-System.Runtime.InteropServices.JavaScript os-browser Browser variant of arch-wasm
Milestone

Comments

@rudiv
Copy link

rudiv commented Oct 17, 2023

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

I'm not sure that this can be considered a "bug" in Blazor (most likely Safari), but it seems primarily like strange behaviour.

When using Safari, there are no initialisation messages logged to the console.

The assetsCache.ts code uses console.groupCollapsed which is supported in Safari, so it's almost like some form of environment detection is failing, yet it's only using typeof (window) === "object" so I'm not sure how that's possible.

Expected Behavior

A message, similar to the following, printed to the browser console.

assetsCache.ts:30
dotnet Loaded 11.21 MB resources
This application was built with linking (tree shaking) disabled.
Published applications will be significantly smaller if you install wasm-tools workload. See also https://aka.ms/dotnet-wasm-features

Steps To Reproduce

Open any Blazor WASM app in Safari.

Exceptions (if any)

No response

.NET Version

8.0.100-rc.2.23502.2

Anything else?

No response

@javiercn javiercn transferred this issue from dotnet/aspnetcore Oct 17, 2023
@ghost ghost added the untriaged New issue has not been triaged by the area owner label Oct 17, 2023
@radical
Copy link
Member

radical commented Oct 19, 2023

cc @pavelsavara @maraf

@radical radical added the arch-wasm WebAssembly architecture label Oct 19, 2023
@ghost
Copy link

ghost commented Oct 19, 2023

Tagging subscribers to 'arch-wasm': @lewing
See info in area-owners.md if you want to be subscribed.

Issue Details

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

I'm not sure that this can be considered a "bug" in Blazor (most likely Safari), but it seems primarily like strange behaviour.

When using Safari, there are no initialisation messages logged to the console.

The assetsCache.ts code uses console.groupCollapsed which is supported in Safari, so it's almost like some form of environment detection is failing, yet it's only using typeof (window) === "object" so I'm not sure how that's possible.

Expected Behavior

A message, similar to the following, printed to the browser console.

assetsCache.ts:30
dotnet Loaded 11.21 MB resources
This application was built with linking (tree shaking) disabled.
Published applications will be significantly smaller if you install wasm-tools workload. See also https://aka.ms/dotnet-wasm-features

Steps To Reproduce

Open any Blazor WASM app in Safari.

Exceptions (if any)

No response

.NET Version

8.0.100-rc.2.23502.2

Anything else?

No response

Author: rudiv
Assignees: -
Labels:

arch-wasm, untriaged, area-VM-meta-mono

Milestone: -

@maraf maraf added area-System.Runtime.InteropServices.JavaScript os-browser Browser variant of arch-wasm and removed untriaged New issue has not been triaged by the area owner area-VM-meta-mono labels Oct 20, 2023
@maraf maraf added this to the 9.0.0 milestone Oct 20, 2023
@maraf
Copy link
Member

maraf commented Oct 20, 2023

  • The loaderHelpers.config.debugLevel is 0 in safari, althought with the build of app, it's -1 in Edge
  • The loaderHelpers.config.debugLevel !== 0 guards logging of download stats
  • The debugLevel is set by hasDebuggingEnabled
  • Which is ... && (loaderHelpers.isChromium || loaderHelpers.isFirefox)

@ghost ghost added the in-pr There is an active PR which will close this issue when it is merged label Feb 9, 2024
@ghost ghost removed the in-pr There is an active PR which will close this issue when it is merged label Feb 12, 2024
@github-actions github-actions bot locked and limited conversation to collaborators Mar 14, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
arch-wasm WebAssembly architecture area-System.Runtime.InteropServices.JavaScript os-browser Browser variant of arch-wasm
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants