I am using code-push-server due to connectivity issues, I have set everything okay, The app displays a Update App Dialog but cant fails to download. In the logs, I find
[CodePush] failed to connect to localhost/127.0.0.1 (port 3000): connect failed: ECONNREFUSED (Connection refused)
Also I can see the first request from code-push and the JSON sent back is like below,
{
"updateInfo": {
"downloadURL": "http://localhost:3000/download/FkLTVi7MtDtKPXgmUgeV7XXWftWT",
"description": "",
"isAvailable": true,
"isMandatory": false,
"appVersion": "1.0",
"packageHash": "cbf70f60186b8be7a8ec213170f2553159ac3jfdfdk6f2770c207b182a962b7a53f",
"label": "v3",
"packageSize": 328578,
"updateAppVersion": false,
"shouldRunBinaryVersion": false
}
}
On the development machine, I can access the download url and the bundle is downloaded.
Kindly advise if I am doing anything right.
I got this to work by changing the localhost download to machine IP address in the code-push-sever config file.