Release mode crashes when building react-native app using xcode - xcode

Module AppRegistry is not a registered callable module (calling
runApplication)
when running in release mode a react-native app
xcode: 10.1
react-native: 0.57
When running a react-native app in release mode, it crashes and shows warning message as follows
It is working fine while running as debug mode.
2019-02-11 15:33:04.330531+0800 EASE[1709:691989] [DYMTLInitPlatform] platform initialization successful
2019-02-11 15:33:04.639426+0800 EASE[1709:691855] =======>>>>-[ViewController initWithNibName:bundle:]
2019-02-11 15:33:04.639721+0800 EASE[1709:691855] ================ViewController :going initWithNibName, storyBoard goto ===========
2019-02-11 15:33:04.639739+0800 EASE[1709:691855] ================ViewController :start sync===========
2019-02-11 15:33:04.641529+0800 EASE[1709:691855] ===========Here is the synchronization when the program starts============
2019-02-11 15:33:05.069459+0800 EASE[1709:691855] The application is in the foreground and is active
2019-02-11 15:33:05.468 [error][tid:com.facebook.react.JavaScript] Can't find variable: n
2019-02-11 15:33:05.467943+0800 EASE[1709:692012] Can't find variable: n
2019-02-11 15:33:05.470 [fatal][tid:com.facebook.react.ExceptionsManagerQueue] Unhandled JS Exception: Can't find variable: n
2019-02-11 15:33:05.469853+0800 EASE[1709:692009] Unhandled JS Exception: Can't find variable: n
2019-02-11 15:33:05.471 [error][tid:com.facebook.react.JavaScript] Module AppRegistry is not a registered callable module (calling runApplication)
2019-02-11 15:33:05.471115+0800 EASE[1709:692012] Module AppRegistry is not a registered callable module (calling runApplication)
2019-02-11 15:33:05.476228+0800 EASE[1709:692009] *** Terminating app due to uncaught exception 'RCTFatalException: Unhandled JS Exception: Can't find variable: n', reason: 'Unhandled JS Exception: Can't find variable: n, stack:
<unknown>#1163:26828t#1163:474
<unknown>#1163:788t#1163:474
<unknown>#1163:703t#1163:474
<unknown>#1163:588t#1163:474
<unknown>#1163:418355v#2:1483
<unknown>#1162:69v#2:1483
<unknown>#1161:376v#2:1483
<unknown>#1160:592v#2:1483
<unknown>#1159:572v#2:1483
<unknown>#1158:661v#2:1483
<unknown>#998:5169v#2:1483
<unknown>#948:263v#2:1483
<unknown>#946:98v#2:1483
<unknown>#945:49v#2:1483
<unknown>#944:78v#2:1483
<unknown>#943:79v#2:1483
<unknown>#942:49v#2:1483
<unknown>#718:79v#2:1483
<unknown>#717:66v#2:1483
<unknown>#716:51v#2:1483
<unknown>#715:116v#2:1483
<unknown>#714:148v#2:1483
<unknown>#713:176v#2:1483
<unknown>#705:180v#2:1483
<unknown>#704:183v#2:1483
<unknown>#668:223v#2:1483
<unknown>#659:271v#2:1483
<unknown>#658:28v#2:1483
<unknown>#657:138v#2:1483
<unknown>#528:128v#2:1483
<unknown>#343:418v#2:1483
<unknown>#11:58v#2:1483d#2:866global code#2177:4'
*** First throw call stack:
(0x23b373ea0 0x23a545a40 0x105030e30 0x10502d238 0x23b37b600
0x23b259530 0x23b25a114 0x105045030 0x10508be7c 0x10508bbd8
0x10817f824 0x108180dc8 0x108188e6c 0x108189b60 0x108193bfc
0x23af900dc 0x23af92cec)
libc++abi.dylib: terminating with uncaught exception of type
NSException
(lldb)
App doesn't crash when running in both release mode and debug mode

Related

Latest NativeScript + Angular is broken

