Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Class RCTCxxModule was not exported. Did you forget to use RCT_EXPORT_MODULE()? #18201

Closed
vshab opened this issue Mar 5, 2018 · 28 comments
Closed
Labels
Platform: iOS iOS applications. Resolution: Locked This issue was locked by the bot.

Comments

@vshab
Copy link
Contributor

vshab commented Mar 5, 2018

There are warnings on app start:

2018-03-05 21:10:33.505 [warn][tid:main][RCTBridge.m:120] Class RCTCxxModule was not exported. Did you forget to use RCT_EXPORT_MODULE()?
2018-03-05 21:10:33.505169+0700 AwesomeProject[23617:4551316] Class RCTCxxModule was not exported. Did you forget to use RCT_EXPORT_MODULE()?

Environment

Environment:
  OS: macOS High Sierra 10.13.3
  Node: 9.7.1
  Yarn: 1.5.1
  npm: 5.6.0
  Watchman: 4.9.0
  Xcode: Xcode 9.2 Build version 9C40b
  Android Studio: 3.0 AI-171.4443003

Packages: (wanted => installed)
  react: ^16.3.0-alpha.1 => 16.3.0-alpha.1
  react-native: 0.54.0 => 0.54.0

Expected Behavior

No warnings.

Actual Behavior

There are warnings.

Steps to Reproduce

  1. react-native init AwesomeProject
  2. Open ios/AwesomeProject.xcodeproj
  3. Run the app and look at the output.
  4. There will be warnings among first several lines.

I've tested several versions back (0.49) and the issue is there as well.

Sample project

https://github.com/vshab/react-native-0.54-run-warning

@leoneparise
Copy link

leoneparise commented Mar 13, 2018

I'm having the same issue after I upgraded to RN 0.54.

@hramos hramos added the Platform: iOS iOS applications. label Mar 13, 2018
@leejones45
Copy link

leejones45 commented Mar 14, 2018

I have this issue too after upgrading to RN 0.54.1. If I reload the app in the simulator the warning goes away.

@isaachinman
Copy link

Same as @leejones45, getting this error after upgrading and only on first load.

@ntanduc2288
Copy link

Same with me
react-native: 0.55.1

@janreyho
Copy link

Same with me
react-native: 0.55.2

@krewllobster
Copy link

krewllobster commented Apr 19, 2018

Same here when running on my device via xCode.
react-native: 0.55.3

@mateoguzmana
Copy link
Contributor

Same here with react-native: 0.55.3. Seems it happens after upgrade react-native to a version > 0.54.

@jmeyers91
Copy link

Also seeing this with react-native 0.55.3.

@mac-cain13
Copy link

mac-cain13 commented Apr 25, 2018

This is a duplicate of #14806

It's a harmless issue and you can ignore it, but quite confusing when you encounter it at first. Sadly it seems that nobody had the time to fix this yet, so it is still in the current version.

@hyochan
Copy link
Contributor

hyochan commented Apr 29, 2018

Me too in RN@0.55

@lafayea
Copy link

lafayea commented May 4, 2018

me too

3 similar comments
@hahtml
Copy link

hahtml commented May 4, 2018

me too

@gtsluk
Copy link

gtsluk commented May 4, 2018

me too

@JacobbLu
Copy link

JacobbLu commented May 5, 2018

me too

@Elf2707
Copy link

Elf2707 commented May 6, 2018

me too and a bunch of issues with Yoga include< algorithm > etc.

@vgm8
Copy link

vgm8 commented May 8, 2018

Any update on this issue? I know it's harmless but it still bothers me

@peacechen
Copy link

peacechen commented May 10, 2018

The message should be removed if it's really not an issue. Or FB needs to fix the condition that checks for whatever it is this is trying to check for.

@PierreBresson
Copy link

Any update on this?

When I want to run on device, I need to have RCTNetwork.xcodeproj and RCTWebSocket.xcodeproj manually linked but when I archive my app I have to delete both and add this code to my pod file and run pod install :

 pod 'React', :path => '../node_modules/react-native', :subspecs => [
    'DevSupport',
    'CxxBridge',
    'RCTNetwork'
 ]

Otherwise I have errors. I also upgrade react-native to 55.3 from 51.

@peacechen
Copy link

peacechen commented May 14, 2018

I've also found that when archiving, the libRCT*.a libraries need to be removed from Link Binary With Libraries. Otherwise the archive generation complains about duplicate symbols. I'm using pods as per the RN project setup instructions.

Regular debug & release builds need the libRCT*.a libraries, but archiving can't have those which puts us in a bind.

@xiJieGuYuan
Copy link

me too in RN@0.54

@react-native-bot
Copy link
Collaborator

Thanks for posting this! It looks like your issue may refer to an older version of React Native. Can you reproduce the issue on the latest release, v0.55?

Thank you for your contributions.

@peacechen
Copy link

Dear Mr bot,

This occurs with RN 0.55.3 and probably any newer version.

@dhei
Copy link

dhei commented May 16, 2018

same with me in react-native@0.55.4

@frayhan32
Copy link

So what is the solution then ?

@codemers
Copy link

@frayhan32 For now it's not the best solution, but to avoid the warning we can ignore it:

import { YellowBox } from 'react-native';
YellowBox.ignoreWarnings(['Class RCTCxxModule']);

@pstanton
Copy link

pstanton commented May 23, 2018

I haven't proven my theory but I just started getting this (and another warning: "RCTImageLoader requires main queue setup...") and the only change I made was to use YellowBox (as per prev comment) instead of the old console.ignoredYellowBox method.

@ArthurInTheShell
Copy link

@charlot567 Note that same method is used to prevent the "isMounted(...) is deprecated" yellow box appear in
react-navigation/react-navigation#3956
They persist in react-native@0.55

@kelset
Copy link
Contributor

kelset commented Jun 14, 2018

This is a duplicate of #14806 so I'll close and lock this to avoid spam/useless comments

@kelset kelset closed this as completed Jun 14, 2018
@facebook facebook locked as spam and limited conversation to collaborators Jun 14, 2018
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Jun 14, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Platform: iOS iOS applications. Resolution: Locked This issue was locked by the bot.
Projects
None yet
Development

No branches or pull requests