insomnia: Crash on Fedora 36 after got "Error: SSL connect error" when working with https websites
ℹ️ Note from Insomnia team: We don’t have a fix for this issue yet, but please refer to the workaround fix mentioned in
this comment(UPDATE) here.
SEE UPDATE 23 January 2023
Workaround
# remove existing insomnia installations
sudo dnf remove insomnia
# install latest insomnia
sudo dnf install https://github.com/Kong/insomnia/releases/download/core%402022.7.5/Insomnia.Core-2022.7.5.rpm
# download cups 2.4.1 libs and copy them to insomnia
curl -O https://kojipkgs.fedoraproject.org//packages/cups/2.4.1/7.fc36/x86_64/cups-libs-2.4.1-7.fc36.x86_64.rpm
rpm2cpio cups-libs-2.4.1-7.fc36.x86_64.rpm | cpio -idmv
sudo cp ./usr/lib64/libcups* /opt/Insomnia/.
# run insomnia
insomnia
Expected Behavior
Working normally
Actual Behavior
After sending a request to a https website like https://google.com, got an error: Error: SSL connect error
Reproduction Steps
- Send request to any https website. E.g. https://google.com
- Send request again (any https)
- App crash
Is there an existing issue for this?
- I have searched the issue tracker for this problem.
Additional Information
Timeline:
* Preparing request to https://google.com/
* Current time is 2022-08-17T02:41:53.423Z
* Enable automatic URL encoding
* Using default HTTP version
* Enable SSL validation
* Trying 172.217.24.110:443...
* Connected to google.com (172.217.24.110) port 443 (#0)
* ALPN, offering h2
* ALPN, offering http/1.1
* TLSv1.3 (OUT), TLS alert, internal error (592):
* OpenSSL SSL_connect: SSL_ERROR_SYSCALL in connection to google.com:443
* Closing connection 0
Log from console:
(base) ➜ ~ /opt/Insomnia/insomnia
09:41:43.262 › Running version 2022.5.0
09:41:43.271 › [electron client protocol] FAILED to set default protocol 'insomnia://'
09:41:43.278 › [electron client protocol] the current executable is not the default protocol for 'insomnia://'
09:41:43.305 › [electron client protocol] the default application set for 'insomnia://' is 'insomnia.desktop
'
libva error: vaGetDriverNameByIndex() failed with unknown libva error, driver_name = (null)
09:41:43.422 › [fix] Running database repairs
MESA-LOADER: failed to retrieve device information
MESA-LOADER: failed to open nvidia-drm: /usr/lib64/dri/nvidia-drm_dri.so: cannot open shared object file: Permission denied (search paths /usr/lib64/dri, suffix _dri)
failed to load driver: nvidia-drm
MESA-LOADER: failed to open zink: /usr/lib64/dri/zink_dri.so: cannot open shared object file: Permission denied (search paths /usr/lib64/dri, suffix _dri)
failed to load driver: zink
MESA-LOADER: failed to open kms_swrast: /usr/lib64/dri/kms_swrast_dri.so: cannot open shared object file: Permission denied (search paths /usr/lib64/dri, suffix _dri)
failed to load driver: kms_swrast
MESA-LOADER: failed to open swrast: /usr/lib64/dri/swrast_dri.so: cannot open shared object file: Permission denied (search paths /usr/lib64/dri, suffix _dri)
failed to load swrast driver
09:41:43.890 › [db] Initialized DB at /home/chicky/.config/Insomnia/insomnia.$TYPE.db
09:41:43.890 › [db] Init responses DB
09:41:43.892 › [localstorage] Initialized at /home/chicky/.config/Insomnia/localStorage
09:41:43.955 › [main] Loading file:///opt/Insomnia/resources/app.asar/index.html
09:41:44.464 › [updater] Updater not running platform=linux dev=false
[0817/094201.253776:ERROR:elf_dynamic_array_reader.h(64)] tag not found
[0817/094201.254021:ERROR:elf_dynamic_array_reader.h(64)] tag not found
[0817/094201.254161:ERROR:elf_dynamic_array_reader.h(64)] tag not found
[1] 18463 segmentation fault (core dumped) /opt/Insomnia/insomnia
Insomnia Version
2022.5.0 and later
What operating system are you using?
Other Linux
Operating System Version
Fedora 36 and 37
Installation method
rpm
Last Known Working Insomnia version
No response
About this issue
- Original URL
- State: open
- Created 2 years ago
- Reactions: 14
- Comments: 81 (8 by maintainers)
Downgrading insomnia to 2022.4.2 didn’t work.
Downgrading cups to 2.4.1 did work.
sudo dnf install cups-1:2.4.1-7.fc36.x86_64
properly downgraded all 5 packages in 1 go.EDIT: I’m just confirming that @davelima was right about cups. He did all the investigative work and is the real MVP.
Hi folks, quick update, we did a small workaround exploration to see how feasible it would be for us to provide builds for Fedora 36 in #5281.
We can’t guarantee this will get merged anytime soon. One thing that would help is for us to get an idea of the size of the community that uses Fedora, so we could prioritize a proper solution in our roadmap. Feel free to upvote/thumbs-up this issue/comment if this problem affects you directly.
UPDATE: see my comment bellow: https://github.com/Kong/insomnia/issues/5088#issuecomment-1326658425
@filfreire thanks!
I have made some tests with older versions and it all seems to have the same issue, so i’ve reviewed the last updates on my OS and looks like the problem starts happening after upgrade cups from 2.4.1 to 2.4.2 (why i cannot say).
Downgrading cups to 2.4.1 solves the problem. Hope that piece of info help you guys.
This is the list of downgraded packages:
EDIT: There was actually some SSL related changes on cups 2.4.2, according to the changelog
Hi folks, while we don’t have a more definitive solution, in order to unblock you in the meantime, I’ve compiled an experimental build on my fork which you can download and use:
https://github.com/filfreire/insomnia/releases/tag/fedora-experiment%408ae4fe71
Contains changes up to 8ae4fe71 and was built using: https://github.com/Kong/insomnia/pull/5281
Please let me know if you have any issues with it.
Quick follow-up update: So it seems the only thing that consistently does the trick is the fix suggested by @padys in this comment. The experimental builds are not guaranteed to work.
Possible workaround
Combinations tried:
.so
files into/opt/Insomnia
✅.so
files into/opt/Insomnia
✅The hypothesis I mentioned above, of
cups
not being strictly defined on electron-builder/app-builder now seems less likely. It might really be something to do with Fedora updatingcups
to 2.4.2.This could also explain why regardless of using
rpm
orAppImage
- any old or recent insomnia version would stop working the moment the system-level version of cups became2.4.2
.Other notes:
We’ll update you folks as soon as we know more, but in the meantime please let us know if the workaround on this comment based on @padys original one also worked for you.
So I compiled libcurl against my system’s installed libcurl. I wasn’t happy with cups downgrade workaround. I used the following steps
make sure dependencies are installed
Edit
packages/insomnia/electron-builder.config.js
and addbuildDependenciesFromSource: true
. This config actually makes packages app’s libcurl to be recompiled.Now its working fine with latest cups installed.
Latest version 2022.7.1 still not working on fedora 37
Fedora 37 has been released now. This leaves users with no (known) workaround.
Is this issue going to be important enough for you to fix? If not I will cancel my subscription.
Try this workaround (should work in Fedora 36 and 37):
cups-libs
for Fedora 36 from https://kojipkgs.fedoraproject.org//packages/cups/2.4.1/7.fc36/x86_64/cups-libs-2.4.1-7.fc36.x86_64.rpm (fullcups-2.4.1-7.fc36
build info is here: https://koji.fedoraproject.org/koji/buildinfo?buildID=1941256)rpm2cpio cups-libs-2.4.1-7.fc36.x86_64.rpm | cpio -idmv
(it makes folderusr
in current location)libcups.so.2
andlibcupsimage.so.2
from extracted rpm (from./usr/lib64/
folder) into Insomnia instalation folder/opt/Insomnia
I hope it helps.
I use Fedora 37 and Insomnia 2022.6.0.
Still present on Fedora 36, Insomnia 2022.06.
First: Yes, I tried unchecking validate certificates. But since my OS is the recent Fedora version (36) with latest updated packages and google is a very popular website I don’t think that there is a problem with Certificate/CA. This is timeline with SSL validation disabled
Second: Yes, I tried both cURL, Postman (installed after so many tries to use Insomnia without success, including downgrade to 2022.4.0) and of course browser - all work flawlessly. This is verbose log of cURL
Hi folks, I pushed a new experimental build from latest
develop
branch.To install you can do:
And if it still doesn’t work, try the workaround mentioned here.
Also a small update. We’re still looking into a proper fix for
.rpm
builds. We’ve recently managed to fixsnapcraft
builds so you may want to switch over to those while.rpm
ones are not properly working. Sharing bellow some of the more recent findings:Electron docs mentions that for fedora it needs the
cups-devel
dependency (example)BUT, the underlying app-builder binary that electron-builder uses - is not adding that dependency in when running
rpmbuild
under the hood. This is what we use to build the current Insomnia.rpm
package.The hypothesis is - the docker build alternative pr that is used to create the
experimental
builds seems to solve it - because we add thatcups
dependency in and rebuild it in fedora environment from sources.The definitive fix might be just making sure the
cups
related dependency is defined app-builder/electron-builder when it’s runningrpmbuild
under the hood.We’re still looking into how to fix this properly, but in the meantime I would suggest you to either hold with the experimental builds or to try and use the snapcraft version instead.
If anyone from the community has a bit more in-deep knowledge and experience with building Electron for Fedora and have other hypothesis and suggestions please reach out.
Thanks folks 🙇
Just to reinforce
sudo dnf install cups-1:2.4.1-7.fc36.x86_64
did fixed the same error after F36 system upgrade. First SSL Error, then a crash.Valeu @davelima
Just to add to your combinations list: The flatpak version (currently at 2022.7.3), which seems to be an rebuilt AppImage, is also working fine on my Fedora 37, without tinkering with cups package.
Btw, i use the experimental build from here: https://github.com/Kong/insomnia/pull/5281#issuecomment-1326658906
It’s working fine for me on fedora 37.
Hmmm, strange, I tried building cups 2.4.1 myself, which made Insomnia work again.
https://github.com/OpenPrinting/cups/archive/refs/tags/v2.4.1.zip
And now even reinstalling cups 2.4.2 with dnf still does not brake it again for me. I don’t know why, maybe the install script did something which is not exactly reverted by reinstalling using dnf. I also tried to build cups at different commits to figure out the offending commit, but I was not able to break it again 🤷
Yes, issue also happens with the official provided AppImage. You can use the AppImage after compiling from my instructions. It’ll be in
packages/insomnia/dist
directory.I don’t know the metric of user distro’s, who are the audience of rpm packages? Fedora users? centos/almalinux? suse?. Instead of trying to make a single rpm work in all distro/all version, A simple fix could be just to publish separate packages for fc35/fc36. It could be easily done with modifying existing github actions a little bit. I can do a PR if that direction is acceptable to insomnia team.
Thank you so much !
But why does Insomnia uses cups ? Isn’t cups for printers ?
2022.7.2 is not working (showing the same SSL errors) even after compiling it myself, using https://github.com/Kong/insomnia/issues/5088#issuecomment-1235816006 workaround.
Edit: 2022.7.4 after re-compilation is not working either.
@CrystalSpore
I’d guess development headers are missing, try installing openssl-devel
Thank you so much @filfreire, it is working fine with cups 2.4.2
Also facing this error… downgrading some dependency may work, but is not suitable to working process… I only can use insomnia in localhost or some environment that does not use http
Same issue here with F36 and Insomnia 2022.5.1 as well as 2021.7.1, both AppImages. I will try the workaround, but I’m not admin on this machine and our IT will not be happy about the downgrade 😅 So a permanent solution would be appreciated very much 😃
Worked for me here. Thanks!
Based on your screenshot, you are downgrading cups-libs by doing this… which is clearly what the end goal is. dnf install cups-2.4.1 was assuming you had cups installed… It is kinda weird to have cups-libs installed, but not cups? It must be used as a dependency for things other than just cups. But for you, downgrading cups-libs would work:
sudo dnf install cups-libs-1:2.4.1-7.fc36.x86_64
While this works, I wouldn’t encourage much to suggest this solution. I mean, why to install a print tool/driver/app/whatever for something related to REST APIs, and more importantly, SSL connections?
I get this when I try to run that. I’m definitely not going to install extra packages to fix something that isn’t exactly broken:
I’m really rooting for @sarim’s PR (if any) so we can get this solved soon. Basically the tool is unusable otherwise 😦
Hi folks, quick update, but after installing updates on Fedora 36, I can reproduce the exact same issue, with these error logs
and Insomnia crashing soon after the SSL error:
Solution
I tried solution mentioned above by @davelima and @bisby
And after running
sudo dnf install cups-1:2.4.1-7.fc36.x86_64
it’s back working:Thank you @davelima and @bisby 😉🎖️
This is the part where I also have no idea at the moment. Tagging @DMarby and @johnwchadwick, perhaps they might have a hint here.