Skip to content

Fix problem with null VirtualView in BlazorWebViewHandler on iOS - #38141

Merged
kubaflo merged 1 commit into
dotnet:inflight/currentfrom
JimmyPun610:Fix-problem-with-null-VirtualView-in-BlazorWebViewHandler-on-iOS
Sep 3, 2026
Merged

kubaflo merged 1 commit into
dotnet:inflight/currentfrom
JimmyPun610:Fix-problem-with-null-VirtualView-in-BlazorWebViewHandler-on-iOS

Conversation

@JimmyPun610

Copy link
Copy Markdown
Contributor

Add null checks for _webViewHandler and related properties in StartUrlSchemeTask and GetResponseBytes methods.

Description of Change
Checking if Handler has container before using VirtualView which can crash app if is null

Issues Fixed
Fixes #38131

Add null checks for _webViewHandler and related properties in StartUrlSchemeTask and GetResponseBytes methods.
@github-actions

github-actions Bot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

🚀 Dogfood this PR with:

⚠️ WARNING: Do not do this without first carefully reviewing the code of this PR to satisfy yourself it is safe.

curl -fsSL https://raw.githubusercontent.com/dotnet/maui/main/eng/scripts/get-maui-pr.sh | bash -s -- 38141

Or

  • Run remotely in PowerShell:
iex "& { $(irm https://raw.githubusercontent.com/dotnet/maui/main/eng/scripts/get-maui-pr.ps1) } 38141"

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
There may be pipelines that require an authorized user to comment /azp run to run.

@dotnet-policy-service dotnet-policy-service Bot added the community ✨ Community Contribution label Sep 3, 2026
@dotnet-policy-service

Copy link
Copy Markdown
Contributor

Hey there @@JimmyPun610! Thank you so much for your PR! Someone from the team will get assigned to your PR shortly and we'll get it reviewed.

@dotnet-policy-service

Copy link
Copy Markdown
Contributor

Hey there @JimmyPun610! Thank you so much for your PR! Someone from the team will get assigned to your PR shortly and we'll get it reviewed.

@kubaflo
kubaflo changed the base branch from main to inflight/current September 3, 2026 14:22
@kubaflo
kubaflo merged commit 53654f9 into dotnet:inflight/current Sep 3, 2026
10 of 12 checks passed
kubaflo pushed a commit that referenced this pull request Sep 3, 2026
)

Add null checks for _webViewHandler and related properties in
StartUrlSchemeTask and GetResponseBytes methods.

Description of Change
Checking if Handler has container before using VirtualView which can
crash app if is null

Issues Fixed
Fixes #38131
kubaflo pushed a commit that referenced this pull request Sep 6, 2026
)

Add null checks for _webViewHandler and related properties in
StartUrlSchemeTask and GetResponseBytes methods.

Description of Change
Checking if Handler has container before using VirtualView which can
crash app if is null

Issues Fixed
Fixes #38131
kubaflo pushed a commit that referenced this pull request Sep 7, 2026
)

Add null checks for _webViewHandler and related properties in
StartUrlSchemeTask and GetResponseBytes methods.

Description of Change
Checking if Handler has container before using VirtualView which can
crash app if is null

Issues Fixed
Fixes #38131
kubaflo pushed a commit that referenced this pull request Sep 8, 2026
)

Add null checks for _webViewHandler and related properties in
StartUrlSchemeTask and GetResponseBytes methods.

Description of Change
Checking if Handler has container before using VirtualView which can
crash app if is null

Issues Fixed
Fixes #38131
kubaflo pushed a commit that referenced this pull request Sep 9, 2026
)

Add null checks for _webViewHandler and related properties in
StartUrlSchemeTask and GetResponseBytes methods.

Description of Change
Checking if Handler has container before using VirtualView which can
crash app if is null

Issues Fixed
Fixes #38131
kubaflo pushed a commit that referenced this pull request Sep 11, 2026
)

