Skip to content
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

createConnectorClient function is not getting the correct ConnectorFactory #3890

Closed
sw-joelmut opened this issue Aug 2, 2021 · 0 comments · Fixed by #3891
Closed

createConnectorClient function is not getting the correct ConnectorFactory #3890

sw-joelmut opened this issue Aug 2, 2021 · 0 comments · Fixed by #3891
Labels
bug Indicates an unexpected problem or an unintended behavior. needs-triage The issue has just been created and it has not been reviewed by the team.

Comments

@sw-joelmut
Copy link
Collaborator

Version

4.15.0-dev.20210726.c56bbf1

Describe the bug

When using the OAuthPrompt in the FunctionalTests pipelines with the new CloudAdapter over DirectLine channel, it throws an unhandled error: DialogContextError: connectorFactory.create is not a function error, causing the next steps to return an Unauthorized error.
This issue is caused due to an incorrect way of retrieving the ConnectorFactory from the TurnContext state, causing the failure of not having the 'create' method.
Applying the solution by changing the key to retrieve the factory from the state from UserTokenClientKey to ConnectorFactoryKey solved the issue.

Additional context

We are updating the FunctionalTests bots to support CloudAdapter and this error happened when we executed Auth functionality over DirectLine channel.

Screenshots

The following image shows the error thrown when trying to create the ConnectorClient.
imagen

@sw-joelmut sw-joelmut added bug Indicates an unexpected problem or an unintended behavior. needs-triage The issue has just been created and it has not been reviewed by the team. labels Aug 2, 2021
@sw-joelmut sw-joelmut reopened this Aug 2, 2021
joshgummersall pushed a commit that referenced this issue Aug 2, 2021
…t ConnectorFactory (#3891)

* Fix createConnectorClient not getting the proper ConnectorFactory

* Add Unit Tests to support the fix for the createConnectorClient function

* Add missing await when assert.rejects is executed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Indicates an unexpected problem or an unintended behavior. needs-triage The issue has just been created and it has not been reviewed by the team.
Projects
None yet
1 participant