Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/ios/119.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ios 错误:global.nativeTraceBeginSection不是函数_Ios_Xcode_React Native - Fatal编程技术网

Ios 错误:global.nativeTraceBeginSection不是函数

Ios 错误:global.nativeTraceBeginSection不是函数,ios,xcode,react-native,Ios,Xcode,React Native,我没有改变任何东西,但突然我在我的xproject中出现了这个错误,应用程序被卡住了,当我通过Xcode运行模拟器时,它可以工作,但不能使用物理设备。 完整日志如下: 'Failed to print error: ', 'global.nativeTraceBeginSection is not a function. (In \'global.nativeTraceBeginSection(TRACE_TAG_REACT_APPS, profileName, args)\',

我没有改变任何东西,但突然我在我的xproject中出现了这个错误,应用程序被卡住了,当我通过Xcode运行模拟器时,它可以工作,但不能使用物理设备。 完整日志如下:

        'Failed to print error: ', 'global.nativeTraceBeginSection is not a function. (In \'global.nativeTraceBeginSection(TRACE_TAG_REACT_APPS, profileName, args)\', \'global.nativeTraceBeginSection\' is undefined)'
       WARNING: Logging before InitGoogleLogging() is written to STDERR
   E0910 19:37:09.077337 1871998976 JSCHelpers.cpp:137] Got JS Exception: Exception calling object as function: global.nativeTraceEndSection is not a function. (In 'global.nativeTraceEndSection(TRACE_TAG_REACT_APPS)', 'global.nativeTraceEndSection' is undefined) (<unknown file>:2303)
  E0910 19:37:09.077525 1871998976 JSCHelpers.cpp:143] Got JS Stack: endEvent@http://192.168.1.27.xip.io:8081/index.bundle?platform=ios&dev=true&minify=false:2303:35
  __callFunction@http://192.168.1.27.xip.io:8081/index.bundle?platform=ios&dev=true&minify=false:2098:24
  http://192.168.1.27.xip.io:8081/index.bundle?platform=ios&dev=true&minify=false:1927:29
__guard@http://192.168.1.27.xip.io:8081/index.bundle?platform=ios&dev=true&minify=false:2068:11
 callFunctionReturnFlushedQueue@http://192.168.1.27.xip.io:8081/index.bundle?platform=ios&dev=true&minify=false:1926:19
 callFunctionReturnFlushedQueue@[native code]
2018-09-10 19:37:09.079 [fatal][tid:com.facebook.react.JavaScript] Error calling Systrace.setEnabled

 Unhandled JS Exception: Exception calling object as function: global.nativeTraceEndSection is not a function. (In 'global.nativeTraceEndSection(TRACE_TAG_REACT_APPS)', 'global.nativeTraceEndSection' is undefined) (<unknown file>:2303)