Add null checks for _webViewHandler and related properties in
StartUrlSchemeTask and GetResponseBytes methods.

Description of Change
Checking if Handler has container before using VirtualView which can
crash app if is null

Issues Fixed
Fixes #38131
kubaflo pushed a commit that referenced this pull request Sep 15, 2026
)

Add null checks for _webViewHandler and related properties in
StartUrlSchemeTask and GetResponseBytes methods.

Description of Change
Checking if Handler has container before using VirtualView which can
crash app if is null

Issues Fixed
Fixes #38131
kubaflo added a commit that referenced this pull request Sep 15, 2026
<!-- Please let the below note in for people that find this PR -->
> [!NOTE]
> Are you waiting for the changes in this PR to be merged?
> It would be very helpful if you could [test the resulting
artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from
this PR and let us know in a comment if this change resolves your issue.
Thank you!

### Description of Change

Targets **`inflight/current`** to repair the two compiler/analyzer
failures in `maui-pr` [build
1597590](https://dev.azure.com/dnceng-public/public/_build/results?buildId=1597590).

- Fix **CS1061** in the iOS/Mac Catalyst BlazorWebView scheme handler
introduced by #38141: `BlazorWebViewHandler` has no `Handler` property.
Read the nullable `IViewHandler.VirtualView` property instead,
preserving the disconnected-handler guard and existing empty 404
response. The strongly typed `VirtualView` getter cannot be used for
this check because it throws when disconnected.
- Fix **MAUI0003** in the regression test added by #37437: use
method-level `ShardedTestCategory` with shard 1, registering both the
`CollectionView` umbrella and the `CollectionView1` CI category without
changing the test assertions or platform coverage.

The missing Mac native-artifact publishing error is downstream of the
failed Pack step, so no pipeline workaround is needed. No competing open
repair targeting `inflight/current` was found.

### Issues Fixed

Repairs the `maui-pr` build failures on `inflight/current`; retains the
regression protection for #38131 and the test coverage for #37427.

### Validation

- BlazorWebView project builds for `net10.0-ios26.0` and
`net10.0-maccatalyst26.0`: zero warnings/errors.
- Existing UI-test category analyzer suite: 46 passed.
- Changed files formatted and `git diff --check` clean.

Local validation used the installed .NET 11 preview SDK targeting .NET
10. Full CI has not yet been rerun with the repository-pinned SDK.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
kubaflo pushed a commit that referenced this pull request Sep 18, 2026
)

Add null checks for _webViewHandler and related properties in
StartUrlSchemeTask and GetResponseBytes methods.

Description of Change
Checking if Handler has container before using VirtualView which can
crash app if is null

Issues Fixed
Fixes #38131
kubaflo added a commit that referenced this pull request Sep 18, 2026
<!-- Please let the below note in for people that find this PR -->
> [!NOTE]
> Are you waiting for the changes in this PR to be merged?
> It would be very helpful if you could [test the resulting
artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from
this PR and let us know in a comment if this change resolves your issue.
Thank you!

### Description of Change

Targets **`inflight/current`** to repair the two compiler/analyzer
failures in `maui-pr` [build
1597590](https://dev.azure.com/dnceng-public/public/_build/results?buildId=1597590).

- Fix **CS1061** in the iOS/Mac Catalyst BlazorWebView scheme handler
introduced by #38141: `BlazorWebViewHandler` has no `Handler` property.
Read the nullable `IViewHandler.VirtualView` property instead,
preserving the disconnected-handler guard and existing empty 404
response. The strongly typed `VirtualView` getter cannot be used for
this check because it throws when disconnected.
- Fix **MAUI0003** in the regression test added by #37437: use
method-level `ShardedTestCategory` with shard 1, registering both the
`CollectionView` umbrella and the `CollectionView1` CI category without
changing the test assertions or platform coverage.

The missing Mac native-artifact publishing error is downstream of the
failed Pack step, so no pipeline workaround is needed. No competing open
repair targeting `inflight/current` was found.

### Issues Fixed

Repairs the `maui-pr` build failures on `inflight/current`; retains the
regression protection for #38131 and the test coverage for #37427.

### Validation

- BlazorWebView project builds for `net10.0-ios26.0` and
`net10.0-maccatalyst26.0`: zero warnings/errors.
- Existing UI-test category analyzer suite: 46 passed.
- Changed files formatted and `git diff --check` clean.

Local validation used the installed .NET 11 preview SDK targeting .NET
10. Full CI has not yet been rerun with the repository-pinned SDK.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
kubaflo pushed a commit that referenced this pull request Sep 21, 2026
)

Add null checks for _webViewHandler and related properties in
StartUrlSchemeTask and GetResponseBytes methods.

Description of Change
Checking if Handler has container before using VirtualView which can
crash app if is null

Issues Fixed
Fixes #38131
kubaflo added a commit that referenced this pull request Sep 21, 2026
<!-- Please let the below note in for people that find this PR -->
> [!NOTE]
> Are you waiting for the changes in this PR to be merged?
> It would be very helpful if you could [test the resulting
artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from
this PR and let us know in a comment if this change resolves your issue.
Thank you!

### Description of Change

Targets **`inflight/current`** to repair the two compiler/analyzer
failures in `maui-pr` [build
1597590](https://dev.azure.com/dnceng-public/public/_build/results?buildId=1597590).

- Fix **CS1061** in the iOS/Mac Catalyst BlazorWebView scheme handler
introduced by #38141: `BlazorWebViewHandler` has no `Handler` property.
Read the nullable `IViewHandler.VirtualView` property instead,
preserving the disconnected-handler guard and existing empty 404
response. The strongly typed `VirtualView` getter cannot be used for
this check because it throws when disconnected.
- Fix **MAUI0003** in the regression test added by #37437: use
method-level `ShardedTestCategory` with shard 1, registering both the
`CollectionView` umbrella and the `CollectionView1` CI category without
changing the test assertions or platform coverage.

The missing Mac native-artifact publishing error is downstream of the
failed Pack step, so no pipeline workaround is needed. No competing open
repair targeting `inflight/current` was found.

### Issues Fixed

Repairs the `maui-pr` build failures on `inflight/current`; retains the
regression protection for #38131 and the test coverage for #37427.

### Validation

- BlazorWebView project builds for `net10.0-ios26.0` and
`net10.0-maccatalyst26.0`: zero warnings/errors.
- Existing UI-test category analyzer suite: 46 passed.
- Changed files formatted and `git diff --check` clean.

Local validation used the installed .NET 11 preview SDK targeting .NET
10. Full CI has not yet been rerun with the repository-pinned SDK.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
kubaflo pushed a commit that referenced this pull request Sep 27, 2026
)

Add null checks for _webViewHandler and related properties in
StartUrlSchemeTask and GetResponseBytes methods.

Description of Change
Checking if Handler has container before using VirtualView which can
crash app if is null

Issues Fixed
Fixes #38131
kubaflo added a commit that referenced this pull request Sep 27, 2026
<!-- Please let the below note in for people that find this PR -->
> [!NOTE]
> Are you waiting for the changes in this PR to be merged?
> It would be very helpful if you could [test the resulting
artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from
this PR and let us know in a comment if this change resolves your issue.
Thank you!

### Description of Change

Targets **`inflight/current`** to repair the two compiler/analyzer
failures in `maui-pr` [build
1597590](https://dev.azure.com/dnceng-public/public/_build/results?buildId=1597590).

- Fix **CS1061** in the iOS/Mac Catalyst BlazorWebView scheme handler
introduced by #38141: `BlazorWebViewHandler` has no `Handler` property.
Read the nullable `IViewHandler.VirtualView` property instead,
preserving the disconnected-handler guard and existing empty 404
response. The strongly typed `VirtualView` getter cannot be used for
this check because it throws when disconnected.
- Fix **MAUI0003** in the regression test added by #37437: use
method-level `ShardedTestCategory` with shard 1, registering both the
`CollectionView` umbrella and the `CollectionView1` CI category without
changing the test assertions or platform coverage.

The missing Mac native-artifact publishing error is downstream of the
failed Pack step, so no pipeline workaround is needed. No competing open
repair targeting `inflight/current` was found.

### Issues Fixed

Repairs the `maui-pr` build failures on `inflight/current`; retains the
regression protection for #38131 and the test coverage for #37427.

### Validation

- BlazorWebView project builds for `net10.0-ios26.0` and
`net10.0-maccatalyst26.0`: zero warnings/errors.
- Existing UI-test category analyzer suite: 46 passed.
- Changed files formatted and `git diff --check` clean.

Local validation used the installed .NET 11 preview SDK targeting .NET
10. Full CI has not yet been rerun with the repository-pinned SDK.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
kubaflo pushed a commit that referenced this pull request Sep 27, 2026
)

Add null checks for _webViewHandler and related properties in
StartUrlSchemeTask and GetResponseBytes methods.

Description of Change
Checking if Handler has container before using VirtualView which can
crash app if is null

Issues Fixed
Fixes #38131
kubaflo added a commit that referenced this pull request Sep 27, 2026
<!-- Please let the below note in for people that find this PR -->
> [!NOTE]
> Are you waiting for the changes in this PR to be merged?
> It would be very helpful if you could [test the resulting
artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from
this PR and let us know in a comment if this change resolves your issue.
Thank you!

### Description of Change

Targets **`inflight/current`** to repair the two compiler/analyzer
failures in `maui-pr` [build
1597590](https://dev.azure.com/dnceng-public/public/_build/results?buildId=1597590).

- Fix **CS1061** in the iOS/Mac Catalyst BlazorWebView scheme handler
introduced by #38141: `BlazorWebViewHandler` has no `Handler` property.
Read the nullable `IViewHandler.VirtualView` property instead,
preserving the disconnected-handler guard and existing empty 404
response. The strongly typed `VirtualView` getter cannot be used for
this check because it throws when disconnected.
- Fix **MAUI0003** in the regression test added by #37437: use
method-level `ShardedTestCategory` with shard 1, registering both the
`CollectionView` umbrella and the `CollectionView1` CI category without
changing the test assertions or platform coverage.

The missing Mac native-artifact publishing error is downstream of the
failed Pack step, so no pipeline workaround is needed. No competing open
repair targeting `inflight/current` was found.

### Issues Fixed

Repairs the `maui-pr` build failures on `inflight/current`; retains the
regression protection for #38131 and the test coverage for #37427.

### Validation

- BlazorWebView project builds for `net10.0-ios26.0` and
`net10.0-maccatalyst26.0`: zero warnings/errors.
- Existing UI-test category analyzer suite: 46 passed.
- Changed files formatted and `git diff --check` clean.

Local validation used the installed .NET 11 preview SDK targeting .NET
10. Full CI has not yet been rerun with the repository-pinned SDK.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
kubaflo pushed a commit that referenced this pull request Oct 3, 2026
)

Add null checks for _webViewHandler and related properties in
StartUrlSchemeTask and GetResponseBytes methods.

Description of Change
Checking if Handler has container before using VirtualView which can
crash app if is null

Issues Fixed
Fixes #38131
kubaflo added a commit that referenced this pull request Oct 3, 2026
<!-- Please let the below note in for people that find this PR -->
> [!NOTE]
> Are you waiting for the changes in this PR to be merged?
> It would be very helpful if you could [test the resulting
artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from
this PR and let us know in a comment if this change resolves your issue.
Thank you!

### Description of Change

Targets **`inflight/current`** to repair the two compiler/analyzer
failures in `maui-pr` [build
1597590](https://dev.azure.com/dnceng-public/public/_build/results?buildId=1597590).

- Fix **CS1061** in the iOS/Mac Catalyst BlazorWebView scheme handler
introduced by #38141: `BlazorWebViewHandler` has no `Handler` property.
Read the nullable `IViewHandler.VirtualView` property instead,
preserving the disconnected-handler guard and existing empty 404
response. The strongly typed `VirtualView` getter cannot be used for
this check because it throws when disconnected.
- Fix **MAUI0003** in the regression test added by #37437: use
method-level `ShardedTestCategory` with shard 1, registering both the
`CollectionView` umbrella and the `CollectionView1` CI category without
changing the test assertions or platform coverage.

The missing Mac native-artifact publishing error is downstream of the
failed Pack step, so no pipeline workaround is needed. No competing open
repair targeting `inflight/current` was found.

### Issues Fixed

Repairs the `maui-pr` build failures on `inflight/current`; retains the
regression protection for #38131 and the test coverage for #37427.

### Validation

- BlazorWebView project builds for `net10.0-ios26.0` and
`net10.0-maccatalyst26.0`: zero warnings/errors.
- Existing UI-test category analyzer suite: 46 passed.
- Changed files formatted and `git diff --check` clean.

Local validation used the installed .NET 11 preview SDK targeting .NET
10. Full CI has not yet been rerun with the repository-pinned SDK.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
kubaflo pushed a commit that referenced this pull request Oct 3, 2026
)

Add null checks for _webViewHandler and related properties in
StartUrlSchemeTask and GetResponseBytes methods.

Description of Change
Checking if Handler has container before using VirtualView which can
crash app if is null

Issues Fixed
Fixes #38131
kubaflo added a commit that referenced this pull request Oct 3, 2026
<!-- Please let the below note in for people that find this PR -->
> [!NOTE]
> Are you waiting for the changes in this PR to be merged?
> It would be very helpful if you could [test the resulting
artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from
this PR and let us know in a comment if this change resolves your issue.
Thank you!

### Description of Change

Targets **`inflight/current`** to repair the two compiler/analyzer
failures in `maui-pr` [build
1597590](https://dev.azure.com/dnceng-public/public/_build/results?buildId=1597590).

- Fix **CS1061** in the iOS/Mac Catalyst BlazorWebView scheme handler
introduced by #38141: `BlazorWebViewHandler` has no `Handler` property.
Read the nullable `IViewHandler.VirtualView` property instead,
preserving the disconnected-handler guard and existing empty 404
response. The strongly typed `VirtualView` getter cannot be used for
this check because it throws when disconnected.
- Fix **MAUI0003** in the regression test added by #37437: use
method-level `ShardedTestCategory` with shard 1, registering both the
`CollectionView` umbrella and the `CollectionView1` CI category without
changing the test assertions or platform coverage.

The missing Mac native-artifact publishing error is downstream of the
failed Pack step, so no pipeline workaround is needed. No competing open
repair targeting `inflight/current` was found.

### Issues Fixed

Repairs the `maui-pr` build failures on `inflight/current`; retains the
regression protection for #38131 and the test coverage for #37427.

### Validation

- BlazorWebView project builds for `net10.0-ios26.0` and
`net10.0-maccatalyst26.0`: zero warnings/errors.
- Existing UI-test category analyzer suite: 46 passed.
- Changed files formatted and `git diff --check` clean.

Local validation used the installed .NET 11 preview SDK targeting .NET
10. Full CI has not yet been rerun with the repository-pinned SDK.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@github-actions github-actions Bot locked and limited conversation to collaborators Oct 4, 2026
@github-actions github-actions Bot added this to the .NET 10 SR12 milestone Oct 21, 2026

This branch was previously deployed

1 inactive deployment
copilot-pat-pool — 0a33768c Deployed Sep 3, 2026 by JimmyPun610 via conclusion #1713
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area-blazor Blazor Hybrid / Desktop, BlazorWebView community ✨ Community Contribution platform/ios platform/macos macOS / Mac Catalyst

Projects

None yet

Development

Successfully merging this pull request may close these issues.

iOS BlazorWebView crash the app sometime

2 participants