-
Notifications
You must be signed in to change notification settings - Fork 281
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
JwtTokenExtractor.getIdentity:err! FetchError: request to https://login.botframework.com/v1/.well-known/openidconfiguration failed, reason: connect ETIMEDOUT #4544
Comments
After some investigation, the problem seems to be in the refreshCache method of the OpenIdMetadata class. More specifically, in the line: const res = await fetch(this.url); which does not use the proxySettings provided for the createBotFrameworkAuthenticationFromConfiguration method. |
@saulo2 There is a test version on NPM we think addresses this. The version is: 4.21.4-dev. Can you try this version and check if it corrects the problem? |
@tracyboehrer and @ceciliaavila thanks for addressing this issue. Right now, I am travelling on vacation. As soon I come back (circa 10 days) I am going to test the fix and give you feedback. |
@tracyboehrer @ceciliaavila hi) To solve it we've followed your instructions, installed: {
"botbuilder": "4.21.4-dev",
} Also, we have added
It started to fail on request to |
@saulo2 and @denisogolubev There is a new test version: 4.21.4-dev2 |
@tracyboehrer thanks a lot, it fixed the previous issue.
Is it something with our configurations or is it still the issue with the proxy? |
Hi @denisogolubev,
|
According to this issue, proxy settings are not globally set in NodeJS, we need to use libraries to manage this. This is a better alternative than setting the proxy host and port values in the BotframeworkAuthentication options. However, for the |
@ceciliaavila it looks like this configuration with node-global-proxy solves the issue) |
@tracyboehrer and @ceciliaavila I confirm version 4.21.4-dev2 fixes the matter. However, I have tested 4.21.4 and it seems it does not contain the fix. Also, it seems the fix is not in the main branch. For example, the constructor of the class OpenIdMetadata (https://github.com/microsoft/botbuilder-js/blob/main/libraries/botframework-connector/src/auth/openIdMetadata.ts) does not receive a ProxySettings instance as it second argument. |
Hi @saulo2, we discarded the fix from 4.21.4-dev2 because we found a simpler solution by adding to the bot the node-global-proxy package. Can you try this solution to see if it fixes the issue on your side? |
@ceciliaavila the solution around node-global-proxy also fixed the issue, but it caused undesirable side effects. My bot access APIs on other intranet servers, which the corporate proxy does not have access to because it only access servers on the internet. Thus, with node-global-proxy my bot is able to access https://login.botframework.com/v1/.well-known/openidconfiguration but it does not work, because it is not able to access the other intranet servers. Could you reintroduce your fix in a new botbuilder-js version? |
@saulo2, thanks for your input. |
@ceciliaavila @saulo2 @denisogolubev Can we clarify what does work? denisogolubev reported that 4.21.4-dev2 (which was built from the PR branch) caused a subsequent problem, but that node-global-proxy worked. Is the final solution this PR and possibly node-global-proxy? BTW, the actual 4.21.4 release done recently does NOT have that PR fix. |
@tracyboehrer I am happy to clarify that:
|
…https://login.botframework.com/v1/.well-known/openidconfiguration (#4583) * Provide proxy setting to openIdMetadata * Replace @azure/ms-rest-js with @azure/core-http * Add missing agent settings in getKeys call
…https://login.botframework.com/v1/.well-known/openidconfiguration (#4583) * Provide proxy setting to openIdMetadata * Replace @azure/ms-rest-js with @azure/core-http * Add missing agent settings in getKeys call
@tracyboehrer and @ceciliaavila I am happy to confirm that the fix has been successfully incorporated into the codebase. I tested version 4.22.1 and it is working as expected. |
Hi,
I am getting the error below with the botbuilder 4.15.0:
JwtTokenExtractor.getIdentity:err! FetchError: request to https://login.botframework.com/v1/.well-known/openidconfiguration failed, reason: connect ETIMEDOUT 104.41.13.179:443
at ClientRequest. (/opt/nexos-teams/bot/node_modules/node-fetch/lib/index.js:1501:11)
at ClientRequest.emit (node:events:513:28)
at TLSSocket.socketErrorListener (node:_http_client:494:9)
at TLSSocket.emit (node:events:513:28)
at emitErrorNT (node:internal/streams/destroy:157:8)
at emitErrorCloseNT (node:internal/streams/destroy:122:3)
at processTicksAndRejections (node:internal/process/task_queues:83:21) {
type: 'system',
errno: 'ETIMEDOUT',
code: 'ETIMEDOUT'
}
I am behind a corporate fiewall. I have tried setting the HTTP_PROXY and HTTPS_PROXY variables, but it did not solve the problem.
I have also tries configuring the proxySettings options as below, but it also did not solve the problem.
const botFrameworkAuthentication = createBotFrameworkAuthenticationFromConfiguration(null, credentialsFactory, null, null, {
proxySettings: {
host: "cachesv",
port: 8080
}
});
Does botbuilder supports http proxies?
The text was updated successfully, but these errors were encountered: