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

Debug in chrome, and got a error message:"Status: Waiting for simulator" #488

Closed
hotobear opened this issue Mar 30, 2015 · 8 comments
Closed
Labels
Resolution: Locked This issue was locked by the bot.

Comments

@hotobear
Copy link

I open a tab with url "http://localhost:8081/debugger-ui" in chrome, and the simulator is running with the react native demo. However I got the message: "Status: Waiting for simulator". How do I solve it? Thanks a lot!

@frantic
Copy link
Contributor

frantic commented Mar 30, 2015

When you see "Status: Waiting for simulator" - reload app in simulator (Cmd+R), and it should connect. Please reopen if it doesn't work

@frantic frantic closed this as completed Mar 30, 2015
@skyming
Copy link

skyming commented Mar 31, 2015

it seams not to be work, also just like
"React Native JS code runs inside this Chrome tab
Press ⌘⌥J to open Developer Tools. Enable Pause On Caught Exceptions for a better debugging experience.
Status: Waiting for simulator"

@frantic
Copy link
Contributor

frantic commented Mar 31, 2015

What happens when you reload code in simulator? Any log messages in Xcode or packager window?

@sreejithr
Copy link
Contributor

Simulator doesn't seem to work. This is the log from xcode:

RCTJSLog> "Running application "AwesomeProject" with appParams: {"rootTag":1,"initialProps":{}}. __DEV__ === true, development-level warning are ON, performance optimizations are OFF"

I'm seeing that the script in debugger.html isn't getting value for key sessionID from LocalStorage. Here's the line in debugger.html:

var sessionID = window.localStorage.getItem('sessionID');

On opening websocket connection, it checks whether this sessionID is present to start a debugging session:

ws.onopen = function() {
  if (sessionID) {
    setStatus('Debugger session #' + sessionID + ' active');
    ws.send(JSON.stringify({replyID: parseInt(sessionID, 10)}));
  } else {
    setStatus('Waiting for simulator');
  }
}

Any ideas?

@sreejithr
Copy link
Contributor

I've found a solution for this. Press Cmd-D from the iOS Simulator. This will open a new Chrome window with debugger attached.

@cinder92
Copy link

cinder92 commented Nov 4, 2016

i'm having same issue after update react-native from 0.31 to 0.36 here are the logs from xcode after pressing CMD-D, app crash and then...

objc[8214]: Class PLBuildVersion is implemented in both /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/System/Library/PrivateFrameworks/AssetsLibraryServices.framework/AssetsLibraryServices (0x112835998) and /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/System/Library/PrivateFrameworks/PhotoLibraryServices.framework/PhotoLibraryServices (0x11265ad38). One of the two will be used. Which one is undefined.
2016-11-04 16:22:28.224 [info][tid:main][RCTBatchedBridge.m:72] Initializing <RCTBatchedBridge: 0x60000019dc20> (parent: <RCTBridge: 0x6000000ae1c0>, executor: RCTJSCExecutor)
2016-11-04 16:22:28.321 [warn][tid:main][RCTBridge.m:112] Class GenericShare was not exported. Did you forget to use RCT_EXPORT_MODULE()?
2016-11-04 16:22:28.321 [warn][tid:main][RCTBridge.m:112] Class WhatsAppShare was not exported. Did you forget to use RCT_EXPORT_MODULE()?
2016-11-04 16:22:28.322 [warn][tid:main][RCTBridge.m:112] Class GooglePlusShare was not exported. Did you forget to use RCT_EXPORT_MODULE()?
2016-11-04 16:22:28.908368 MiDiocesis[8214:214600] [] __nw_connection_get_connected_socket_block_invoke 4 Connection has no connected handler
2016-11-04 16:22:28.953 [warn][tid:main][RCTEventEmitter.m:54] Sending `websocketFailed` with no listeners registered.
2016-11-04 16:22:29.189 [info][tid:main][RCTRootView.m:239] Running application MiDiocesis ({
    initialProps =     {
    };
    rootTag = 1;
})
2016-11-04 16:22:29.192 [info][tid:com.facebook.react.JavaScript] Running application "MiDiocesis" with appParams: {"rootTag":1,"initialProps":{}}. __DEV__ === true, development-level warning are ON, performance optimizations are OFF
2016-11-04 16:22:30.326370 MiDiocesis[8214:214742] [aqme] 254: AQDefaultDevice (1): skipping input stream 0 0 0x0
2016-11-04 16:22:32.335192 MiDiocesis[8214:214742] [aqme] 254: AQDefaultDevice (173): skipping input stream 0 0 0x0
2016-11-04 16:22:34.343563 MiDiocesis[8214:214742] [aqme] 254: AQDefaultDevice (173): skipping input stream 0 0 0x0
2016-11-04 16:22:35.557 MiDiocesis[8214:214522] *** Terminating app due to uncaught exception 'NSGenericException', reason: 'Your application has presented a UIAlertController (<UIAlertController: 0x7fe65bd678d0>) of style UIAlertControllerStyleActionSheet. The modalPresentationStyle of a UIAlertController with this style is UIModalPresentationPopover. You must provide location information for this popover through the alert controller's popoverPresentationController. You must provide either a sourceView and sourceRect or a barButtonItem.  If this information is not known when you present the alert controller, you may provide it in the UIPopoverPresentationControllerDelegate method -prepareForPopoverPresentation.'
*** First throw call stack:
(
    0   CoreFoundation                      0x00000001028bd34b __exceptionPreprocess + 171
    1   libobjc.A.dylib                     0x000000010146321e objc_exception_throw + 48
    2   UIKit                               0x0000000105a532da -[UIPopoverPresentationController presentationTransitionWillBegin] + 3455
    3   UIKit                               0x00000001050e6afd __71-[UIPresentationController _initViewHierarchyForPresentationSuperview:]_block_invoke + 2501
    4   UIKit                               0x00000001050e4300 __56-[UIPresentationController runTransitionForCurrentState]_block_invoke + 423
    5   UIKit                               0x0000000104f712eb _runAfterCACommitDeferredBlocks + 320
    6   UIKit                               0x0000000104f5df6f _cleanUpAfterCAFlushAndRunDeferredBlocks + 566
    7   UIKit                               0x0000000104f8f3da _afterCACommitHandler + 176
    8   CoreFoundation                      0x0000000102861e17 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 23
    9   CoreFoundation                      0x0000000102861d87 __CFRunLoopDoObservers + 391
    10  CoreFoundation                      0x0000000102846b9e __CFRunLoopRun + 1198
    11  CoreFoundation                      0x0000000102846494 CFRunLoopRunSpecific + 420
    12  GraphicsServices                    0x000000010886aa6f GSEventRunModal + 161
    13  UIKit                               0x0000000104f64964 UIApplicationMain + 159
    14  MiDiocesis                          0x0000000100acba7f main + 111
    15  libdyld.dylib                       0x0000000106ec768d start + 1
    16  ???                                 0x0000000000000001 0x0 + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb) 

@yongish
Copy link

yongish commented May 27, 2017

On simulator, press Cmd+D, then click on "Debug JS Remotely".

@steelx
Copy link

steelx commented May 7, 2018

CMD + M works for me

@facebook facebook locked as resolved and limited conversation to collaborators May 29, 2018
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Jul 23, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Resolution: Locked This issue was locked by the bot.
Projects
None yet
Development

No branches or pull requests

8 participants