Closed swbradsh closed 1 year ago
@swbradsh Thanks for sending over the details. We are looking into it and will update you shortly. Thanks
@swbradsh We are still investigating the issue and have few questions for you:
@ahbilal-ms
@swbradsh Thanks! It definitely seems to be an issue with the proxy, which we don't support at this time with our cli offering. Few of our customer have temporarily fixed this issue by enabling whitelist for the following addresses: https://intercom.help/appcenter/en/articles/1881230-urls-and-ip-addresses-to-whitelist-for-app-center
Also, I am working with the team to recommend a feature to fix this issue. I can't comment on the timeline but will come back to you with more updates. Thanks
If anyone wants a work-around for this issue, here is how i solved it.
Install superagent-proxy globally.
npm i -g superagent-proxy
Navigate to your installed appcenter-cli module and edit the request.js
file. For me, I found the file here: C:\Users\xxxxxxx\AppData\Roaming\npm\node_modules\appcenter-cli\node_modules\appcenter-file-upload-client\dist\core\request.js
You're adding 2 lines to this file. See below.
....
var request = require("superagent");
require('superagent-proxy')(request); <------- add this line
function sendRequest(requestOptions, log) {
var abort = 0;
var req = request
.post(requestOptions.url)
.proxy(process.env.http_proxy) <------ add this line
....
Make sure your http_proxy is set in your environment variable, and it should work now. Note, that if you update the appcenter-cli, you might have to make this change again.
My team has been using appcenter@1.1.19 and it has been working fine with our proxy settings. I'm not sure when this was broken.
how exactly to i set https_proxy?
I'm on MAC and edited the .bash_profile file by adding
export https_proxy=myProxy export http_proxy=myProxy
and now I'm getting failed with exception "Cannot read property 'toLowerCase' of null"
UPDATE I managed to make it work by setting the proxy directly in the jenkins pipeline export http_proxy=myProxy export https_proxy=myProxy export NODE_EXTRA_CA_CERTS=myInternalCRTfile
found a simple hack which works 90% of the times, simply switch the network/wifi you're connected to and then run the command.
it strange that @harshlakhanpal answer worked for me so strange
Hey I am getting the same issue, Checked with changing and restarting network. Not able to get how to resolve in Mac. I was working fine before 1 week.
Hey I am getting the same issue, Checked with changing and restarting network. Not able to get how to resolve in Mac. I was working fine before 1 week.
It still work fine at noon. But now i get same issue with you.
Woah is this a recurring issue? Happening for me too. Among the things I've tried are:
I've been trying my way around this since past 2 hours, any help would be appreciated. 👍
Edit: This used to work at approx 10:50AM IST, but not happening lately.
@aurelN Thanks may be I will work. Let's wait for sometime and then will try again if it will work.
@heytulsiprasad @namlh19 you can wait as @aurelN mentioned a updated may be it will resolve it. Update here once anybody get a solution.
@puneetkansal04 Based on the info on the site you also need to update your local cli to the latest version in order to use the new endpoint. "Update - upload.appcenter.ms url has been discontinued - please use file.appcenter.ms instead.
Please update appcenter-cli, Jenkins and Fastlane plugins and App Center ADO Distribute task to the latest version if you have issues with distribution."
But first wait for the maintenance to finish.
This is the problem. Server down. Perhaps when Microsoft starts using AWS it will normalize its operations.
Yep, to further confirm the above we've been getting this using the latest CLI in CICD as of an hour ago (appcenter-cli@2.10.4).
The same issue happening in an Azure DevOps pipeline (macOS-11
with appcenter-cli@2.10.4
) when running appcenter distribute release
.
Hi guys, sorry for the inconvenience. This was caused by some planned work on the backend side. It should work now. Please let me know if someone still experiences this error.
Related issue: https://github.com/microsoft/appcenter-cli/issues/1723/
ok now its working fine
On Tue, 9 Nov 2021 at 23:18, Dima @.***> wrote:
Hi guys, sorry for the inconvenience. This was caused by some planned work on the backend side. It should work now. Please let me know if someone still experiences this error.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/microsoft/appcenter-cli/issues/682#issuecomment-964388153, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALSCJCPXQMPXTNWA5CKKTUTULFNGHANCNFSM4JBNRM2A . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
If anyone wants a work-around for this issue, here is how i solved it. Install superagent-proxy globally.
npm i -g superagent-proxy
Navigate to your installed appcenter-cli module and edit the
request.js
file. For me, I found the file here:C:\Users\xxxxxxx\AppData\Roaming\npm\node_modules\appcenter-cli\node_modules\appcenter-file-upload-client\dist\core\request.js
You're adding 2 lines to this file. See below.
.... var request = require("superagent"); require('superagent-proxy')(request); <------- add this line function sendRequest(requestOptions, log) { var abort = 0; var req = request .post(requestOptions.url) .proxy(process.env.http_proxy) <------ add this line ....
Make sure your http_proxy is set in your environment variable, and it should work now. Note, that if you update the appcenter-cli, you might have to make this change again.
For appcenter-file-upload-client@0.1.0
, the change is in node_modules/appcenter-file-upload-client/dist/core/request.js
...
var request = require("superagent");
require('superagent-proxy')(request); // <-- CHANGE #1
function sendRequest(requestOptions, log) {
var abort = 0;
var req = request(requestOptions.method, requestOptions.url)
.set('X-XblCorrelationId', requestOptions.correlationId)
.set('MS-CV', requestOptions.correlationVector);
if (process.env.http_proxy) { // <-- CHANGE #2
req.proxy(process.env.http_proxy)
}
...
}
I'm closing this issue. Please let me know if anyone is still facing it.
@DmitriyKirakosyan the issue is still reproducible. proxy settings are not honored by appcenter-file-upload-client@0.1.0
that is used by appcenter-cli
when running appcenter codepush release
@mrvincenzo , I just tested uploading release with a proxy and it worked well for me.
Make sure you are using the latest appcenter-cli
(2.14.0). The appcenter-file-upload-client-node
current version is 1.2.11
.
@DmitriyKirakosyan The code I referenced, appcenter codepush release, doesn't use appcenter-file-upload-client-node
. Instead it uses appcenter-file-upload-client, version 0.1.0
, which means that the problem is still there
@mrvincenzo , you are right. I'm sorry for the confusion. appcenter-file-upload-client
doesn't support proxy at this moment.
@DmitriyKirakosyan ok, now that we are aligned, IMHO there 2 possible fixes
appcenter-file-upload-client
package to support proxyappcenter-file-upload-client
with patch-package
in appcenter-cli
The fix is as simple as: https://github.com/microsoft/appcenter-cli/issues/682#issuecomment-1556180535
found a simple hack which works 90% of the times, simply switch the network/wifi you're connected to and then run the command.
works like a charm lol
I'm not able to do a release when running behind an http proxy. Most simple appcenter queries will work fine, but when it comes to submitting a code release, this will fail.
When I run a similar command as below, it always fails.
appcenter codepush release -a appname -t 1.0.0 -d Staging -c ./platforms/android/app/src/main/assets/www --debug
The output ends with the following:
I've traced this to
appcenter-file-upload-client
module which is using thesuperagent
HTTP request library. However, there is no proxy support here. I found that if I manually include and configure the optional add-on superagent-proxy inside the request.js file, I can get this to work.I couldn't find appcenter-file-upload-client in Github, but this should be a rather simple change. Right now, I don't see how this library can be used in a corporate/enterprise environment.