Comments (6)
When Proxman is not listening the error is Error: connect ECONNREFUSED
. So, appears to be there.
Cert issue? It is installed on the system.
Also tried:
const certs = [readFileSync('/Users/brandon/Desktop/proxyman.pem')];
const agent = new HttpsProxyAgent('https://172.20.7.148:9090', {
rejectUnauthorized: false,
ca: certs,
});
const cognitoIdpCient: CognitoIdentityProviderClient = new CognitoIdentityProviderClient({
region: REGION,
requestHandler: new NodeHttpHandler({
httpsAgent: agent,
}),
});
from: https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/node-registering-certs.html
Same error: "Client network socket disconnected before secure TLS connection was established"
from aws-sdk-v3-js-proxy.
Thanks for the bug report @brandonregard.
Is this code running on your local machine or on AWS Lambda?
Also, does this happen on every attempt or just occasionally?
from aws-sdk-v3-js-proxy.
Thanks for the bug report @brandonregard.
Is this code running on your local machine or on AWS Lambda?
Also, does this happen on every attempt or just occasionally?
On local machines and happens every time.
from aws-sdk-v3-js-proxy.
Hi @brandonregard ,
I have a feature I'll be releasing shortly that will allow you to specify additional options including specifying the ca for requests. In the interim, can you try running your process using the NODE_EXTRA_CA_CERTS
environment variable?
It needs to be set prior to starting up the process (i.e. you can't do process.env.NODE_EXTRA_CA_CERTS
in your code).
NODE_EXTRA_CA_CERTS="/Users/brandon/Desktop/proxyman.pem"
import { addProxyToClient } from 'aws-sdk-v3-proxy';
...
const cognitoIdpCient: CognitoIdentityProviderClient = addProxyToClient(
new CognitoIdentityProviderClient({
region: REGION,
}),
{
debug: true,
}
);
...
const forgotPasswordCommand: ForgotPasswordCommand = new ForgotPasswordCommand({
ClientId: CLIENT_ID,
Username: PHONE,
});
forgotPasswordResponse = await cognitoIdpCient.send(forgotPasswordCommand);
from aws-sdk-v3-js-proxy.
🎉 This issue has been resolved in version 2.1.0 🎉
The release is available on:
Your semantic-release bot 📦🚀
from aws-sdk-v3-js-proxy.
The latest version now supports additional agent options.
@brandonregard try updating to the latest version and executing the following:
import { addProxyToClient } from 'aws-sdk-v3-proxy';
...
const certs = [readFileSync('/Users/brandon/Desktop/proxyman.pem').toString()];
const cognitoIdpCient: CognitoIdentityProviderClient = addProxyToClient(
new CognitoIdentityProviderClient({
region: REGION,
}),
{
debug: true,
agentOptions: {
rejectUnauthorized: true,
ca: certs,
}
}
);
...
const forgotPasswordCommand: ForgotPasswordCommand = new ForgotPasswordCommand({
ClientId: CLIENT_ID,
Username: PHONE,
});
forgotPasswordResponse = await cognitoIdpCient.send(forgotPasswordCommand);
Let me know if you run into any additional issues, thanks!
from aws-sdk-v3-js-proxy.
Related Issues (3)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from aws-sdk-v3-js-proxy.