vscode-react-native fails to start the debugger, where as 'react-native run-ios' does

Created on 15 Jun 2018  ยท  7Comments  ยท  Source: microsoft/vscode-react-native

Hey guys,

I've tried reinstalling the plugin, however the issue still persists.
When I click on the Green arrow in the debugger panel to start debugging, it starts metro, goes through the build procedure, and succeeds, then I get a message in the output window that says unknown error, not all success patterns were matched.

I've pasted the outputs below.

Running 'react-native run-ios' works as expected, and opens the chrome debugger successfully.

please let me know if you require additional information.

Thanks,

Actual Behavior

  1. Press 'Start Debugger'
  2. starts metro
  3. successfully builds the app
  4. throws an error in metro

Expected Behavior

  1. Press 'Start Debugger'
  2. starts metro
  3. successfully builds the app
  4. starts debugger, waiting for app to connect to it

Software versions

  • React-Native VS Code extension version: 0.6.11
  • VSCode version: 1.24.1
  • OS platform and version: Mac, darwin x64
  • NodeJS version: v8.9.4
  • React Native version: 0.54.0
  • Expo SDK version (include if relevant): expo not being used

Outputs (Include if relevant)

  • Output of the Debug Console (View -> Toggle Debug Console):
OS: darwin x64
Adapter node: v7.9.0 x64
vscode-chrome-debug-core: 3.17.3
14:50:31, 2018-6-14
From client: initialize({"clientID":"vscode","clientName":"Visual Studio Code","adapterID":"reactnative","pathFormat":"path","linesStartAt1":true,"columnsStartAt1":true,"supportsVariableType":true,"supportsVariablePaging":true,"supportsRunInTerminalRequest":true,"locale":"en-us"})
To client: {"seq":0,"type":"response","request_seq":1,"command":"initialize","success":true,"body":{"exceptionBreakpointFilters":[{"label":"All Exceptions","filter":"all","default":false},{"label":"Uncaught Exceptions","filter":"uncaught","default":false}],"supportsConfigurationDoneRequest":true,"supportsSetVariable":true,"supportsConditionalBreakpoints":true,"supportsCompletionsRequest":true,"supportsHitConditionalBreakpoints":true,"supportsRestartFrame":true,"supportsExceptionInfoRequest":true,"supportsDelayedStackTraceLoading":true,"supportsValueFormattingOptions":true,"supportsEvaluateForHovers":true,"supportsLogPoints":true}}
Could not debug. Unknown error: not all success patterns were matched.
It means that "react-native run-ios" command failed. Please, check the View -> Toggle Output -> React-native, View -> Toggle Output -> React-native: Run ios output windows.
To client: {"seq":0,"type":"event","event":"terminated"}
From client: disconnect({"restart":false})
To client: {"seq":0,"type":"response","request_seq":3,"command":"disconnect","success":true}
  • Output of the React-Native output channel (View -> Toggle Output -> Select React-Native in ListBox):
[Info] Starting Packager

Scanning folders for symlinks in /Users/allan/Documents/PlexiaEMR3/DEV/PlexiaMobileWebApp/PlexiaMobileWebApp/PlexiaMobileWebApp/PlexiaMobileApp/plexia-mobile-app/node_modules (24ms)
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚                                                                              โ”‚
โ”‚  Running Metro Bundler on port 8081.                                         โ”‚
โ”‚                                                                              โ”‚
โ”‚  Keep Metro running while developing on any JS projects. Feel free to        โ”‚
โ”‚  close this tab and run your own Metro instance if you prefer.               โ”‚
โ”‚                                                                              โ”‚
โ”‚  https://github.com/facebook/react-native                                    โ”‚
โ”‚                                                                              โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

Looking for JS files in
   /Users/allan/Documents/PlexiaEMR3/DEV/PlexiaMobileWebApp/PlexiaMobileWebApp/PlexiaMobileWebApp/PlexiaMobileApp/plexia-mobile-app 


Metro Bundler ready.

[Info] Packager started.

[Info] Prewarming bundle cache. This may take a while ...

[Info] Entry point at /Users/allan/Documents/PlexiaEMR3/DEV/PlexiaMobileWebApp/PlexiaMobileWebApp/PlexiaMobileWebApp/PlexiaMobileApp/plexia-mobile-app/index.ios.js doesn't exist. Skipping prewarming...

[Info] Building and running application.

Loading dependency graph, done.
[Error] Error: Unknown error: not all success patterns were matched.
It means that "react-native run-ios" command failed. Please, check the View -> Toggle Output -> React-native, View -> Toggle Output -> React-native: Run ios output windows.

