React Native 在试飞中坠毁

o7jaxewo  于 2023-02-24  发布在  React
关注(0)|答案(1)|浏览(111)

I am assembling the application with the help of EXPO
my code in App.tsx:

import 'expo-dev-client';
import React, {useState} from 'react';
import AgoraUIKit from 'agora-rn-uikit'; 
import { StyleSheet, Text, View } from 'react-native';

export default function App() {
    const [videoCall, setVideoCall] = useState(true);
    const props = {
        connectionData: {
            appId: 'db75cb2a42d84324bae3a93125e0422d',
            channel: 'test',
        },
        rtcCallbacks: {
            EndCall: () => setVideoCall(false),
        },
    };

    return videoCall ? (
    <AgoraUIKit connectionData={props.connectionData} rtcCallbacks={props.rtcCallbacks} />
    ) : null;
}

const styles = StyleSheet.create({
    container: {
    flex: 1,
    backgroundColor: '#fff',
    alignItems: 'center',
    justifyContent: 'center',
    },
});

Crash Feedback in the TestFlight:
Incident Identifier: 473A2BF0-12DB-424B-80D2-D1E787C432E1 Hardware Model: iPhone9,1 Process: myapp [16018] Path: /private/var/containers/Bundle/Application/2FB254B9-48F1-4155-ABCE-FF1089171885/myapp.app/myapp Identifier: com.fgf.binaryrocks Version: 1.3.18 (1.0.3) AppStoreTools: 14B44 AppVariant: 1:iPhone9,1:15 Beta: YES Code Type: ARM-64 (Native) Role: Foreground Parent Process: launchd [1] Coalition: com.fgf.binaryrocks [731]
Date/Time: 2022-11-25 13:37:23.5577 +0100 Launch Time: 2022-11-25 13:37:23.3366 +0100 OS Version: iPhone OS 15.6.1 (19G82) Release Type: User Baseband Version: 9.61.00 Report Version: 104
Exception Type: EXC_CRASH (SIGABRT) Exception Codes: 0x0000000000000000, 0x0000000000000000 Exception Note: EXC_CORPSE_NOTIFY Triggered by Thread: 2
Last Exception Backtrace: 0 CoreFoundation 0x18060fd1c _exceptionPreprocess + 216 (NSException.m:200) 1 libobjc.A.dylib 0x197e2fee4 objc_exception_throw + 56 (objc-exception.mm:565) 2 myapp 0x100329d70 RCTFatal + 568 (RCTAssert.m:147) 3 myapp 0x10039cfcc -[RCTExceptionsManager reportFatal:stack:exceptionId:extraDataAsJSON:] + 476 (RCTExceptionsManager.mm:77) 4 myapp 0x10039d810 -[RCTExceptionsManager reportException:] + 1292 (RCTExceptionsManager.mm:147) 5 CoreFoundation 0x18059ddd0 invoking + 144 (:-1) 6 CoreFoundation 0x1805b9ea8 -[NSInvocation invoke] + 300 (NSForwarding.m:3378) 7 CoreFoundation 0x1805ee2cc -[NSInvocation invokeWithTarget:] + 76 (NSForwarding.m:3475) 8 myapp 0x100357df4 -[RCTModuleMethod invokeWithBridge:module:arguments:] + 388 (RCTModuleMethod.mm:584) 9 myapp 0x100359f6c facebook::react::invokeInner(RCTBridge*, RCTModuleData*, unsigned int, folly::dynamic const&, int, (anonymous namespace)::SchedulingContext) + 452 (RCTNativeModule.mm:183) 10 myapp 0x100359bf4 facebook::react::RCTNativeModule::invoke(unsigned int, folly::dynamic&&, int)::$_0::operator()() const + 68 (RCTNativeModule.mm:104) 11 myapp 0x100359bf4 invocation function for block in facebook::react::RCTNativeModule::invoke(unsigned int, folly::dynamic&&, int) + 112 (RCTNativeModule.mm:95) 12 libdispatch.dylib 0x1802cf094 _dispatch_call_block_and_release + 24 (init.c:1517) 13 libdispatch.dylib 0x1802d0094 _dispatch_client_callout + 16 (object.m:560) 14 libdispatch.dylib 0x18027673c _dispatch_lane_serial_drain$VARIANT$mp + 644 (inline_internal.h:2622) 15 libdispatch.dylib 0x1802771f4 _dispatch_lane_invoke$VARIANT$mp + 408 (queue.c:3944) 16 libdispatch.dylib 0x180280ec8 _dispatch_workloop_worker_thread + 632 (queue.c:6732) 17 libsystem_pthread.dylib 0x1db95ce10 _pthread_wqthread + 284 (pthread.c:2599) 18 libsystem_pthread.dylib 0x1db95c93c start_wqthread + 8 (:-1)
Thread 0 name: Thread 0: 0 libsystem_kernel.dylib 0x00000001baed4aac mach_msg_trap + 8 (:-1) 1 libsystem_kernel.dylib 0x00000001baed507c mach_msg + 72 (mach_msg.c:119) 2 CoreFoundation 0x0000000180583d88 __CFRunLoopServiceMachPort + 368 (CFRunLoop.c:2646) 3 CoreFoundation 0x0000000180588090 __CFRunLoopRun + 1160 (CFRunLoop.c:3000) 4 CoreFoundation 0x000000018059b250 CFRunLoopRunSpecific + 572 (CFRunLoop.c:3268) 5 GraphicsServices 0x00000001a10c6988 GSEventRunModal + 160 (GSEvent.c:2200) 6 UIKitCore 0x0000000182d9ba94 -[UIApplication _run] + 1080 (UIApplication.m:3511) 7 UIKitCore 0x0000000182b34fd4 UIApplicationMain + 336 (UIApplication.m:5064) 8 myapp 0x00000001002951f0 main + 80 (main.m:7) 9 dyld 0x00000001008d84d0 start + 444 (dyldMain.cpp:879)
Thread 1: 0 libsystem_pthread.dylib 0x00000001db95c934 start_wqthread + 0 (:-1)
Thread 2 name: Thread 2 Crashed: 0 libsystem_kernel.dylib 0x00000001baedabbc __pthread_kill + 8 (:-1) 1 libsystem_pthread.dylib 0x00000001db968854 pthread_kill + 208 (pthread.c:1668) 2 libsystem_c.dylib 0x000000018acf96ac abort + 124 (abort.c:118) 3 libcabi.dylib 0x0000000197f27dd8 abort_message + 128 (abort_message.cpp:78) 4 libcabi.dylib 0x0000000197f1855c demangling_terminate_handler() + 300 (cxa_default_handlers.cpp:71) 5 libobjc.A.dylib 0x0000000197e358f8 _objc_terminate() + 124 (objc-exception.mm:701) 6 libc++abi.dylib 0x0000000197f27274 std::__terminate(void (*)()) + 16 (cxa_handlers.cpp:59) 7 libc++abi.dylib 0x0000000197f2721c std::terminate() + 60 (cxa_handlers.cpp:88) 8 libdispatch.dylib 0x00000001802d00a8 _dispatch_client_callout + 36 (object.m:563) 9 libdispatch.dylib 0x000000018027673c _dispatch_lane_serial_drain$VARIANT$mp + 644 (inline_internal.h:2622) 10 libdispatch.dylib 0x00000001802771f4 _dispatch_lane_invoke$VARIANT$mp + 408 (queue.c:3944) 11 libdispatch.dylib 0x0000000180280ec8 _dispatch_workloop_worker_thread + 632 (queue.c:6732) 12 libsystem_pthread.dylib 0x00000001db95ce10 _pthread_wqthread + 284 (pthread.c:2599) 13 libsystem_pthread.dylib 0x00000001db95c93c start_wqthread + 8 (:-1)
Thread 3: 0 libsystem_pthread.dylib 0x00000001db95c934 start_wqthread + 0 (:-1)

