maui icon indicating copy to clipboard operation
maui copied to clipboard

NullReferenceException throws on Windows when setting Cookies on .NET MAUI WebView

Open NanthiniMahalingam opened this issue 1 year ago • 16 comments

Root Cause

While setting a cookie in MAUI WebView, CoreWebView2 is null before the CoreWebView2Initialized event triggered.

Description of Change

Added the null condition for CoreWebView2 property while sync platform cookie method.

Issues Fixed

Fixes #18452

Validated the behaviour in the following platforms

  • [x] Android
  • [x] Windows
  • [x] iOS
  • [x] Mac

Output images Before changes image

After changes image

NanthiniMahalingam avatar Sep 20 '24 13:09 NanthiniMahalingam

/azp run

jfversluis avatar Sep 20 '24 15:09 jfversluis

Azure Pipelines successfully started running 3 pipeline(s).

azure-pipelines[bot] avatar Sep 20 '24 16:09 azure-pipelines[bot]

/azp run

rmarinho avatar Sep 24 '24 11:09 rmarinho

Azure Pipelines successfully started running 3 pipeline(s).

azure-pipelines[bot] avatar Sep 24 '24 11:09 azure-pipelines[bot]

/rebase

rmarinho avatar Sep 27 '24 10:09 rmarinho

/azp run

rmarinho avatar Sep 27 '24 10:09 rmarinho

Azure Pipelines successfully started running 3 pipeline(s).

azure-pipelines[bot] avatar Sep 27 '24 10:09 azure-pipelines[bot]

Azure Pipelines successfully started running 3 pipeline(s).

azure-pipelines[bot] avatar Sep 27 '24 17:09 azure-pipelines[bot]

Azure Pipelines successfully started running 3 pipeline(s).

azure-pipelines[bot] avatar Oct 01 '24 12:10 azure-pipelines[bot]

/azp run

rmarinho avatar Oct 03 '24 09:10 rmarinho

Azure Pipelines successfully started running 3 pipeline(s).

azure-pipelines[bot] avatar Oct 03 '24 09:10 azure-pipelines[bot]

Azure Pipelines successfully started running 3 pipeline(s).

azure-pipelines[bot] avatar Oct 14 '24 10:10 azure-pipelines[bot]

/azp run

PureWeen avatar Oct 14 '24 17:10 PureWeen

Azure Pipelines successfully started running 3 pipeline(s).

azure-pipelines[bot] avatar Oct 14 '24 17:10 azure-pipelines[bot]

/azp run

jsuarezruiz avatar Oct 25 '24 10:10 jsuarezruiz

Azure Pipelines successfully started running 3 pipeline(s).

azure-pipelines[bot] avatar Oct 25 '24 10:10 azure-pipelines[bot]

I've reran the CI but I think this one might be causing some issues

UI tests are failing

image

and device tests are both crashing https://dev.azure.com/xamarin/public/_build/results?buildId=125725&view=results

Hi @PureWeen , We've checked and resolved the failed cases with the updated fix. The above test cases pass successfully. Could you please verify them once?

NanthiniMahalingam avatar Oct 28 '24 10:10 NanthiniMahalingam

/azp run

jsuarezruiz avatar Oct 28 '24 11:10 jsuarezruiz

Azure Pipelines successfully started running 3 pipeline(s).

azure-pipelines[bot] avatar Oct 28 '24 11:10 azure-pipelines[bot]

Azure Pipelines successfully started running 3 pipeline(s).

azure-pipelines[bot] avatar Oct 29 '24 11:10 azure-pipelines[bot]

Azure Pipelines successfully started running 3 pipeline(s).

azure-pipelines[bot] avatar Nov 04 '24 14:11 azure-pipelines[bot]

/azp run

jsuarezruiz avatar Nov 06 '24 09:11 jsuarezruiz

Azure Pipelines successfully started running 3 pipeline(s).

azure-pipelines[bot] avatar Nov 06 '24 09:11 azure-pipelines[bot]

/azp run

PureWeen avatar Nov 08 '24 23:11 PureWeen

Azure Pipelines successfully started running 3 pipeline(s).

azure-pipelines[bot] avatar Nov 08 '24 23:11 azure-pipelines[bot]

/azp run

jsuarezruiz avatar Nov 13 '24 12:11 jsuarezruiz

Azure Pipelines successfully started running 3 pipeline(s).

azure-pipelines[bot] avatar Nov 13 '24 12:11 azure-pipelines[bot]

/rebase

NanthiniMahalingam avatar Nov 20 '24 06:11 NanthiniMahalingam

/rebase

NanthiniMahalingam avatar Nov 21 '24 05:11 NanthiniMahalingam

/rebase

NanthiniMahalingam avatar Nov 21 '24 13:11 NanthiniMahalingam