0

I'm getting this error when I try to run on android

mfp cordova run -d

mobilefirst-cli verb cli process.argv=["/Applications/IBM/MobileFirst-CLI/IBMnode/bin/node","/Applications/IBM/MobileFirst-CLI/mobilefirst-cli/bin/mobilefirst-cli.js","cordova","run","-d"] mobilefirst-cli verb cli opts={"debug":true,"argv":{"remain":["cordova","run"],"cooked":["cordova","run","--debug"],"original":["cordova","run","-d"]}} mobilefirst-cli verb cli mobilefirst@7.1.0.00.20151130-1653 mobilefirst-cli verb cli node@v0.10.36 mobilefirst-cli sill mfp_cordova_cmds running cordova command: "run" with args: ["-d"] ? What platforms do you want to run on? android Searching for list of Devices... ? Which device id do you want to target? 0815f84119921c04 - Samsung RIL v3.0

/Applications/IBM/MobileFirst-CLI/mobilefirst-cli/node_modules/rx-lite/rx.lite.js:75 throw e; ^ TypeError: Cannot read property 'length' of null at ScreenManager.render (/Applications/IBM/MobileFirst-CLI/mobilefirst-cli/node_modules/mfp_cordova_cmds/node_modules/inquirer/lib/utils/screen-manager.js:64:52) at Prompt.render (/Applications/IBM/MobileFirst-CLI/mobilefirst-cli/node_modules/mfp_cordova_cmds/node_modules/inquirer/lib/prompts/list.js:103:15) at Prompt.onSubmit (/Applications/IBM/MobileFirst-CLI/mobilefirst-cli/node_modules/mfp_cordova_cmds/node_modules/inquirer/lib/prompts/list.js:116:8) at AnonymousObserver.Rx.AnonymousObserver.AnonymousObserver.next (/Applications/IBM/MobileFirst-CLI/mobilefirst-cli/node_modules/rx-lite/rx.lite.js:1535:12) at AnonymousObserver.Rx.internals.AbstractObserver.AbstractObserver.onNext (/Applications/IBM/MobileFirst-CLI/mobilefirst-cli/node_modules/rx-lite/rx.lite.js:1469:31) at AnonymousObserver.tryCatcher (/Applications/IBM/MobileFirst-CLI/mobilefirst-cli/node_modules/rx-lite/rx.lite.js:63:31) at AutoDetachObserverPrototype.nextohbocxxg5415yfv:kmf_cordova hannade$

jradich1234
  • 1,410
  • 5
  • 24
  • 29
Derek Hannah
  • 537
  • 7
  • 23

3 Answers3

0

Have you tried with a newer CLI build? I see the following is available: http://public.dhe.ibm.com/ibmdl/export/pub/software/products/en/MobileFirstPlatform/mobilefirst_cli_installer_7.1.0.zip

I have a slightly older build installed, 7.1.0.00.20151023-1449, and after creating a MFP Cordova app with the Android environment, I was able to successfully run it in the Android Emulator. I suggest that you will try with the above newer build.

Idan Adar
  • 44,156
  • 13
  • 50
  • 89
0

I have the MFP CLI build version 7.1.0.00.20151227-1730 and command

    mfp cordova run -d 

runs alright for an emulator device, however for a physical device, I get the same error

    TypeError: Cannot read property 'length' of null at ScreenManager.render (/Applications/IBM/MobileFirst-CLI/mobilefirst-cli/node_modules/mfp_cordova_cmds/node_modules/inquirer/lib/utils/screen-manager.js:64:52) 

This appears to be an issue specific to using physical devices to run the cordova application.

sreelathas
  • 58
  • 1
  • 7
0

This is a known problem in some versions of the CLI and the Foundation team just delivered a fix, which is now available on Fix Central.

Look for interim fix 7.1.0.0-MFPF-IF201602291240 or later and APAR number PI56876. Please give it a look and let me know if it resolves this problem.

John Gerken
  • 686
  • 6
  • 13