ActionCable instrumentation breaks all `/cable` connections on Rails 8.2 / main (private handle_open called publicly by Server::Socket)
I maintainer di solito rispondono entro 2 giorni
@solnic ci sta già lavorando.
Dal 16/6/2026.
Valutazione
Questa issue non è ancora stata valutata.
Descrizione
Issue Description
sentry-rails instruments ActionCable by prepending Sentry::Rails::ActionCableExtensions::Connection onto the connection, and that module declares #handle_open / #handle_close as private (sentry-rails/lib/sentry/rails/action_cable.rb):
module Connection
private
def handle_open
ErrorHandler.capture(self, transaction_name: "#{self.class.name}#connect") { super }
end
def handle_close
ErrorHandler.capture(self, transaction_name: "#{self.class.name}#disconnect") { super }
end
end
Rails 8.2 / main decoupled the cable socket from the connection (rails/rails#50979, merged 2026-05-28). ActionCable::Server::Socket now calls the connection back with an explicit receiver, which requires the method to be public:
def handle_open
@protocol = websocket.protocol
@connection.handle_open # explicit receiver -> must be public
message_buffer.process!
server.add_connection(@connection)
end
Because the prepended module sits ahead of ActionCable::Connection::Base in the ancestor chain and marks the method private, every /cable upgrade raises NoMethodError. The WebSocket upgrade returns 101, but handle_open raises before welcome is sent, so clients never receive welcome/pings and reconnect-loop forever — no broadcasts (Turbo Streams, presence) are ever delivered. The exception only reaches the Rails logger, not Sentry, since it happens inside the instrumentation wrapper. In Rails' own Connection::Base, both methods are public; the prepended private versions invert the intended visibility.
Reproduction Steps
- Rails app tracking
rails/railsmain(any revision including theActionCable::Server::Socketextraction; reproduced on 8.2.0.alpha). - Add
sentry-railsand configureSentry.init. - Open a WebSocket to
/cable(e.g. a Turbo Stream subscription). - The upgrade raises immediately:
NoMethodError: private method 'handle_open' called for an instance of ApplicationCable::Connection
actioncable/lib/action_cable/server/socket.rb:127:in 'handle_open'
Expected Behavior
/cable WebSocket connections open normally with Sentry instrumentation active.
Actual Behavior
Every /cable upgrade raises NoMethodError (private method 'handle_open' called ...); the client never receives welcome and reconnect-loops; no broadcasts are delivered.
Ruby Version
4.0.1
SDK Version
sentry-rails 6.6.1 (also reproduces on the latest release 6.6.2 and current master — both still mark these private)
Integration and Its Version
Rails 8.2.0.alpha (rails/rails main, rev 324b65c2dffe17ee03522b39b516f482087f244f) — ActionCable
Sentry Config
Standard Sentry.init; no special config needed to trigger.
Workaround (until a fix ships)
Re-publicize the two methods in an initializer:
Sentry::Rails::ActionCableExtensions::Connection.send(:public, :handle_open, :handle_close)
- Lingua principale
- Ruby
- Stelle
- 990
- Fork
- 552
- Merge medio
- 2g 16h
- PR unite (30g)
- 29
Preparare l'ambiente
Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di getsentry/sentry-ruby
-
Bug Ruby
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
getsentry/sentry-ruby#3211 · 1 commento ·
I maintainer di solito rispondono entro 2 giorni
-
Events dropped client-side for size are only logged at debug level and not recorded as lostForse già presa @sentry-junior l’ha presa oggi. ApertaBug Junior: repro Ruby
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
getsentry/sentry-ruby#3209 · 2 commenti · 1 reazione ·
I maintainer di solito rispondono entro 2 giorni
-
with_child_span drops spans when blocks exit via break, return, or throwForse già presa @itsrayeedscodespace l’ha presa 1 giorno fa. ApertaBug Ruby Traces Waiting for: Product Owner
Difficoltà 2/5 1-3 ore Idoneità per principianti 38/100
getsentry/sentry-ruby#3206 · 1 commento ·
I maintainer di solito rispondono entro 2 giorni
-
Let apps choose how the client IP on events is determinedForse già presa @sl0thentr0py l’ha presa 12 giorni fa. ApertaImprovement Ruby
getsentry/sentry-ruby#3180 · 2 commenti · 1 reazione · 1 assegnatario ·
I maintainer di solito rispondono entro 2 giorni
-
breaking change Next Major
Difficoltà 2/5 1-3 ore Idoneità per principianti 58/100
getsentry/sentry-ruby#3176 · 1 commento ·
I maintainer di solito rispondono entro 2 giorni
Tutte le issue di getsentry/sentry-ruby
Issue simili
-
enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
internetee/registry#2984 ·
I maintainer di solito rispondono entro 6 giorni
-
interest-zsv
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
hitobito/hitobito_zsv#6 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
ecosyste-ms/issues#862 ·
I maintainer di solito rispondono entro 1 giorno
-
Redis Lua error `@user_script:52: ERR value is not an integer or out of range` when `window_size` is configuredForse già presa @mimosa l’ha presa oggi. Apertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 67/100
riscv/riscv-unified-db#2829 ·
I maintainer di solito rispondono entro 1 giorno