I updated nativeScript, #angular/cli and #nativescript/schematics to their latest stable version. Generated a new project as:
ng new port --collection=#nativescript/schematics --shared --style=scss --prefix=port
followed by
tns run ios --bundle
Error:
***** Fatal JavaScript exception - application has been terminated. *****
Native stack trace:
1 0x10da0702e NativeScript::reportFatalErrorBeforeShutdown(JSC::ExecState*, JSC::Exception*, bool)
2 0x10da58f94 -[TNSRuntime executeModule:referredBy:]
3 0x10d2f50b3 main
4 0x7fff51a231fd start
5 0x1
JavaScript stack trace:
file: node_modules/#nativescript/angular/__ivy_ngcc__/zone-js/dist/zone-nativescript.js:32:0
at file: node_modules/#nativescript/angular/__ivy_ngcc__/zone-js/dist/zone-nativescript.js:645:1
at file: node_modules/#nativescript/angular/__ivy_ngcc__/zone-js/dist/zone-nativescript.js:9:61
at file: node_modules/#nativescript/angular/__ivy_ngcc__/zone-js/dist/zone-nativescript.js:12:1
at ../node_modules/#nativescript/angular/__ivy_ngcc__/zone-js/dist/zone-nativescript.js(file:///app/vendor.js:103073:34)
at __webpack_require__(file: src/webpack/bootstrap:752:0)
at fn(file: src/webpack/bootstrap:120:0)
at file: node_modules/#nativescript/angular/__ivy_ngcc__/platform-common.js:6:8
at ../node_modules/#nativescript/angular/__ivy_ngcc__/platform-common.js(file:///app/vendor.js:97913:34)
at __webpack_require__(file: src/webpack/bootstrap:752:0)
at fn(file: src/webpack/bootstrap:120:0)
at ../node_modules/#nativescript/angular/__ivy_ngcc__/index.js(file: node_modules/#nativescript/angular/__ivy_ngcc__/index.js:6:17)
at __webpack_require__(file: src/webpack/bootstrap:752:0)
at fn(file: src/webpack/bootstrap:120:0)
at ./app/app.module.tns.ts(file: src/app/app.module.tns.ts:1:0)
at __webpack_require__(file: src/webpack/bootstrap:752:0)
at fn(file: src/webpack/bootstrap:120:0)
at file:///app/bundle.js:240:96
at ./main.tns.ts(file:///app/bundle.js:298:34)
at __webpack_require__(fi<…>
JavaScript error:
file: node_modules/#nativescript/angular/__ivy_ngcc__/zone-js/dist/zone-nativescript.js:32:0: JS ERROR Error: Zone already loaded.
(CoreFoundation) *** Terminating app due to uncaught exception 'NativeScript encountered a fatal error: Error: Zone already loaded
the many issue with nativescript angular9 and ivy.
but to fix this error just use zone.js 0.9.1

Visual Studio 2017 instance is not opened

Can anyone have any idea why Visual studio instance is not getting opened and how can I fix that. Below is error details I found from Visual Studio logs & system.
Visual Studio 2017 (15.9.22)
.Net Framework : 4.7 OS
Windows Server 2016
MSVCP120_CLR0400.dll is either not designed to run on Windows
C:\Windows\system32\MSVCP120_CLR0400.dll is either not designed to run
on Windows or it contains an error. Try installing the program again
using the original installation media or contact your system
administrator or the software vendor for support. Error status
0xc000012f.
The type initializer for '' threw an exception.
LegacySitePackage failed for package [Environment Package Window
Management]Source: 'Microsoft.VisualStudio.Shell.15.0' Description:
The type initializer for '' threw an exception.
System.TypeInitializationException: The type initializer for
'' threw an exception. --->
.ModuleLoadException: The C++ module failed
to load during appdomain initialization. --->
System.DllNotFoundException:
C:\Windows\Microsoft.NET\Framework\v4.0.30319\WPF\wpfgfx_v0400.dll
---> System.ComponentModel.Win32Exception: %1 is not a valid Win32 application --- End of inner exception stack trace --- at
MS.Internal.NativeWPFDLLLoader.LoadNativeWPFDLL(UInt16* relDllPath,
UInt16* baseDllPath) at
MS.Internal.NativeWPFDLLLoader.LoadCommonDLLsAndDwrite() at
CModuleInitialize.{ctor}(CModuleInitialize* , IntPtr cleaningUpFunc)
at ?A0x4260310d.CreateCModuleInitialize() at
?A0x4260310d.??__E?A0x4260310d#cmiStartupRunner##YMXXZ() at
_initterm_m((fnptr)* pfbegin, (fnptr)* pfend) at .LanguageSupport.InitializePerAppDomain(LanguageSupport*
) at
.LanguageSupport._Initialize(LanguageSupport*
) at
.LanguageSupport.Initialize(LanguageSupport*
) --- End of inner exception stack trace --- at
.LanguageSupport.Initialize(LanguageSupport*
) at .cctor() --- End of inner exception stack trace --- at
Microsoft.VisualStudio.Shell.ThreadHelper.get_DispatcherForUIThread()
at Microsoft.VisualStudio.Shell.ThreadHelper.CheckAccess() at
Microsoft.VisualStudio.Shell.AsyncPackage.GetService(Type serviceType)
at Microsoft.VisualStudio.Shell.Package.Initialize() at
Microsoft.VisualStudio.Shell.AsyncPackage.Initialize() at
Microsoft.VisualStudio.Shell.Package.Microsoft.VisualStudio.Shell.Interop.IVsPackage.SetSite(IServiceProvider
sp).ModuleLoadException: The C++ module
failed to load during appdomain initialization. --->
System.DllNotFoundException:
C:\Windows\Microsoft.NET\Framework\v4.0.30319\WPF\wpfgfx_v0400.dll
---> System.ComponentModel.Win32Exception: %1 is not a valid Win32 application --- End of inner exception stack trace --- at
MS.Internal.NativeWPFDLLLoader.LoadNativeWPFDLL(UInt16* relDllPath,
UInt16* baseDllPath) at
MS.Internal.NativeWPFDLLLoader.LoadCommonDLLsAndDwrite() at
CModuleInitialize.{ctor}(CModuleInitialize* , IntPtr cleaningUpFunc)
at ?A0x4260310d.CreateCModuleInitialize() at
?A0x4260310d.??__E?A0x4260310d#cmiStartupRunner##YMXXZ() at
_initterm_m((fnptr)* pfbegin, (fnptr)* pfend) at .LanguageSupport.InitializePerAppDomain(LanguageSupport*
) at
.LanguageSupport._Initialize(LanguageSupport*
) at
.LanguageSupport.Initialize(LanguageSupport*
) --- End of inner exception stack trace --- at
.LanguageSupport.Initialize(LanguageSupport*
) at .cctor()System.DllNotFoundException:
C:\Windows\Microsoft.NET\Framework\v4.0.30319\WPF\wpfgfx_v0400.dll
---> System.ComponentModel.Win32Exception: %1 is not a valid Win32 application --- End of inner exception stack trace --- at
MS.Internal.NativeWPFDLLLoader.LoadNativeWPFDLL(UInt16* relDllPath,
UInt16* baseDllPath) at
MS.Internal.NativeWPFDLLLoader.LoadCommonDLLsAndDwrite() at
CModuleInitialize.{ctor}(CModuleInitialize* , IntPtr cleaningUpFunc)
at ?A0x4260310d.CreateCModuleInitialize() at
?A0x4260310d.??__E?A0x4260310d#cmiStartupRunner##YMXXZ() at
_initterm_m((fnptr)* pfbegin, (fnptr)* pfend) at .LanguageSupport.InitializePerAppDomain(LanguageSupport*
) at
.LanguageSupport._Initialize(LanguageSupport*
) at
.LanguageSupport.Initialize(LanguageSupport*
)System.ComponentModel.Win32Exception (0x80004005): %1 is not a valid
Win32 application

Safari has stopped opening

A friend of mine using Mac OS X 10.14.6 is unable to open Safari suddenly (couldn't pinpoint anything they actively did to cause this), and upon trying to open the browser, an approximately 37-page-long error message comes up with
Error Code: 0x00000000
and
System Integrity Protection: enabled
Crashed Thread: 0 Dispatch queue: com.apple.main-thread
Exception Type: EXC_BAD_INSTRUCTION (SIGILL)
Exception Codes: 0x0000000000000001, 0x0000000000000000
Exception Note: EXC_CORPSE_NOTIFY
Termination Signal: Illegal instruction: 4
Termination Reason: Namespace SIGNAL, Code 0x4
Terminating Process: exc handler [14212]
Application Specific Information:
dyld: launch, running initializers
/usr/lib/libSystem.B.dylib
Sandbox registration failed: The code signature is not valid: The operation couldn’t be completed. (OSStatus error -67030.)
Application Specific Signatures:
Registration error: The code signature is not valid: The operation couldn’t b
Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
If I'm not mistaken, the same error code in Windows usually denotes a hardware issue? I'm unaware as to whether there is an antivirus installed on this MacBook.

Xcode error running react native NSInvalidArgumentException

I am getting the following error while running a react native project in xcode:
2018-07-12 14:19:13.336 [info][tid:main][RCTCxxBridge.mm:210]
Initializing <RCTCxxBridge: 0x6000001d4be0> (parent: <RCTBridge: 0x6080002c1260>, executor: (null))
2018-07-12 14:19:13.338799+0200 pleasefix[16614:4513384] Initializing
<RCTCxxBridge: 0x6000001d4be0> (parent: <RCTBridge: 0x6080002c1260>,
executor: (null))
2018-07-12 14:19:13.444 [warn][tid:main][RCTBridge.m:119] Class
RCTCxxModule was not exported. Did you forget to use
RCT_EXPORT_MODULE()?
2018-07-12 14:19:13.444411+0200 pleasefix[16614:4513384] Class
RCTCxxModule was not exported. Did you forget to use
RCT_EXPORT_MODULE()?
2018-07-12 14:19:13.471746+0200 pleasefix[16614:4513384] -[RCTCxxBridge
devSettings]: unrecognized selector sent to instance 0x6000001d4be0
2018-07-12 14:19:13.487811+0200 pleasefix[16614:4513384] *** Terminating
app due to uncaught exception 'NSInvalidArgumentException', reason: '-
[RCTCxxBridge devSettings]: unrecognized selector sent to instance
0x6000001d4be0'
Has anyone experienced this issue? Any ideas how to fix?

Error attaching debugger with nuclide to Expo local server

I am trying to attach the Nuclide debugger to Expo local server (port 19001), but it is showing me the following error :
Adapter node: v8.10.0 x64
vscode-chrome-debug-core: 3.17.10
Starting debugger app worker.
******** Unhandled error in debug adapter - Unhandled promise rejection: Error: spawn react-native.cmd ENOENT
at _errnoException (util.js:1022:11)
at Process.ChildProcess._handle.onexit (internal/child_process.js:190:19)
at onErrorNT (internal/child_process.js:372:16)
at _combinedTickCallback (internal/process/next_tick.js:138:11)
at process._tickCallback (internal/process/next_tick.js:180:9)
Followed by:
Could not debug. Invalid Version:

Resources