Open djorkaeffalexandre opened 4 years ago
@thebylito I just opened a PR with a fix. Thanks.
I also face the same issue.
function genMethod(moduleID: number, methodID: number, type: MethodType) {
let fn = null;
if (type === 'promise') {
fn = function promiseMethodWrapper(...args: Array<any>) {
// In case we reject, capture a useful stack trace here.
const enqueueingFrameError: ExtendedError = new Error(); // CRASH OCCURS HERE
return new Promise((resolve, reject) => {
BatchedBridge.enqueueNativeCall(
moduleID,
methodID,
args,
And in my code, I surround the code by try/catch:
React.useEffect(() => {
const changeColor = async (color: string, light: boolean) => {
try {
await changeNavigationBarColor(color, light, false);
} catch (e) {}
};
Hey @thebylito, thanks about this library. I'm facing some bugs with the no attached activity, and this looks like a unhandled promise, but I'm surrounding this into a
try/catch
block. This looks that never reject the promise, just thrown a native error. Can you take a look? Thanks.