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 JSInterop failure/exception not reported in Blazor app #38502

Closed
MarkStega opened this issue Nov 18, 2021 · 6 comments
Closed

Blazor JSInterop failure/exception not reported in Blazor app #38502

MarkStega opened this issue Nov 18, 2021 · 6 comments
Labels
area-blazor Includes: Blazor, Razor Components feature-blazor-jsinterop This issue is related to JSInterop in Blazor investigate Priority:2 Work that is important, but not critical for the release
Milestone

Comments

@MarkStega
Copy link

Describe the bug

I have a working application that is experiencing a JSInterop exception. That exception is not surfaced making it very difficult to find the problem in the app.

To Reproduce

This repo is being used to report 2 separate issues. Use button #2, see the same developer exception as in #38501, but wait out the minute for the exception to be thrown and note that no exception is evident.

The repo is https://github.com/OptimiumHealth/BlazorJSInteropApp

Exceptions (if any)

None, but I want one!

Further technical details

  • ASP.NET Core version:
  • The IDE (VS / VS Code/ VS4Mac) you're running on, and its version:
  • Include the output of dotnet --info:
C:\Solutions\TemporarySolutions\BlazorJSInteropApp>dotnet --info
.NET SDK (reflecting any global.json):
 Version:   6.0.100
 Commit:    9e8b04bbff

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

Host (useful for support):
  Version: 6.0.0
  Commit:  4822e3c3aa

.NET SDKs installed:
  3.1.415 [C:\Program Files\dotnet\sdk]
  5.0.302 [C:\Program Files\dotnet\sdk]
  6.0.100 [C:\Program Files\dotnet\sdk]

.NET runtimes installed:
  Microsoft.AspNetCore.App 3.1.21 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 5.0.12 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 6.0.0 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 3.1.21 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 5.0.12 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 6.0.0 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.WindowsDesktop.App 3.1.21 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
  Microsoft.WindowsDesktop.App 5.0.12 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
  Microsoft.WindowsDesktop.App 6.0.0 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]

To install additional .NET runtimes or SDKs:
  https://aka.ms/dotnet-download

C:\Solutions\TemporarySolutions\BlazorJSInteropApp>
@MarkStega MarkStega changed the title Blazor JSInterop failure not reported in Blazor app Blazor JSInterop failure/exception not reported in Blazor app Nov 18, 2021
@TanayParikh TanayParikh added area-blazor Includes: Blazor, Razor Components feature-blazor-jsinterop This issue is related to JSInterop in Blazor labels Nov 18, 2021
@TanayParikh
Copy link
Contributor

Hello, thanks for contacting us. I'm not sure I follow. How does this differ from #38501. What's the difference between internalClick1 and internalClick2?

@TanayParikh TanayParikh added the Needs: Author Feedback The author of this issue needs to respond in order for us to continue investigating this issue. label Nov 18, 2021
@ghost
Copy link

ghost commented Nov 18, 2021

Hi @MarkStega. We have added the "Needs: Author Feedback" label to this issue, which indicates that we have an open question for you before we can take further action. This issue will be closed automatically in 7 days if we do not hear back from you by then - please feel free to re-open it if you come back to this issue after that time.

@MarkStega
Copy link
Author

MarkStega commented Nov 18, 2021

internalClick2 does not have a try/catch block and the exception is 'silent' which makes it almost impossible to find in a real application.

I commented in #38501 that "OK, the wrong call is being used, but why does it take a full minute for the exception?"

@ghost ghost added Needs: Attention 👋 This issue needs the attention of a contributor, typically because the OP has provided an update. and removed Needs: Author Feedback The author of this issue needs to respond in order for us to continue investigating this issue. labels Nov 18, 2021
@mkArtakMSFT mkArtakMSFT added investigate and removed Needs: Attention 👋 This issue needs the attention of a contributor, typically because the OP has provided an update. labels Nov 18, 2021
@mkArtakMSFT mkArtakMSFT added this to the .NET 7 Planning milestone Nov 18, 2021
@mkArtakMSFT mkArtakMSFT added Priority:1 Work that is critical for the release, but we could probably ship without triaged labels Nov 18, 2021
@TanayParikh
Copy link
Contributor

internalClick2 does not have a try/catch block and the exception is 'silent' which makes it almost impossible to find in a real application.

I commented in #38501 that "OK, the wrong call is being used, but why does it take a full minute for the exception?"

Just to confirm, you're saying that the exception isn't thrown even after a full minute, and the circuit remains active?

@MarkStega
Copy link
Author

MarkStega commented Nov 18, 2021

Yes, the exception is not thrown and the circuit remains active. The code in click2 is identical to the code in click1 so I am reasonably certain that the same exception occurs (it did in my full blown app).

@mkArtakMSFT mkArtakMSFT added Priority:2 Work that is important, but not critical for the release and removed Priority:1 Work that is critical for the release, but we could probably ship without labels Nov 23, 2021
@mkArtakMSFT mkArtakMSFT modified the milestones: .NET 7 Planning, Backlog Sep 7, 2022
@MarkStega
Copy link
Author

See #38501

This was fixed when tested with DN7.preview 7

@ghost ghost locked as resolved and limited conversation to collaborators Oct 13, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-blazor Includes: Blazor, Razor Components feature-blazor-jsinterop This issue is related to JSInterop in Blazor investigate Priority:2 Work that is important, but not critical for the release
Projects
None yet
Development

No branches or pull requests

3 participants