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

Socket mode and proxy not working #952

Closed
franco-martin opened this issue Feb 10, 2021 · 3 comments · Fixed by #951
Closed

Socket mode and proxy not working #952

franco-martin opened this issue Feb 10, 2021 · 3 comments · Fixed by #951
Labels
bug M-T: A confirmed bug report. Issues are confirmed when the reproduction steps are documented socket-mode Version: 3x
Milestone

Comments

@franco-martin
Copy link

(Filling out the following details about bugs will help us solve your issue sooner.)

Reproducible in:

The Slack SDK version

slack-bolt==1.3.0
slack-sdk==3.3.0
slackclient==2.9.3
slackeventsapi==2.2.1

Python runtime version

Python 3.8.6

OS info

Windows 10
Microsoft Windows [Version 10.0.19041.746]

Steps to reproduce:

client = WebClient(token=config.SLACK_BOT_TOKEN,
                   proxy="http://myproxy:8080"
                   )
app = App(client=client)

Expected result:

Application working

Actual result:

DEBUG:slack_sdk.web.base_client:Sending a request - url: https://www.slack.com/api/auth.test, query_params: {}, body_params: {}, files: {}, json_body: {}, headers: {'Content-Type': 'application/json;charset=utf-8', 'Authorization': '(redacted)', 'User-Agent': 'Python/3.8.6 slackclient/3.3.0 Windows/10'}
DEBUG:slack_sdk.web.slack_response:Received the following response - status: 200, headers: {...}, body: {'ok': True, 'url': 'https://....com/', 'team': '...', 'user': '...', 'team_id': '...', 'user_id': '...', 'bot_id': '...', 'is_enterprise_install': False}
DEBUG:slack_sdk.web.base_client:Sending a request - url: https://www.slack.com/api/apps.connections.open, query_params: {}, body_params: {}, files: {}, json_body: None, headers: {}
DEBUG:slack_sdk.web.slack_response:Received the following response - status: 200, headers: ..., body: {'ok': True, 'url': 'wss://wss-primary.slack.com/link/?ticket=...}
INFO:slack_bolt.App:Using non-ssl socket to connect (MYPROXY:8080)
WARNING:slack_bolt.App:Received an unexpected response for handshake (status: 400, response: HTTP/1.1 400 Bad Request
Cache-Control: no-cache
Pragma: no-cache
Content-Type: text/html; charset=utf-8
Proxy-Connection: close
Connection: close
Content-Length: 716, session id: ...)

I checked the proxy logs and got the following:

GET <invalid request url>

failed because: Scheme was not delimited by '://'

@stevengill
Copy link
Member

Hey @franco-martin,

I believe this is a duplicate of #948. We have an open PR for this in #951

@stevengill stevengill added duplicate An issue for the same purpose already exists, and a link is in the comments and removed untriaged labels Feb 10, 2021
@franco-martin
Copy link
Author

franco-martin commented Feb 10, 2021

hey @stevengill thank your for the quick response, I dont think so. That user is getting timeouts and the issue is because its ignoring the HTTP proxy. Im using an HTTPS proxy and getting bad request errors. My app is connecting but sending incorrect data. Does that make sense?
This is why im suspicious of the following

 INFO:slack_bolt.App:Using non-ssl socket to connect (MYPROXY:8080)

I think It should be using an ssl socket

@stevengill stevengill removed the duplicate An issue for the same purpose already exists, and a link is in the comments label Feb 10, 2021
@seratch
Copy link
Member

seratch commented Feb 10, 2021

@franco-martin Although the error you're facing is a bit different from the one in that issue, the pull request should resolve this issue. The current implementation is just incomplete.

@seratch seratch added bug M-T: A confirmed bug report. Issues are confirmed when the reproduction steps are documented socket-mode Version: 3x labels Feb 10, 2021
@seratch seratch added this to the 3.3.2 milestone Feb 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug M-T: A confirmed bug report. Issues are confirmed when the reproduction steps are documented socket-mode Version: 3x
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants