julienbourdeau / debugbar

Powerful devtools for Ruby on Rails. Inspired by the Laravel Debugbar.
https://debugbar.dev
MIT License
487 stars 8 forks source link

Puma MiniSSL issue #22

Closed wdiechmann closed 8 months ago

wdiechmann commented 9 months ago

I learned of 'debugbar' from Ruby Week by Cooperpress - and absolutely had to spin it up ASAP (not that I have any non-tested, not-working, smells-infested code) 😎

Running on Rails 7.0.8 I hurriedly did all the incantations to Gemfile, development.rb, checked cable.yml, more, yet my console tells me

2024-03-08 08:39:38 +0100 SSL error, peer: 127.0.0.1, peer cert: : #<Puma::MiniSSL::SSLError: HTTP connection?>

and for sure there is no output, except for the initial pageload with 'No request yet'

I suspect this to be the culprit

rails server 
  -u puma 
  -b 'ssl://0.0.0.0:3000?key=config/box.mortimer_3-key.pem&cert=config/box.mortimer_3.pem&verify_mode=peer&ca=config/box.mortimer_3.pem'

-- and one that I don't see how I can loose ('cause to save time I'm running my development as close to production as possible, especially shaving time of cable/turbo/SSL issues once deployed) 😞

wdiechmann commented 9 months ago

Taking a cue from one of the other issues here - I got some instant gratification doing this

<%= debugbar_javascript cable: {url: "wss://localhost:3000"} %>

But once I start navigating the website - ie when initially loading fx /teams (which is OK) and I then GET https://localhost:3000/employees the debugbar 'goes dark so to speak'

I've clipped the log pertaining to this last part log.txt

julienbourdeau commented 8 months ago

Thank you for reporting this @wdiechmann and for figuring it out 🙏 I added a note in the docs about SSL: https://debugbar.dev/docs/configuration/

Please let me know what you think of the debugbar!