4

It produces following output:

Generating config.xml from defaults for platform "blackberry10"
    Preparing blackberry10 project
    Running on emulator for platform "blackberry10" via command "cmd" /c "project_root"\platforms\blackberry10\cordova\run --emulator
    [Error: An error occurred while emulating/deploying the blackberry10 project.
    fs.js:418
      binding.open(pathModule._makeLong(path),
              ^
    TypeError: path must be a string
        at Object.fs.open (fs.js:418:11)
        at Object.fs.readFile (fs.js:206:6)
        at _self.findConnectedSimulator ("project_root"\PLATFO~1\BLACKB~1\cordova\lib\target-utils.js:182:12)
        at Object.async.series.ip ("project_root"\PLATFO~1\BLACKB~1\cordova\lib\run:111:21)
        at "project_root"\PLATFO~1\BLACKB~1\cordova\node_modules\async\lib\async.js:561:25
        at iterate ("project_root"\PLATFO~1\BLACKB~1\cordova\node_modules\async\lib\async.js:131:13)
        at Object.async.eachSeries ("project_root"\PLATFO~1\BLACKB~1\cordova\node_modules\async\lib\async.js:147:9)
        at Object.async.series ("project_root"\PLATFO~1\BLACKB~1\cordova\node_modules\async\lib\async.js:560:19)
        at getTargetName ("project_root"\PLATFO~1\BLACKB~1\cordova\lib\run:108:15)
        at fn ("project_root"\PLATFO~1\BLACKB~1\cordova\node_modules\async\lib\async.js:579:34)
    ]

cordova build blackberry10 is working normally. Emulator is also working normally.

janot
  • 13,578
  • 1
  • 27
  • 57

1 Answers1

7

As bryanhiggins proposed:

platforms\blackberry10\cordova\target add mysim <ip address> -t simulator --pin <simulator PIN>
cordova emulate blackberry10 --target=mysim

Looks like plain cordova build blackberry10 isn't working because of bug in cordova. I'll update answer in case better solution will be found or it will be fixed.

Peter Becker
  • 8,795
  • 7
  • 41
  • 64
janot
  • 13,578
  • 1
  • 27
  • 57
  • 1
    in my case it looks like I *have to* pass the pin again when connecting to the emulator, for example: `cordova emulate blackberry10 --devicepass 123456` – Aras Dec 10 '13 at 19:56
  • 1
    @Aras so, pin or devicepass? I'm not sure but maybe you just have device password set up on your emulator? – janot Dec 11 '13 at 04:26
  • 1
    I had to use `devicepass`, I think it is the password I entered when enabling development mode from inside the simulator. I dont understand *why* this is needed, but it my case that is the only way I managed to connect to the simulator. I think it is a different issue from what is described here though. – Aras Dec 11 '13 at 16:53