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

Error: RCTCxxModule was not exported. Did you forget to use RCT_EXPORT_MODULE() #2

Open
geirman opened this issue Nov 4, 2017 · 1 comment

Comments

@geirman
Copy link
Owner

geirman commented Nov 4, 2017

Follow on to issue #1

When attempting to send an email using a function with this signature...

sendImageIOS = (to, subject, path, type) => {
    Mailer.mail({
        subject,
        recipients: [to],
        body: 'Optional Comment: ',
        attachment: { path },
        isHTML: true
    }, (error, event) => {
        console.log(error);
        Alert.alert(
            'Error',
            'Email could not be sent',
            [
            {text: 'Ok', onPress: () => console.log('OK: Email Error Response')},
            {text: 'Cancel', onPress: () => console.log('CANCEL: Email Error Response')}
            ],
            { cancelable: true }
        )
    });
}

RESULT: Email launches, no image attached. Some curious entries in the logs

2017-11-03 23:25:06.562 [info][tid:main][RCTCxxBridge.mm:187] Initializing <RCTCxxBridge: 0x1c01afa40> (parent: <RCTBridge: 0x1c00a5dc0>, executor: (null))
2017-11-03 23:25:06.567512-0700 photoEmailer[589:500846] Initializing <RCTCxxBridge: 0x1c01afa40> (parent: <RCTBridge: 0x1c00a5dc0>, executor: (null))
2017-11-03 23:25:06.700 [warn][tid:main][RCTBridge.m:121] Class RCTCxxModule was not exported. Did you forget to use RCT_EXPORT_MODULE()?
2017-11-03 23:25:06.700275-0700 photoEmailer[589:500846] Class RCTCxxModule was not exported. Did you forget to use RCT_EXPORT_MODULE()?
2017-11-03 23:25:06.778 [warn][tid:main][RCTModuleData.mm:69] Module RNMail requires main queue setup since it overrides `init` but doesn't implement `requiresMainQueueSetup. In a future release React Native will default to initializing all native modules on a background thread unless explicitly opted-out of.
2017-11-03 23:25:06.777942-0700 photoEmailer[589:500846] Module RNMail requires main queue setup since it overrides `init` but doesn't implement `requiresMainQueueSetup. In a future release React Native will default to initializing all native modules on a background thread unless explicitly opted-out of.
2017-11-03 23:25:06.789 [info][tid:main][RCTRootView.m:301] Running application photoEmailer ({
    initialProps =     {
    };
    rootTag = 1;
})
2017-11-03 23:25:06.789226-0700 photoEmailer[589:500846] Running application photoEmailer ({
    initialProps =     {
    };
    rootTag = 1;
})
...
2017-11-03 23:26:09.809338-0700 photoEmailer[589:500846] [MC] Filtering mail sheet accounts for bundle ID: org.reactjs.native.example.photoEmailer, source account management: 1
2017-11-03 23:26:09.814990-0700 photoEmailer[589:500846] [MC] Filtering mail sheet accounts for bundle ID: org.reactjs.native.example.photoEmailer, source account management: 1
2017-11-03 23:26:10.087683-0700 photoEmailer[589:500846] [App] if we're in the real pre-commit handler we can't actually add any new fences due to CA restriction
@KouSyurei
Copy link

请问你现在解决了吗,我在显示本地图片的时候遇到这样的问题,按照这样的方法也没能解决

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants