Open tido64 opened 3 years ago
Some additional clean up here is likely appropriate as the usage of unique assert tags isn't being appropriately used here. Direct fix is to have the assert hooked up to something appropriate rather than nothing.
All hits are in vnext/Mso
, with one exception in vnext/Microsoft.ReactNative/ReactHost/ReactHost.cpp
.
@vmoroz FYI
It seems like
AssertSz
is just being silently ignored. In 0.64, I hit this issue when the JS bundle is invalid. An exception gets thrown inSystemChakraRuntime::evaluateJavaScriptSimple
https://github.com/microsoft/react-native-windows/blob/392aa9ff15e58cc68b2c30db57fd57708c51756d/vnext/Shared/JSI/ChakraJsiRuntime_edgemode.cpp#L71-L72
It gets caught by
ReactInstanceWin::OnError
https://github.com/microsoft/react-native-windows/blob/392aa9ff15e58cc68b2c30db57fd57708c51756d/vnext/Microsoft.ReactNative/ReactHost/ReactInstanceWin.cpp#L736-L738
which eventually ends up calling
https://github.com/microsoft/react-native-windows/blob/392aa9ff15e58cc68b2c30db57fd57708c51756d/vnext/Mso/src/debugAssertApi/debugAssertApi.cpp#L79-L82
But because we don't have any listeners set, nothing happens and the exception is just ignored.
I realize this exact repro was fixed in https://github.com/microsoft/react-native-windows/commit/7b2bcbb597ae8f2dae93d4a09cef6787cdb82903, but after talking with @acoates-ms, it sounds like there are other places calling
AssertSz
.Full stack trace:
Environment
npx react-native --version
: 5.0.1npx react-native info
:Steps To Reproduce
Expected Results
AssertSz
should do something other than being silently discarded, e.g. throw or display a message.