diff --git a/cloudron.js b/cloudron.js index 8ef3a1f..0792c68 100644 --- a/cloudron.js +++ b/cloudron.js @@ -135,6 +135,10 @@ Cloudron.prototype.waitForApp = function (appId, version) { sleep(30); process.stdout.write('.'); res = request.get(this._origin + '/api/v1/apps/'+ appId).query({ access_token: this._credentials.accessToken }).end(); + + // if app still redirects, wait a bit + if (res.statusCode === 307) continue; + common.verifyResponse2xx(res, 'Could not query app status'); if (res.body.installationState === 'installed' && res.body.runState === 'running' && res.body.health === 'healthy') {