fbs
fbs copied to clipboard
Releasing Mac Version of application SSL error
I get an error when using the fbs release <version>
command. I sometimes get this on windows as well, but after several tries, it works. Cant get it to work on macOS.
Error Message
waited 1 seconds for .DS_STORE to be created.
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/urllib/request.py", line 1346, in do_open
h.request(req.get_method(), req.selector, req.data, headers,
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/http/client.py", line 1253, in request
self._send_request(method, url, body, headers, encode_chunked)
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/http/client.py", line 1299, in _send_request
self.endheaders(body, encode_chunked=encode_chunked)
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/http/client.py", line 1248, in endheaders
self._send_output(message_body, encode_chunked=encode_chunked)
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/http/client.py", line 1008, in _send_output
self.send(msg)
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/http/client.py", line 948, in send
self.connect()
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/http/client.py", line 1422, in connect
self.sock = self._context.wrap_socket(self.sock,
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/ssl.py", line 500, in wrap_socket
return self.sslsocket_class._create(
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/ssl.py", line 1040, in _create
self.do_handshake()
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/ssl.py", line 1309, in do_handshake
self._sslobj.do_handshake()
ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1129)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/brian/.local/share/virtualenvs/app-ooniLFkl/bin/fbs", line 8, in <module>
sys.exit(_main())
File "/Users/brian/.local/share/virtualenvs/app-ooniLFkl/lib/python3.9/site-packages/fbs/__main__.py", line 17, in _main
fbs.cmdline.main()
File "/Users/brian/.local/share/virtualenvs/app-ooniLFkl/lib/python3.9/site-packages/fbs/cmdline.py", line 32, in main
fn(*args)
File "/Users/brian/.local/share/virtualenvs/app-ooniLFkl/lib/python3.9/site-packages/fbs/builtin_commands/__init__.py", line 475, in release
upload()
File "/Users/brian/.local/share/virtualenvs/app-ooniLFkl/lib/python3.9/site-packages/fbs/builtin_commands/__init__.py", line 365, in upload
_upload_repo(username, password)
File "/Users/brian/.local/share/virtualenvs/app-ooniLFkl/lib/python3.9/site-packages/fbs/upload.py", line 10, in _upload_repo
status, response = _server.post_json('start_upload', {
File "/Users/brian/.local/share/virtualenvs/app-ooniLFkl/lib/python3.9/site-packages/fbs/_server.py", line 16, in post_json
with urlopen(request, data_bytes) as response:
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/urllib/request.py", line 214, in urlopen
return opener.open(url, data, timeout)
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/urllib/request.py", line 517, in open
response = self._open(req, data)
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/urllib/request.py", line 534, in _open
result = self._call_chain(self.handle_open, protocol, protocol +
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/urllib/request.py", line 494, in _call_chain
result = func(*args)
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/urllib/request.py", line 1389, in https_open
return self.do_open(http.client.HTTPSConnection, req,
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/urllib/request.py", line 1349, in do_open
raise URLError(err)
urllib.error.URLError: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1129)>
(app) ---------------------------
~/personal-projects/dca-app/app(main*) » openssl 1 ↵ brian@Brians-MacBook-Pro
OpenSSL> exit
(app) ---------------------------
- macOS BigSur
- python3.9
- fbs pro 1.0.6
- PyInstaller 4.5.1
- Psyide6
This seems like it's not the whole stack trace. I'd love to know which URL is being requested and leads to a certificate error.
I reran the command and this was the whole stack trace and even tried to include the --debug
flag but it did not work. fbs freeze
and fbs installer
do work.
If I run the commands individually fbs freeze
, fbs installer
, fbs upload
It fails at fbs upload
with the same stack trace above. but will repost for confirmation
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/urllib/request.py", line 1346, in do_open
h.request(req.get_method(), req.selector, req.data, headers,
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/http/client.py", line 1253, in request
self._send_request(method, url, body, headers, encode_chunked)
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/http/client.py", line 1299, in _send_request
self.endheaders(body, encode_chunked=encode_chunked)
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/http/client.py", line 1248, in endheaders
self._send_output(message_body, encode_chunked=encode_chunked)
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/http/client.py", line 1008, in _send_output
self.send(msg)
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/http/client.py", line 948, in send
self.connect()
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/http/client.py", line 1422, in connect
self.sock = self._context.wrap_socket(self.sock,
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/ssl.py", line 500, in wrap_socket
return self.sslsocket_class._create(
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/ssl.py", line 1040, in _create
self.do_handshake()
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/ssl.py", line 1309, in do_handshake
self._sslobj.do_handshake()
ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1129)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/brian/.local/share/virtualenvs/app-ooniLFkl/bin/fbs", line 8, in <module>
sys.exit(_main())
File "/Users/brian/.local/share/virtualenvs/app-ooniLFkl/lib/python3.9/site-packages/fbs/__main__.py", line 17, in _main
fbs.cmdline.main()
File "/Users/brian/.local/share/virtualenvs/app-ooniLFkl/lib/python3.9/site-packages/fbs/cmdline.py", line 32, in main
fn(*args)
File "/Users/brian/.local/share/virtualenvs/app-ooniLFkl/lib/python3.9/site-packages/fbs/builtin_commands/__init__.py", line 365, in upload
_upload_repo(username, password)
File "/Users/brian/.local/share/virtualenvs/app-ooniLFkl/lib/python3.9/site-packages/fbs/upload.py", line 10, in _upload_repo
status, response = _server.post_json('start_upload', {
File "/Users/brian/.local/share/virtualenvs/app-ooniLFkl/lib/python3.9/site-packages/fbs/_server.py", line 16, in post_json
with urlopen(request, data_bytes) as response:
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/urllib/request.py", line 214, in urlopen
return opener.open(url, data, timeout)
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/urllib/request.py", line 517, in open
response = self._open(req, data)
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/urllib/request.py", line 534, in _open
result = self._call_chain(self.handle_open, protocol, protocol +
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/urllib/request.py", line 494, in _call_chain
result = func(*args)
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/urllib/request.py", line 1389, in https_open
return self.do_open(http.client.HTTPSConnection, req,
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/urllib/request.py", line 1349, in do_open
raise URLError(err)
urllib.error.URLError: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1129)>
I previously forgot to run pip install fbs[upload]
but that did not help my case either
I solved the issue. It has to do with macOS not providing openssl headers.
Im Using Python3.9 which should include its own version of openssl so im not sure why its not working...
ISSUE
You get the error SSL: CERTIFICATE_VERIFY_FAILED
FIX
I ran the following command in my terminal (Adjust to your path/ python version)
/Applications/Python\ 3.9/Install\ Certificates.command
stackoverflow link for reference
Conclusion
This is not necessarily an fbs issue but it does affect fbs
Maybe I need to open a separate thread for this please let me know
but now that I release the app it is corrupted when I download and install. The created installer using fbs installer
installs and works fine but when I upload and download to test it gets installed but when I try to open the app it gives an error.
I'm sorry I don't have time to look at this at the moment. It would surprise me if simply uploading and re-downloading the installer would break it. If yes, it could be a code signing issue. I would compare md5sum installer.dmg
of the local and the re-downloaded version.
I compared the downloaded image md5 with the local version and they match yet i get an error with the installer.
I now am getting the SSL error on my windows environment a lot more frequently with a different fbs error
tracelog
Traceback (most recent call last):
File "C:\Program Files\Python39\lib\urllib\request.py", line 1346, in do_open
h.request(req.get_method(), req.selector, req.data, headers,
File "C:\Program Files\Python39\lib\http\client.py", line 1279, in request
self._send_request(method, url, body, headers, encode_chunked)
File "C:\Program Files\Python39\lib\http\client.py", line 1325, in _send_request
self.endheaders(body, encode_chunked=encode_chunked)
File "C:\Program Files\Python39\lib\http\client.py", line 1274, in endheaders
self._send_output(message_body, encode_chunked=encode_chunked)
File "C:\Program Files\Python39\lib\http\client.py", line 1034, in _send_output
self.send(msg)
File "C:\Program Files\Python39\lib\http\client.py", line 974, in send
self.connect()
File "C:\Program Files\Python39\lib\http\client.py", line 1448, in connect
self.sock = self._context.wrap_socket(self.sock,
File "C:\Program Files\Python39\lib\ssl.py", line 500, in wrap_socket
return self.sslsocket_class._create(
File "C:\Program Files\Python39\lib\ssl.py", line 1040, in _create
self.do_handshake()
File "C:\Program Files\Python39\lib\ssl.py", line 1309, in do_handshake
self._sslobj.do_handshake()
ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: certificate has expired (_ssl.c:1129)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Program Files\Python39\lib\runpy.py", line 197, in _run_module_as_main
return _run_code(code, main_globals, None,
File "C:\Program Files\Python39\lib\runpy.py", line 87, in _run_code
exec(code, run_globals)
File "C:\Users\Brian\.virtualenvs\app-ogPILKHj\Scripts\fbs.exe\__main__.py", line 7, in <module>
File "C:\Users\Brian\.virtualenvs\app-ogPILKHj\lib\site-packages\fbs\__main__.py", line 17, in _main
fbs.cmdline.main()
File "C:\Users\Brian\.virtualenvs\app-ogPILKHj\lib\site-packages\fbs\cmdline.py", line 32, in main
fn(*args)
File "C:\Users\Brian\.virtualenvs\app-ogPILKHj\lib\site-packages\fbs\builtin_commands\__init__.py", line 475, in release
upload()
File "C:\Users\Brian\.virtualenvs\app-ogPILKHj\lib\site-packages\fbs\builtin_commands\__init__.py", line 365, in upload
_upload_repo(username, password)
File "C:\Users\Brian\.virtualenvs\app-ogPILKHj\lib\site-packages\fbs\upload.py", line 10, in _upload_repo
status, response = _server.post_json('start_upload', {
File "C:\Users\Brian\.virtualenvs\app-ogPILKHj\lib\site-packages\fbs\_server.py", line 16, in post_json
with urlopen(request, data_bytes) as response:
File "C:\Program Files\Python39\lib\urllib\request.py", line 214, in urlopen
return opener.open(url, data, timeout)
File "C:\Program Files\Python39\lib\urllib\request.py", line 517, in open
response = self._open(req, data)
File "C:\Program Files\Python39\lib\urllib\request.py", line 534, in _open
result = self._call_chain(self.handle_open, protocol, protocol +
File "C:\Program Files\Python39\lib\urllib\request.py", line 494, in _call_chain
result = func(*args)
File "C:\Program Files\Python39\lib\urllib\request.py", line 1389, in https_open
return self.do_open(http.client.HTTPSConnection, req,
File "C:\Program Files\Python39\lib\urllib\request.py", line 1349, in do_open
raise URLError(err)
urllib.error.URLError: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: certificate has expired (_ssl.c:1129)>
notice
certificate verify failed: certificate has expired
Maybe this has to do with the recent expiration of LetsEncrypt's root certificate. I renewed the SSL certificate of build-system.fman.io. Are you still getting the error?
yes this seems to have fixed the issue :-)
I have the same problem. Fine when I use "fbs installer", but damaged dmg.-file when "fbs upload" and downloaded.
The above error message was not about a damaged .dmg file.
(Edit: sorry, i missed one message that was about a "damaged" dmg. But it said the md5sum was not changed by upload
).