react-native-windows icon indicating copy to clipboard operation
react-native-windows copied to clipboard

WinRTWebSocketResource surfaces exceptions on debug builds

Open JunielKatarn opened this issue 6 years ago • 3 comments

Environment

yarn install
yarn build
cd vnext
nuget restore ReactWindows-Desktop.sln
msbuild ReactWindows-Desktop.sln
  • Target Platform Version(s): 10.0.18362

  • Target Device(s): Desktop

  • Visual Studio Version: 16.6.1

  • Build Configuration: x64 | Debug

Steps to Reproduce

From the Test Explorer, run RNTesterIntegrationTests::WebSocket, without setting up a test WebSocket server

(Write your steps here:)

  1. Go to Test Explorer in Visual Studio.
  2. Select Test RNTesterIntegrationTests::WebSocket.
  3. Run test

Note: Do not start the WebSocket test server. These steps are meant to show how the connection error is handled. In consequence, the test is expected to fail.

Expected Behavior

The winrt::hresult_error exception is immediately caught by the corresponding clause in WinRTWebSocketResource::PerformConnect.

Actual Behavior

The exception shows up interrupting the debugging section, even though it does get caught and handled properly.

This happens for every WinRT exception thrown in WinRTWebSocketResource.

Additional context

The UWP implementation relies on awaitable type lessthrow_await_adapter. See preprocessor flag DEFAULT_CPPWINRT_EXCEPTIONS.

JunielKatarn avatar Jun 05 '20 23:06 JunielKatarn

Requested backport to RN60. We are getting feedback from Outlook folks that this is impacting their inner dev loop

Khalef1 avatar Jun 06 '20 20:06 Khalef1

@JunielKatarn dupe of #4995 ?

asklar avatar Jun 07 '20 00:06 asklar

@asklar Yikes! Yes.

Closing as duplicate.

JunielKatarn avatar Jun 08 '20 22:06 JunielKatarn