2018-09-10 19:37:09.082 [error][tid:com.facebook.react.JavaScript] global.nativeTraceBeginSection is not a function. (In 'global.nativeTraceBeginSection(TRACE_TAG_REACT_APPS, profileName, args)', 'global.nativeTraceBeginSection' is undefined)
2018-09-10 19:37:09.083 [info][tid:com.facebook.react.JavaScript] 'Failed to print error: ', 'Can\'t find variable: regeneratorRuntime'
E0910 19:37:09.086755 1871998976 JSCHelpers.cpp:137] Got JS Exception: Exception calling object as function: global.nativeTraceBeginSection is not a function. (In 'global.nativeTraceBeginSection(TRACE_TAG_REACT_APPS, profileName, args)', 'global.nativeTraceBeginSection' is undefined) (<unknown file>:2298)
E0910 19:37:09.086828 1871998976 JSCHelpers.cpp:143] Got JS Stack: beginEvent@http://192.168.1.27.xip.io:8081/index.bundle?platform=ios&dev=true&minify=false:2298:37
__invokeCallback@http://192.168.1.27.xip.io:8081/index.bundle?platform=ios&dev=true&minify=false:2125:28
http://192.168.1.27.xip.io:8081/index.bundle?platform=ios&dev=true&minify=false:1950:32
__guard@http://192.168.1.27.xip.io:8081/index.bundle?platform=ios&dev=true&minify=false:2068:11
invokeCallbackAndReturnFlushedQueue@http://192.168.1.27.xip.io:8081/index.bundle?platform=ios&dev=true&minify=false:1949:19
invokeCallbackAndReturnFlushedQueue@[native code]
(lldb) 
“未能打印错误:”,“global.nativeTraceBeginSection不是函数。(在'global.nativetracebeginstation(TRACE\u TAG\u REACT\u APPS,profileName,args)\'中,'global.nativetracebeginstation'未定义)'
警告:在InitGoogleLogging()写入STDERR之前进行日志记录
E0910 19:37:09.077337 1871998976 JSCHelpers.cpp:137]获取JS异常:异常作为函数调用对象:global.nativeTraceEndSection不是函数。(在“global.nativeTraceEndSection(跟踪标记反应应用)”中,“global.nativeTraceEndSection”未定义)(:2303)
E0910 19:37:09.077525 1871998976 JSCHelpers.cpp:143]获得JS堆栈:endEvent@http://192.168.1.27.xip.io:8081/index.bundle?platform=ios&dev=true&minify=false:2303:35
__callFunction@http://192.168.1.27.xip.io:8081/index.bundle?platform=ios&dev=true&minify=false:2098:24
http://192.168.1.27.xip.io:8081/index.bundle?platform=ios&dev=true&minify=false:1927:29
__guard@http://192.168.1.27.xip.io:8081/index.bundle?platform=ios&dev=true&minify=false:2068:11
callFunctionReturnFlushedQueue@http://192.168.1.27.xip.io:8081/index.bundle?platform=ios&dev=true&minify=false:1926:19
callFunctionReturnFlushedQueue@[本机代码]
2018-09-10 19:37:09.079[致命][tid:com.facebook.react.JavaScript]调用Systrace.setEnabled时出错
未处理的JS异常:作为函数调用对象的异常:global.nativeTraceEndSection不是函数。(在“global.nativeTraceEndSection(跟踪标记反应应用)”中,“global.nativeTraceEndSection”未定义)(:2303)
2018-09-10 19:37:09.082[错误][tid:com.facebook.react.JavaScript]global.nativeTraceBeginSection不是一个函数。(在'global.nativetracebeginstation(TRACE_TAG_REACT_APPS,profileName,args)'中,'global.nativetracebeginstation'未定义)
2018-09-10 19:37:09.083[信息][tid:com.facebook.react.JavaScript]“打印失败错误:”,“找不到变量:RecreatorRuntime”
E0910 19:37:09.086755 1871998976 JSCHelpers.cpp:137]获取了JS异常:作为函数调用对象的异常:global.nativetracebeginstation不是函数。(在“global.nativetracebeginstation(TRACE_TAG_REACT_APPS,profileName,args)”中,“global.nativetracebeginstation”未定义)(:2298)
E0910 19:37:09.086828 1871998976 JSCHelpers.cpp:143]获得JS堆栈:beginEvent@http://192.168.1.27.xip.io:8081/index.bundle?platform=ios&dev=true&minify=false:2298:37
__invokeCallback@http://192.168.1.27.xip.io:8081/index.bundle?platform=ios&dev=true&minify=false:2125:28
http://192.168.1.27.xip.io:8081/index.bundle?platform=ios&dev=true&minify=false:1950:32
__guard@http://192.168.1.27.xip.io:8081/index.bundle?platform=ios&dev=true&minify=false:2068:11
invokeCallbackAndReturnFlushedQueue@http://192.168.1.27.xip.io:8081/index.bundle?platform=ios&dev=true&minify=false:1949:19
invokeCallbackAndReturnFlushedQueue@[本机代码]
(lldb)
我一直在努力寻找解决方案,但都没有成功。 此错误显示在我的Xcode logged上,而不是手机屏幕上


非常感谢你的帮助

这是一个已知的、未解决的问题。GitHub问题中有一些变通方法,包括:

  • 删除,然后从Xcode或
    react native run ios重新安装应用程序
  • 回到旧桥()

有关更多详细信息,请参阅。

我遇到了相同的问题,因为我无意中启用了启动Systrace,而且这是一个已知的问题。。。我发现了错误

对我有效的方法是禁用启动Systrace并重新启动项目。我怎么做到的

命令⌘ + D


禁用启动Systrace,就这样

嗨,你说的删除然后从Xcode重新安装应用是什么意思?我该怎么做?只需从模拟器或设备中删除应用程序…然后重建…这一个适合我!但我认为这只是暂时的解决办法,它可能会回来。顺便问一下,你知道为什么会突然发生吗?在此之前,我从来没有遇到过这个问题,但是突然间,我不确定是什么原因引起的,但是从代码中,它可能与C++桥中的bug有关。如果答案解决了您的问题,请将其标记为正确答案,以便其他人知道您仍在寻求帮助。感谢您的帮助,因为我在MAC OS emulator中打开了调试工具:按Control+Command+Z,单击Disable start Systrace,然后运行againg:npx react native run ios