From 687ddf0f32d10112ec0f1678ce2e903f36e8fcd7 Mon Sep 17 00:00:00 2001 From: Peter Argany Date: Mon, 14 Dec 2020 12:56:19 -0800 Subject: [PATCH] Downgrade TurboModule crash to warning Summary: This is to address a UBN blocking FBiOSv300 rollout. A TM is attempting to invoke a promise more than once and crashing. We can't find the TM, so downgrading this to a warning to unblock the release. Plan going forward: - Replace this with some better logging to try and identify the culprit module. Changelog: [Internal] Reviewed By: RSNara Differential Revision: D25539676 fbshipit-source-id: 5b75b71110eaa393378049de6e0d9a77e6328831 --- .../react/nativemodule/core/platform/ios/RCTTurboModule.mm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ReactCommon/react/nativemodule/core/platform/ios/RCTTurboModule.mm b/ReactCommon/react/nativemodule/core/platform/ios/RCTTurboModule.mm index 4c7d3031bfb..c605a0ff977 100644 --- a/ReactCommon/react/nativemodule/core/platform/ios/RCTTurboModule.mm +++ b/ReactCommon/react/nativemodule/core/platform/ios/RCTTurboModule.mm @@ -244,7 +244,8 @@ jsi::Value ObjCTurboModule::createPromise( } if (resolveWasCalled) { - throw std::runtime_error("Tried to resolve a promise more than once."); + RCTLogWarn(@"Tried to resolve a promise more than once."); + return; } auto strongResolveWrapper = weakResolveWrapper.lock();