diff --git a/package-lock.json b/package-lock.json index 896daedb..672b62b6 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "arduino-create-agent-js-client", - "version": "1.0.2", + "version": "1.0.3", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 4a1f4d1f..72bb75c6 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "arduino-create-agent-js-client", - "version": "1.0.2", + "version": "1.0.3", "description": "JS module providing discovery of the Arduino Create Plugin and communication with it", "main": "./src/index.js", "module": "es/index.js", diff --git a/src/boardConfiguration.js b/src/boardConfiguration.js index 9d580a9a..6b29aab5 100644 --- a/src/boardConfiguration.js +++ b/src/boardConfiguration.js @@ -165,6 +165,7 @@ export default class BoardConfiguration { * @param {function} createDeviceCb used to create the device associated to the user */ configure(compiledSketch, board, createDeviceCb) { + this.daemon.initUpload(); this.configuring.next({ status: this.CONFIGURE_IN_PROGRESS, msg: 'Uploading provisioning sketch...' }); if (!this.daemon.channelOpen.getValue()) { const errorMessage = `Couldn't configure board at port ${board.port} because we there is no open channel to the Arduino Create Plugin.`; @@ -236,7 +237,6 @@ export default class BoardConfiguration { this.configuring.next({ status: this.CONFIGURE_ERROR, err: `Couldn't configure board at port ${board.port}. Upload failed with error: ${upload.err}` }); }); - this.daemon.initUpload(); this.uploadSketch(compiledSketch, board); } }