Closed alcazes closed 3 years ago
Thanks for reporting this @alcazes. It's hard to tell why it's failing in your situation because the error details is undefined
. We rely on https://github.com/adobe/jwt-auth for retrieving the access token and I suspect your getting undefined
error details due to an issue we reported in that library a while back: https://github.com/adobe/jwt-auth/issues/9
That issue has since been resolved and a new version has been published. I suspect we just need to update the uploader to use the latest version and make a couple adjustments in our code to better align with the adjustments in the jwt-auth library. At that point, hopefully we can get you better information about why the uploader is failing to retrieve an access token on your behalf.
Thanks @Aaronius for the details. I have tested outside my company network and the reactor-uploader finished with success and I was able to upload the extension to the dev environment.
I think there might e an issue on my company network and I will try to use https://github.com/adobe/jwt-auth to see which error it returns.
Fixing the undefined
error for users generally is blocked by https://github.com/adobe/jwt-auth/pull/26.
@Aaronius @thebenrob I think the issue was based on the fact that we have a proxy set on our side and we need to specify the proxy with the credentials to make the uploader work.
It seems proxy
option was required on our side with https://username:password@serverproxy:port to be added to requests.
i.e
getExtensionPackageFromServer.js
const options = {
method: 'GET',
proxy: process.env.proxyServer,
strictSSL:false,
We also had to modify the code to use jwt-auth We directly copied the js file inside our forked project and changed this parts:
[...]
return fetch(`${ims}/ims/exchange/jwt/`, postOptions, process.env.proxyServer)
Could both the uploader and jwt-auth be updated to allow proxy to be used ? and we could pass it as command line argument like --proxy
?
We also had to add process.env.NODE_TLS_REJECT_UNAUTHORIZED = '0';
@Aaronius, do we know if these changes would have a negative impact on other non-proxy users?
The way we would implement it would not have a negative impact on non-proxy users.
@Aaronius @thebenrob Do we know when the proxy option will be available ?
Tracked as PDCL-4946.
I am getting this error when I use the uploader: Error retrieving access token. undefined
Used verbose mode and I get the following: