Skip to content

Bug Class RCTCxxModule was not exported. Did you forget to use RCT_EXPORT_MODULE() #17107

Description

@nhuthan

Is this a bug report?

yes

Have you read the Contributing Guidelines?

yes

Environment

Environment:
OS: macOS Sierra 10.12.6
Node: 6.11.3
Yarn: 1.2.0
npm: 5.5.1
Watchman: 4.9.0
Xcode: Xcode 9.1 Build version 9B55
Android Studio: Not Found

Packages: (wanted => installed)
react: 16.0.0-beta.5 => 16.0.0-beta.5
react-native: 0.49.0 => 0.49.0

Steps to Reproduce

Everything ok until i upgrade to RN 0.49.0 (IOS only)

The first lines of ios debug console are:

2017-12-07 16:35:53.114 [info][tid:main][RCTCxxBridge.mm:187] Initializing <RCTCxxBridge: 0x1c01a62e0> (parent: <RCTBridge: 0x1c00b52a0>, executor: (null))
2017-12-07 16:35:53.122874+0700 ECRM[798:221531] Initializing <RCTCxxBridge: 0x1c01a62e0> (parent: <RCTBridge: 0x1c00b52a0>, executor: (null))
2017-12-07 16:35:53.502 [warn][tid:main][RCTBridge.m:121] Class RCTCxxModule was not exported. Did you forget to use RCT_EXPORT_MODULE()?
2017-12-07 16:35:53.502090+0700 ECRM[798:221531] Class RCTCxxModule was not exported. Did you forget to use RCT_EXPORT_MODULE()?
...

And warning on iphone (if i enable remote debug the warning not append)
screen shot 2017-12-07 at 4 44 50 pm

Problem is

App will crash and cannot open if i run on release mode.

Log from device (iphone 6)

Incident Identifier: DB166116-57D2-4A69-AA6C-B0AFB663330D
CrashReporter Key: a05f8f8292a52417b5f232ccb5c534d8bb308cb4
Hardware Model: iPhone7,2
Process: ECRM [3236]
Path: /private/var/containers/Bundle/Application/D106B2FB-2A87-4EA5-AED2-28750E7B77B3/ECRM.app/ECRM
Identifier: com.redsand.redsand2017
Version: 3 (2.5.1)
Code Type: ARM-64 (Native)
Role: Foreground
Parent Process: launchd [1]
Coalition: com.redsand.redsand2017 [1124]
Date/Time: 2017-12-06 12:02:32.7233 +0700
Launch Time: 2017-12-06 12:02:31.2092 +0700
OS Version: iPhone OS 11.0.3 (15A432)
Baseband Version: 6.17.00
Report Version: 104
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Exception Note: EXC_CORPSE_NOTIFY
Triggered by Thread: 5
Application Specific Information:
abort() called
Filtered syslog:
None found
Last Exception Backtrace:
0 CoreFoundation 0x183dcbd38 __exceptionPreprocess + 124
1 libobjc.A.dylib 0x1832e0528 objc_exception_throw + 55
2 CoreFoundation 0x183dcbc80 +[NSException raise:format:] + 115
3 ECRM 0x100c4c70c 0x100b04000 + 1345292
4 ECRM 0x100c4a3d0 0x100b04000 + 1336272
5 CoreFoundation 0x183dd36a0 __invoking___ + 143
6 CoreFoundation 0x183cb2820 -[NSInvocation invoke] + 291
7 CoreFoundation 0x183cb722c -[NSInvocation invokeWithTarget:] + 59
8 ECRM 0x100c5d884 0x100b04000 + 1415300
9 ECRM 0x100c9d5a4 0x100b04000 + 1676708
10 ECRM 0x100c9d304 0x100b04000 + 1676036
11 libdispatch.dylib 0x183751088 _dispatch_call_block_and_release + 23
12 libdispatch.dylib 0x183751048 _dispatch_client_callout + 15
13 libdispatch.dylib 0x18375ae48 _dispatch_queue_serial_drain$VARIANT$mp + 527
14 libdispatch.dylib 0x18375b7d8 _dispatch_queue_invoke$VARIANT$mp + 339
15 libdispatch.dylib 0x18375c200 _dispatch_root_queue_drain_deferred_wlh$VARIANT$mp + 399
16 libdispatch.dylib 0x1837644a0 _dispatch_workloop_worker_thread$VARIANT$mp + 643
17 libsystem_pthread.dylib 0x1839f6fe0 _pthread_wqthread + 931
18 libsystem_pthread.dylib 0x1839f6c30 start_wqthread + 3

Metadata

Metadata

Assignees

No one assigned

    Labels

    StaleThere has been a lack of activity on this issue and it may be closed soon.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions