dash-docs-el / helm-dash

Browse Dash docsets inside emacs
510 stars 59 forks source link

Install [official/user] docset contacting error #188

Open elheremes opened 5 years ago

elheremes commented 5 years ago

I've always used helm-dash but recently there was this problem of not being able to connect to Github API when I try to install a new [official/user] docset. I've tried reinstall both helm-dash and emacs but this solution did not work. And yes, I've gnutls installed and compiled with emacs.

helm-dash-install-docset:

Contacting host: api.github.com:443`
gnutls.el: (err=[-50] The request is invalid.) boot: (:priority NORMAL:-VERS-TLS1.3 :hostname api.github.com :loglevel 0 :min-prime-bits 256 :trustfiles (/etc/ssl/certs/ca-certificates.crt) :crlfiles nil :keylist nil :verify-flags nil :verify-error nil :callbacks nil)
gnutls-negotiate: GnuTLS error: #<process api.github.com>, -50

helm-dash-install-user-docset:

Contacting host: dashes-to-dashes.herokuapp.com:443
gnutls.el: (err=[-50] The request is invalid.) boot: (:priority NORMAL:-VERS-TLS1.3 :hostname dashes-to-dashes.herokuapp.com :loglevel 0 :min-prime-bits 256 :trustfiles (/etc/ssl/certs/ca-certificates.crt) :crlfiles nil :keylist nil :verify-flags nil :verify-error nil :callbacks nil)
gnutls-negotiate: GnuTLS error: #<process dashes-to-dashes.herokuapp.com>, -50
areina commented 5 years ago

Hello, thank you for reporting the issue. We are going to take a look.

@kidd do you think this could be related to the change you did in the app to serve the community docsets?

kidd commented 5 years ago

@areina, I don't think so cause those changes are not "live" yet. dash-docs doesn't fetch anything from the new ones.

And https://dashes-to-dashes.herokuapp.com/docsets/contrib seems to work fine.

kidd commented 5 years ago

@elheremes, maybe this will fix your issue: https://github.com/dash-docs-el/helm-dash/issues/178#issuecomment-464847246 You might have to edit the code a little bit to fit the code after the refactor. (like changing helm-dash prefix to dash-docs)

elheremes commented 5 years ago

@elheremes, maybe this will fix your issue: #178 (comment) You might have to edit the code a little bit to fit the code after the refactor. (like changing helm-dash prefix to dash-docs)

Okay, now I can retrieve the docs list but if I try to install any docs using dash-docs-install-docsetthis appears again...

Contacting host: raw.github.com:443
gnutls.el: (err=[-50] The request is invalid.) boot: (:priority NORMAL:-VERS-TLS1.3 :hostname raw.github.com :loglevel 0 :min-prime-bits 256 :trustfiles (/etc/ssl/certs/ca-certificates.crt) :crlfiles nil :keylist nil :verify-flags nil :verify-error nil :callbacks nil)
gnutls-negotiate: GnuTLS error: #<process raw.github.com>, -50

Edit: dash-docs-install-user-docsets works fine.

elheremes commented 5 years ago

Anyone?

areina commented 5 years ago

@elheremes unfortunately, this seems like an emacs bug more than an issue in our side. However, there could be a possible workaround: https://github.com/magit/ghub/issues/89 https://github.com/magit/ghub/pulls/90

Do you think you could try to adapt it to this project? Otherwise, @kidd or myself could do it, but it will take some time.

Cheers!

dfeich commented 4 years ago

I found that the current versions of helm-dash (using helm-dash-20190527.1118 from MELPA) by default have activated the workaround that is described in the magit link above. The setting can be turned on/off by the dash-docs-use-workaround-for-emacs-bug which is set to force by default. The code turns the workaround on for all Emacs versions < 27. This seemingly is too broad a condition.

I am running Emacs Version 26.2 and libgnutsl version: 30518 and I get gnutls err=[-50] when the workaround is active, i.e. if gnutls-algorithm-priority is set to "NORMAL:-VERS-TLS1.3". Reading the source code, I found the dash-docs-use-workaround-for-emacs-bug variable, and setting it to nil resulted in successful connections.

It would be helpful to mention this variable in the FAQ of the README.

Thanks for this very useful package!