Starting custom debugger by executing: echo A debugger is not needed:  "/Users/allan/Documents/PlexiaEMR3/DEV/PlexiaMobileWebApp/PlexiaMobileWebApp/PlexiaMobileWebApp/PlexiaMobileApp/plexia-mobile-app"
 BUNDLE  [ios, dev] ./index.js โ–“โ–“โ–“โ–“โ–“โ–“โ–“โ–“โ–“โ–“โ–“โ–“โ–“โ–“โ–“โ–“ 100.0% (778/778), done.

 BUNDLE  [ios, dev] ./index.js โ–“โ–“โ–“โ–“โ–“โ–“โ–“โ–“โ–“โ–“โ–“โ–“โ–“โ–“โ–“โ–“ 100.0% (1/1), done.
  • Output of the React-Native: Run iOS (trace: verbose):
** BUILD SUCCEEDED **



The following commands produced analyzer issues:
    Analyze Base/RCTModuleMethod.mm normal x86_64
(1 command with analyzer issues)

Installing build/Build/Products/Debug-iphonesimulator/plexia-mobile.app
Launching ca.plexia.Plexia-Mobile
ca.plexia.Plexia-Mobile: 5389
iOS need-more-info

All 7 comments

Hi @asaravi,
Could you please run commands below in your project root and paste output here:

ls -la ./ios
/usr/libexec/PlistBuddy -c "Print:CFBundleIdentifier" ./ios/build/Build/Products/Debug-iphonesimulator/plexia-mobile.app/Info.plist

Thanks!

Hi @iTOYS

output of 'ls -la ./ios'

total 24
drwxr-xr-x   9 allan  staff   306 14 Jun 15:32 .
drwxr-xr-x  32 allan  staff  1088 14 Jun 15:32 ..
-rw-r--r--@  1 allan  staff  8196 27 Mar 14:54 .DS_Store
drwxr-xr-x@  8 allan  staff   272 14 Jun 15:32 build
drwxr-xr-x   9 allan  staff   306 14 Jun 10:57 plexiaMA
drwxr-xr-x   3 allan  staff   102 14 Jun 10:57 plexiaMA-tvOS
drwxr-xr-x   3 allan  staff   102 14 Jun 10:57 plexiaMA-tvOSTests
drwxr-xr-x@  6 allan  staff   204 14 Jun 10:57 plexiaMA.xcodeproj
drwxr-xr-x   4 allan  staff   136 14 Jun 10:57 plexiaMATests

(for this command, changed the path to the project to include the space, 'Plexia Mobile')
output for '/usr/libexec/PlistBuddy -c "Print:CFBundleIdentifier" "./ios/build/Build/Products/Debug-iphonesimulator/Plexia Mobile.app/Info.plist"'

ca.plexia.Plexia-Mobile

Thanks for looking into this!

Could you also please run:

/usr/libexec/PlistBuddy -c "Print:CFBundleIdentifier" "./ios/build/Build/Products/Debug-iphonesimulator/plexiaMA.app/Info.plist"

I suppose that result will be like:

Print: Entry, ":CFBundleIdentifier", Does Not Exist

This goes because we expect that Debug-iphonesimulator/<app_name>.app/Info.plist should be the same as <app_name>.xcodeproj.

https://github.com/Microsoft/vscode-react-native/blob/14ebf4e6fdee5f69a41d9a7deea4dc164dd28b7e/src/extension/ios/plistBuddy.ts#L25-L33

Hi @iTOYS

I've researched your comment a bit, and decided to remove the space in the project name, and run 'react-native-rename' to rename the project more correctly.

However after running that, vscode-react-native was still creating a "Plexia Mobile.app" bundle inside the build folder. I manually modified these files to "PlexiaMobile.app" wherever it was written with a space:

./ios/<app name>.xcodeproj/project.pbxproj
./ios/<app name>/xcshareddata/xcschemes/<app name>.xcscheme

I'm not sure which section in Xcode allows you to modify the above xml files as I'm not too familiar with Xcode.

I then went in Xcode and changed "CFBundleDisplayName" to "Plexia Mobile"
This seems to be working.

Thank you for your help!

Unfortunately we can't detect app name if it different with project name. If you'd like to use different name you can run app with react-native run-ios and attach with vscode for debug(Attach to packager)

same issue here

Hi @rluncasu . Please create a new issue for your specific case.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Jacky9425 picture Jacky9425  ยท  4Comments

buddhamangler picture buddhamangler  ยท  5Comments

kevinnguy picture kevinnguy  ยท  3Comments

bugproof picture bugproof  ยท  5Comments

vsccarl picture vsccarl  ยท  3Comments