Thread 4 name: Thread 4: 0 libsystem_kernel.dylib 0x00000001baed4aac mach_msg_trap + 8 (:-1) 1 libsystem_kernel.dylib 0x00000001baed507c mach_msg + 72 (mach_msg.c:119) 2 CoreFoundation 0x0000000180583d88 __CFRunLoopServiceMachPort + 368 (CFRunLoop.c:2646) 3 CoreFoundation 0x0000000180588090 __CFRunLoopRun + 1160 (CFRunLoop.c:3000) 4 CoreFoundation 0x000000018059b250 CFRunLoopRunSpecific + 572 (CFRunLoop.c:3268) 5 Foundation 0x0000000181ca8eec -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 232 (NSRunLoop.m:373) 6 Foundation 0x0000000181ce8000 -[NSRunLoop(NSRunLoop) runUntilDate:] + 88 (NSRunLoop.m:420) 7 UIKitCore 0x0000000182d1af00 -[UIEventFetcher threadMain] + 512 (UIEventFetcher.m:1167) 8 Foundation 0x0000000181cf5bfc NSThread__start + 792 (NSThread.m:972) 9 libsystem_pthread.dylib 0x00000001db95e348 _pthread_start + 116 (pthread.c:891) 10 libsystem_pthread.dylib 0x00000001db95c948 thread_start + 8 (:-1)
Thread 5: 0 libsystem_pthread.dylib 0x00000001db95c934 start_wqthread + 0 (:-1)
Thread 6: 0 libsystem_pthread.dylib 0x00000001db95c934 start_wqthread + 0 (:-1)

