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

Uncaught exception: bridge is not set #430

Closed
brunolemos opened this issue Nov 23, 2017 · 2 comments
Closed

Uncaught exception: bridge is not set #430

brunolemos opened this issue Nov 23, 2017 · 2 comments

Comments

@brunolemos
Copy link

Uncaught exception: bridge is not set. This is probably because you've explicitly synthesized the Getting this error on master: bridge in RCTWebSocketModule, even though it's inherited from RCTEventEmitter.`

Trying to use master because the current npm version doesn't work for me (and the fix was already merged).

Description

Steps to Reproduce

  • Master branch
  • Simple e2e test
/* eslint-env detox/detox, jest */

describe('Example', () => {
  beforeEach(async () => {
    await device.reloadReactNative()
  })

  it('should find a component', async () => {
    await expect(element(by.id('xxx'))).toBeVisible()
  })
})

Detox, Node, Device, Xcode and macOS Versions

  • Detox: master
  • Node: 8.9.0
  • Device: iOS Simulator (iPhone 8, iOS 11)
  • Xcode: 9
  • macOS: 10.13.1

Device and verbose Detox logs

2017-11-23 18:55:02.999 react_native_css_in_js_benchmarks[24689:5607359] Crash handler setup started.
2017-11-23 18:55:03.000 react_native_css_in_js_benchmarks[24689:5607359] Crash handler setup completed.
2017-11-23 18:55:03.000 react_native_css_in_js_benchmarks[24689:5607359] Enabling accessibility for automation on Simulator.
2017-11-23 18:55:03.867 react_native_css_in_js_benchmarks[24689:5607359] ☣️ DETOX:: Detox Action Sent: login
2017-11-23 18:55:04.043 react_native_css_in_js_benchmarks[24689:5607359] ☣️ DETOX:: Detox Action Received: loginSuccess
2017-11-23 18:55:04.150 [info][tid:main][RCTCxxBridge.mm:213] Initializing <RCTCxxBridge: 0x6040001d4eb0> (parent: <RCTBridge: 0x6000000c9c30>, executor: (null))
2017-11-23 18:55:04.216 [warn][tid:main][RCTBridge.m:121] Class RCTCxxModule was not exported. Did you forget to use RCT_EXPORT_MODULE()?
2017-11-23 18:55:04.243 react_native_css_in_js_benchmarks[24689:5607359] ☣️ Adding idling resource for queue: <OS_dispatch_queue: com.facebook.react.AccessibilityManagerQueue>
2017-11-23 18:55:04.245 [info][tid:main][RCTRootView.m:301] Running application react_native_css_in_js_benchmarks ({
    initialProps =     {
    };
    rootTag = 1;
})
2017-11-23 18:55:04.265 react_native_css_in_js_benchmarks[24689:5607359] ☣️ Adding idling resource for queue: <OS_dispatch_queue: com.facebook.react.DevLoadingViewQueue>
2017-11-23 18:55:04.266 react_native_css_in_js_benchmarks[24689:5607359] ☣️ Adding idling resource for queue: <OS_dispatch_queue: com.facebook.react.PlatformConstantsQueue>
2017-11-23 18:55:06.370 react_native_css_in_js_benchmarks[24689:5607391] ☣️ Adding idling resource for queue: <OS_dispatch_queue: com.facebook.react.WebSocketModuleQueue>
2017-11-23 18:55:06.574 [info][tid:com.facebook.react.JavaScript] Running application "react_native_css_in_js_benchmarks" with appParams: {"rootTag":1,"initialProps":{}}. __DEV__ === true, development-level warning are ON, performance optimizations are OFF
2017-11-23 18:55:06.584 react_native_css_in_js_benchmarks[24689:5607391] ☣️ Adding idling resource for queue: <OS_dispatch_queue: com.facebook.react.SourceCodeQueue>
2017-11-23 18:55:06.765 react_native_css_in_js_benchmarks[24689:5607359] ☣️ DETOX:: Detox Action Sent: ready
2017-11-23 18:55:06.769 react_native_css_in_js_benchmarks[24689:5607359] ☣️ DETOX:: Detox Action Received: reactNativeReload
2017-11-23 18:55:06.770 [info][tid:main][RCTCxxBridge.mm:951] Invalidating <RCTCxxBridge: 0x6040001d4eb0> (parent: <RCTBridge: 0x6000000c9c30>, executor: (null))
2017-11-23 18:55:06.770 [info][tid:main][RCTCxxBridge.mm:213] Initializing <RCTCxxBridge: 0x6000001d8510> (parent: <RCTBridge: 0x6000000c9c30>, executor: (null))
2017-11-23 18:55:06.774 react_native_css_in_js_benchmarks[24689:5607359] ☣️ Adding idling resource for queue: <OS_dispatch_queue: com.facebook.react.AccessibilityManagerQueue>
2017-11-23 18:55:06.775 react_native_css_in_js_benchmarks[24689:5607359] ☣️ Adding idling resource for queue: <OS_dispatch_queue: com.facebook.react.DevLoadingViewQueue>
2017-11-23 18:55:06.776 react_native_css_in_js_benchmarks[24689:5607359] ☣️ Adding idling resource for queue: <OS_dispatch_queue: com.facebook.react.PlatformConstantsQueue>
2017-11-23 18:55:06.798 react_native_css_in_js_benchmarks[24689:5607359] *** Assertion failure in -[RCTEventEmitter sendEventWithName:body:](), /Users/brunolemos/Projects/react-native-css-in-js-benchmarks/node_modules/react-native/React/Modules/RCTEventEmitter.m:42
2017-11-23 18:55:06.858 react_native_css_in_js_benchmarks[24689:5607359] Uncaught exception: bridge is not set. This is probably because you've explicitly synthesized the bridge in RCTWebSocketModule, even though it's inherited from RCTEventEmitter.; Stack trace:
0   CoreFoundation                      0x000000010424803b __exceptionPreprocess + 171
1   libobjc.A.dylib                     0x0000000102badf41 objc_exception_throw + 48
2   CoreFoundation                      0x000000010424d202 +[NSException raise:format:arguments:] + 98
3   Foundation                          0x0000000102688523 -[NSAssertionHandler handleFailureInFunction:file:lineNumber:description:] + 165
4   react_native_css_in_js_benchmarks   0x0000000101e82db8 -[RCTEventEmitter sendEventWithName:body:] + 408
5   react_native_css_in_js_benchmarks   0x0000000102065c8a -[RCTWebSocketModule webSocket:didFailWithError:] + 330
6   react_native_css_in_js_benchmarks   0x000000010205ccc3 __33-[RCTSRWebSocket _failWithError:]_block_invoke_2 + 163
7   EarlGrey                            0x0000000114b041d4 __60-[GREYDispatchQueueTracker grey_dispatchAsyncCallWithBlock:]_block_invoke + 36
8   libdispatch.dylib                   0x0000000108ae5273 _dispatch_call_block_and_release + 12
9   libdispatch.dylib                   0x0000000108ae62b5 _dispatch_client_callout + 8
10  libdispatch.dylib                   0x0000000108af0496 _dispatch_main_queue_callback_4CF + 1260
11  CoreFoundation                      0x000000010420ad79 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 9
12  CoreFoundation                      0x00000001041cf422 __CFRunLoopRun + 2402
13  CoreFoundation                      0x00000001041ce849 CFRunLoopRunSpecific + 409
14  GraphicsServices                    0x000000010b5fe9c6 GSEventRunModal + 62
15  UIKit                               0x000000010686327c UIApplicationMain + 159
16  Detox                               0x00000001024a3073 __WX_UIApplicationMain + 197
17  react_native_css_in_js_benchmarks   0x0000000101de334f main + 111
18  libdyld.dylib                       0x0000000108b5ad81 start + 1
19  ???                                 0x0000000000000006 0x0 + 6
@brunolemos
Copy link
Author

Nevermind it worked

@sidferreira
Copy link
Contributor

sidferreira commented Mar 7, 2018

I'm having this issue... No freaking idea what's the problem :/

Seem that if I run detox test a second time, it will not work. I have to stop react start and run again

@wix wix locked and limited conversation to collaborators Jul 23, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants