Just a quick post to let you know that we’ve seen an issue with the Codeflow CORS proxy crashing out when trying to refresh the access token used to make authenticated calls to the Salesforce platform.
This crash itself isn’t always easy to spot, but can be seen in your terminal window with this kind of output.
$ grunt serve
Running "connect:server" (connect) task
Started connect web server on http://localhost:3030
Running "express:dev" (express) task
Starting background Express server
Proxy server listening on port 3000
Running "watch" task
throw new Error('"name" and "value" are required for setHeader().');
Error: "name" and "value" are required for setHeader().
at ClientRequest.OutgoingMessage.setHeader (_http_outgoing.js:333:11)
at new ClientRequest (_http_client.js:101:14)
at Object.exports.request (http.js:49:10)
at Object.exports.request (https.js:136:15)
at Request.start (/home/todd/projects/tmp/shell150928/node_modules/request/request.js:674:30)
at Request.write (/home/todd/projects/tmp/shell150928/node_modules/request/request.js:1334:28)
at process._tickCallback (node.js:355:11)
The issue here can be seen if running 0.12.X version of node, and is caused by a breaking change that was introduced. The latest versions of the request NPM package (that is used in Codeflow) fixes this issue, and can be installed into your setup with this one command.
npm install firstname.lastname@example.org --save-dev
This line installs the 2.64 version of request and updates it’s dependencies and also updates your package.json file to represent this.
With this version of request in place the Salesforce token refreshing should now take place as expected. Of course if you see issues still then please message us on our support boards.
We are just in the process of updating our public seed and shell app repositories to include these dependency updates, they should be made public in the coming days following our test cycles.