Thread 7 name: Thread 7: 0 JavaScriptCore 0x000000018b1f3058 JSStringRelease + 32 (atomic:1083) 1 myapp 0x00000001003ecf54 facebook::jsc::JSCRuntime::createValue(OpaqueJSValue const*) const + 204 (JSCRuntime.cpp:1403) 2 myapp 0x00000001003ee8e8 facebook::jsc::JSCRuntime::getValueAtIndex(facebook::jsi::Array const&, unsigned long) + 84 (JSCRuntime.cpp:1047) 3 myapp 0x00000001003f5568 facebook::jsi::Array::getValueAtIndex(facebook::jsi::Runtime&, unsigned long) const + 28 (jsi-inl.h:220) 4 myapp 0x00000001003f5568 facebook::jsi::dynamicFromValue(facebook::jsi::Runtime&, facebook::jsi::Value const&) + 524 (JSIDynamic.cpp:175) 5 myapp 0x00000001003f84d4 facebook::react::JSIExecutor::callNativeModules(facebook::jsi::Value const&, bool) + 80 (JSIExecutor.cpp:419) 6 myapp 0x00000001003f7c10 facebook::react::JSIExecutor::callFunction(std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&, std::__1::basic_string<char, std::__1::char_traits, st... + 412 (JSIExecutor.cpp:269) 7 myapp 0x00000001003eb2e0 std::__1::__function::__value_func<void (facebook::react::JSExecutor*)>::operator()(facebook::react::JSExecutor*&&) const + 24 (function.h:505) 8 myapp 0x00000001003eb2e0 std::__1::function<void (facebook::react::JSExecutor*)>::operator()(facebook::react::JSExecutor*) const + 24 (function.h:1182) 9 myapp 0x00000001003eb2e0 facebook::react::NativeToJsBridge::runOnExecutorQueue(std::__1::function<void (facebook::react::JSExecutor*)>)::$_8::operator()() const + 48 (NativeToJsBridge.cpp:310) 10 myapp 0x00000001003eb2e0 decltype(static_cast<facebook::react::NativeToJsBridge::runOnExecutorQueue(std::__1::function<void (facebook::react::JSExecutor*)>)::$_8&>(fp)()) std::__1::__invoke<facebook::react::NativeToJsBridg... + 48 (type_traits:3918) 11 myapp 0x00000001003eb2e0 void std::__1::__invoke_void_return_wrapper<void, true>::__call<facebook::react::NativeToJsBridge::runOnExecutorQueue(std::__1::function<void (facebook::react::JSExecutor*)>)::$_8&>(facebook::react... + 48 (invoke.h:61) 12 myapp 0x00000001003eb2e0 std::__1::__function::__alloc_func<facebook::react::NativeToJsBridge::runOnExecutorQueue(std::__1::function<void (facebook::react::JSExecutor*)>)::$_8, std::__1::allocator<facebook::react::NativeTo... + 48 (function.h:178) 13 myapp 0x00000001003eb2e0 std::__1::__function::__func<facebook::react::NativeToJsBridge::runOnExecutorQueue(std::__1::function<void (facebook::react::JSExecutor*)>)::$_8, std::__1::allocator<facebook::react::NativeToJsBrid... + 60 (function.h:352) 14 myapp 0x00000001003457f8 std::__1::__function::__value_func<void ()>::operator()() const + 20 (function.h:505) 15 myapp 0x00000001003457f8 std::__1::function<void ()>::operator()() const + 20 (function.h:1182) 16 myapp 0x00000001003457f8 facebook::react::tryAndReturnError(std::__1::function<void ()> const&) + 32 (RCTCxxUtils.mm:74) 17 myapp 0x0000000100350874 facebook::react::RCTMessageThread::tryFunc(std::__1::function<void ()> const&) + 24 (RCTMessageThread.mm:69) 18 myapp 0x0000000100350628 std::__1::__function::__value_func<void ()>::operator()() const + 20 (function.h:505) 19 myapp 0x0000000100350628 std::__1::function<void ()>::operator()() const + 20 (function.h:1182) 20 myapp 0x0000000100350628 invocation function for block in facebook::react::RCTMessageThread::runAsync(std::__1::function<void ()>) + 44 (RCTMessageThread.mm:45) 21 CoreFoundation 0x00000001805ea74c CFRUNLOOP_IS_CALLING_OUT_TO_A_BLOCK + 20 (CFRunLoop.c:1820) 22 CoreFoundation 0x00000001805eb570 __CFRunLoopDoBlocks + 408 (CFRunLoop.c:1862) 23 CoreFoundation 0x0000000180587ef8 __CFRunLoopRun + 752 (CFRunLoop.c:2949) 24 CoreFoundation 0x000000018059b250 CFRunLoopRunSpecific + 572 (CFRunLoop.c:3268) 25 myapp 0x000000010033b84c +[RCTCxxBridge runRunLoop] + 212 (RCTCxxBridge.mm:335) 26 Foundation 0x0000000181cf5bfc NSThread__start + 792 (NSThread.m:972) 27 libsystem_pthread.dylib 0x00000001db95e348 _pthread_start + 116 (pthread.c:891) 28 libsystem_pthread.dylib 0x00000001db95c948 thread_start + 8 (:-1)
Thread 8 name: Thread 8: 0 libsystem_kernel.dylib 0x00000001baed5484 __psynch_cvwait + 8 (:-1) 1 libsystem_pthread.dylib 0x00000001db964bd4 _pthread_cond_wait$VARIANT$mp + 1240 (pthread_cond.c:636) 2 JavaScriptCore 0x000000018ae8a154 scavenger_thread_main + 1120 (pas_scavenger.c:135) 3 libsystem_pthread.dylib 0x00000001db95e348 _pthread_start + 116 (pthread.c:891) 4 libsystem_pthread.dylib 0x00000001db95c948 thread_start + 8 (:-1)

Thread 9 name: Thread 9: 0 libsystem_kernel.dylib 0x00000001baed5484 __psynch_cvwait + 8 (:-1) 1 libsystem_pthread.dylib 0x00000001db964bd4 _pthread_cond_wait$VARIANT$mp + 1240 (pthread_cond.c:636) 2 JavaScriptCore 0x000000018adeea64 WTF::ParkingLot::parkConditionallyImpl(void const*, WTF::ScopedLambda<bool ()> const&, WTF::ScopedLambda<void ()> const&, WTF::TimeWithDynamicClockType const&) + 1984 (ThreadingPOSIX.cpp:622) 3 JavaScriptCore 0x000000018adb68ec bool WTF::Condition::waitUntilUncheckedWTF::Lock(WTF::Lock&, WTF::TimeWithDynamicClockType const&) + 176 (ParkingLot.h:82) 4 JavaScriptCore 0x000000018adb6d3c WTF::Detail::CallableWrapper<WTF::AutomaticThread::start(WTF::AbstractLocker const&)::$_0, void>::call() + 328 (Condition.h:77) 5 JavaScriptCore 0x000000018ae0ead4 WTF::Thread::entryPoint(WTF::Thread::NewThreadContext*) + 336 (Function.h:82) 6 JavaScriptCore 0x000000018ae10dac WTF::wtfThreadEntryPoint(void*) + 12 (ThreadingPOSIX.cpp:242) 7 libsystem_pthread.dylib 0x00000001db95e348 _pthread_start + 116 (pthread.c:891) 8 libsystem_pthread.dylib 0x00000001db95c948 thread_start + 8 (:-1)
Thread 2 crashed with ARM Thread State (64-bit): x0: 0x0000000000000000 x1: 0x0000000000000000 x2: 0x0000000000000000 x3: 0x0000000000000000 x4: 0x0000000197f2aea1 x5: 0x000000016fc82420 x6: 0x000000000000006e x7: 0xffffffffffffb5dc x8: 0x000000016fc83000 x9: 0xe43a2ddff38421c7 x10: 0x0000000000000200 x11: 0x000000000000000b x12: 0x0000000000000000 x13: 0x0000000000000000 x14: 0x0000000000000010 x15: 0x0000000000000000 x16: 0x0000000000000148 x17: 0x0000000000000001 x18: 0x0000000000000000 x19: 0x0000000000000006 x20: 0x0000000000001803 x21: 0x000000016fc830e0 x22: 0x000000016fc830e0 x23: 0x0000000283111630 x24: 0x0000000000000000 x25: 0x0000000000000114 x26: 0x0000000000000000 x27: 0x0000000000000000 x28: 0x0000000280a0f940 fp: 0x000000016fc82390 lr: 0x00000001db968854 sp: 0x000000016fc82370 pc: 0x00000001baedabbc cpsr: 0x40000000 esr: 0x56000080 Address size fault
Binary Images: 0x100290000 - 0x1004d3fff myapp arm64 <4620a0f623323b5a9b4901fd182135c9> /private/var/containers/Bundle/Application/2FB254B9-48F1-4155-ABCE-FF1089171885/myapp.app/myapp 0x1008c0000 - 0x100913fff dyld arm64 /usr/lib/dyld 0x18026c000 - 0x1802eefff libdispatch.dylib arm64 <4fc02901034e35cf8cf25b7f81d579e4> /usr/lib/system/libdispatch.dylib 0x18057d000 - 0x1809bafff CoreFoundation arm64 <55a96cfe31413f568ab1569c607b9370> /System/Library/Frameworks/CoreFoundation.framework/CoreFoundation 0x181c91000 - 0x181f75fff Foundation arm64 <3fe3654abb333073a53a563ff81c1dd0> /System/Library/Frameworks/Foundation.framework/Foundation 0x1828b6000 - 0x184051fff UIKitCore arm64 /System/Library/PrivateFrameworks/UIKitCore.framework/UIKitCore 0x18acda000 - 0x18ad55fff libsystem_c.dylib arm64 <888f81bafb993ea79e300cf73bab720f> /usr/lib/system/libsystem_c.dylib 0x18ada9000 - 0x18c128fff JavaScriptCore arm64 <39a6a7841b333630b400b3f5fa2ddcfe> /System/Library/Frameworks/JavaScriptCore.framework/JavaScriptCore 0x197e1b000 - 0x197e52fff libobjc.A.dylib arm64 /usr/lib/libobjc.A.dylib 0x197f17000 - 0x197f2dfff libcabi.dylib arm64 <315a3f290b9c3e29b855f6c0958859fd> /usr/lib/libcabi.dylib 0x1a10c5000 - 0x1a10cdfff GraphicsServices arm64 <99e76e47eaad3c2ab6cdc3bd3824fe8c> /System/Library/PrivateFrameworks/GraphicsServices.framework/GraphicsServices 0x1baed4000 - 0x1baf07fff libsystem_kernel.dylib arm64 <14abffc1c15e3c93a655a917279db06c> /usr/lib/system/libsystem_kernel.dylib 0x1db95b000 - 0x1db96bfff libsystem_pthread.dylib arm64 <9890465bab703de38d35adfd1441b7fe> /usr/lib/system/libsystem_pthread.dylib
EOF
I tried to do the documentation, agora with expo

u59ebvdq

u59ebvdq1#

这个问题只出现在iOS上,我通过添加rtcUid(作为数字)而不是文档中的uid来修复它。

connectionData: {
   appId: 'db75cb2a42d84324bae3a93125e0422d',
   channel: 'test',
   rtcUid: myUid
   token,
}

相关问题