stimulusreflex / stimulus_reflex

Build reactive applications with the Rails tooling you already know and love.
https://docs.stimulusreflex.com
MIT License
2.28k stars 172 forks source link

Page morphs fail to refresh (blank operations hash) in Safari/Edge on staging #453

Closed existentialmutt closed 3 years ago

existentialmutt commented 3 years ago

Describe the bug

When my app is running on staging and production, and browsing with Safari (13.0.5) or Edge (88), page morphs fail to update the page. Looking at the websocket messages, I see the reflex coming back from the server with a blank cableready operations hash. This doesn't happen in other browsers, with selector morphs in Safari and Edge on staging, or in any browser running the site locally in development mode.

I've tried creating an MVCE with stimulus_reflex_harness and can't reproduce it there, so I guess it's something in my app that's screwing things up. Any ideas on what could cause the operations hash to go blank, or suggestions on how I could approach debugging?

Screenshots or reproduction

Web_Inspector_—_staging_cumulusrisk_com_—_facility_profile

Versions

StimulusReflex

External tools

Browser

Safari 13.0.5 Edge 88

existentialmutt commented 3 years ago

As soon as I asked I figured it out. We have HTTP_BASIC authentication on the staging site and those browsers weren't sending credentials. Fixed it by disabling the authenticate_or_request_with_http_basic before filter if @stimulus_reflex is true.

leastbad commented 3 years ago

I'll add this to the troubleshooting page! Sorry that you were having troubles.