Getting error EOF occurred in violation of protocol (_ssl.c:1123) slack-app
See original GitHub issueI have this error after launsh lesson https://slack.dev/bolt-python/tutorial/getting-started I’m working behide a proxy server.
Reproducible in:
(.venv) PS C:\first-bolt-app\.venv> py -3 app.py
Traceback (most recent call last):
File "C:\Users\vvgrink1\AppData\Local\Programs\Python\Python39\lib\urllib\request.py", line 1342, in do_open
h.request(req.get_method(), req.selector, req.data, headers,
File "C:\Users\vvgrink1\AppData\Local\Programs\Python\Python39\lib\http\client.py", line 1255, in request
self._send_request(method, url, body, headers, encode_chunked)
File "C:\Users\vvgrink1\AppData\Local\Programs\Python\Python39\lib\http\client.py", line 1301, in _send_request
self.endheaders(body, encode_chunked=encode_chunked)
File "C:\Users\vvgrink1\AppData\Local\Programs\Python\Python39\lib\http\client.py", line 1250, in endheaders
self._send_output(message_body, encode_chunked=encode_chunked)
File "C:\Users\vvgrink1\AppData\Local\Programs\Python\Python39\lib\http\client.py", line 1010, in _send_output
self.send(msg)
File "C:\Users\vvgrink1\AppData\Local\Programs\Python\Python39\lib\http\client.py", line 950, in send
self.connect()
File "C:\Users\vvgrink1\AppData\Local\Programs\Python\Python39\lib\http\client.py", line 1424, in connect
self.sock = self._context.wrap_socket(self.sock,
File "C:\Users\vvgrink1\AppData\Local\Programs\Python\Python39\lib\ssl.py", line 500, in wrap_socket
return self.sslsocket_class._create(
File "C:\Users\vvgrink1\AppData\Local\Programs\Python\Python39\lib\ssl.py", line 1040, in _create
self.do_handshake()
File "C:\Users\vvgrink1\AppData\Local\Programs\Python\Python39\lib\ssl.py", line 1309, in do_handshake
self._sslobj.do_handshake()
ssl.SSLEOFError: EOF occurred in violation of protocol (_ssl.c:1123)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\first-bolt-app\.venv\app.py", line 5, in <module>
app = App(
File "C:\Users\vvgrink1\AppData\Local\Programs\Python\Python39\lib\site-packages\slack_bolt\app\app.py", line 239, in __init__
self._init_middleware_list(
File "C:\Users\vvgrink1\AppData\Local\Programs\Python\Python39\lib\site-packages\slack_bolt\app\app.py", line 256, in _init_middleware_list
auth_test_result = self._client.auth_test(token=self._token)
File "C:\Users\vvgrink1\AppData\Local\Programs\Python\Python39\lib\site-packages\slack_sdk\web\client.py", line 765, in auth_test
return self.api_call("auth.test", json=kwargs)
File "C:\Users\vvgrink1\AppData\Local\Programs\Python\Python39\lib\site-packages\slack_sdk\web\base_client.py", line 128, in api_call
return self._sync_send(api_url=api_url, req_args=req_args)
File "C:\Users\vvgrink1\AppData\Local\Programs\Python\Python39\lib\site-packages\slack_sdk\web\base_client.py", line 164, in _sync_send
return self._urllib_api_call(
File "C:\Users\vvgrink1\AppData\Local\Programs\Python\Python39\lib\site-packages\slack_sdk\web\base_client.py", line 275, in _urllib_api_call
response = self._perform_urllib_http_request(url=url, args=request_args)
File "C:\Users\vvgrink1\AppData\Local\Programs\Python\Python39\lib\site-packages\slack_sdk\web\base_client.py", line 423, in _perform_urllib_http_request
raise err
File "C:\Users\vvgrink1\AppData\Local\Programs\Python\Python39\lib\site-packages\slack_sdk\web\base_client.py", line 397, in _perform_urllib_http_request
resp = urlopen( # skipcq: BAN-B310
File "C:\Users\vvgrink1\AppData\Local\Programs\Python\Python39\lib\urllib\request.py", line 214, in urlopen
return opener.open(url, data, timeout)
File "C:\Users\vvgrink1\AppData\Local\Programs\Python\Python39\lib\urllib\request.py", line 517, in open
response = self._open(req, data)
File "C:\Users\vvgrink1\AppData\Local\Programs\Python\Python39\lib\urllib\request.py", line 534, in _open
result = self._call_chain(self.handle_open, protocol, protocol +
File "C:\Users\vvgrink1\AppData\Local\Programs\Python\Python39\lib\urllib\request.py", line 494, in _call_chain
result = func(*args)
File "C:\Users\vvgrink1\AppData\Local\Programs\Python\Python39\lib\urllib\request.py", line 1385, in https_open
return self.do_open(http.client.HTTPSConnection, req,
File "C:\Users\vvgrink1\AppData\Local\Programs\Python\Python39\lib\urllib\request.py", line 1345, in do_open
raise URLError(err)
urllib.error.URLError: <urlopen error EOF occurred in violation of protocol (_ssl.c:1123)>
The Slack SDK version
(.venv) PS C:\first-bolt-app\.venv> pip list
Package Version
--------------- -------
cffi 1.14.4
cryptography 3.3.1
ndg-httpsclient 0.5.1
pip 20.2.3
pyasn1 0.4.8
pycparser 2.20
pyOpenSSL 20.0.1
setuptools 49.2.1
six 1.15.0
slack-bolt 1.2.3
slack-sdk 3.2.1
Python runtime version
Python 3.9.1
OS info
(Windows 10
Steps to reproduce:
import os
from slack_bolt import App
app = App(
token=os.environ.get("SLACK_BOT_TOKEN"),
signing_secret=os.environ.get("SLACK_SIGNING_SECRET")
)
if __name__ == "__main__":
app.start(port=int(os.environ.get("PORT", 3000)))
Expected result:
start application
Actual result:
Getting error urlopen error EOF occurred in violation of protocol (_ssl.c:1123)
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
Python requests.exceptions.SSLError: EOF occurred in ...
Tried above and urlopen showed tls_version as 1.2 but still I get the same error : ssl.SSLEOFError: EOF occurred in violation of protocol...
Read more >EOF occurred in violation of protocol (_ssl.c:1122) - Reddit
Hello everyone, I'm using requests to acces a url and grab its information using: x = json.loads(requests.get(url…
Read more >Certificate renewal error: EOF occurred in violation of protocol
On Ubuntu 18.04.5 LTS, I get: sudo apt install ca-certificates Reading package lists... Done Building dependency tree Reading state information.
Read more >sslerror: httpsconnectionpool(host='huggingface.co', port=443)
I'm trying in python: from sentencetransformers import SentenceTransformer sbertmodel = SentenceTransformer('all-MiniLM-L6-v2'). and I get this error:.
Read more >SSL Certificate Invalid - Python API - DataRobot Community
Solved: Hi, The error as it says is because it cannot validate certificates. Setting ssl_verify =False, works but it throws.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
As my code snippet shows, it’s an argument in the
WebClient
constructor. Create aWebClient
instance with your proxy url and pass it toApp
constructor.I’m seeing this running a flask app on lambda - but not with the old SDK, is this expected?