Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installing Trestle interferes with Turbo frame #518

Closed
yangtheman opened this issue Oct 31, 2024 · 4 comments
Closed

Installing Trestle interferes with Turbo frame #518

yangtheman opened this issue Oct 31, 2024 · 4 comments

Comments

@yangtheman
Copy link

yangtheman commented Oct 31, 2024

Hi there,

I noticed that on Rails 8.0.0.rc2, installing Trestle (0.10.1) somehow removes or blocks /cable route. Normally you would see something like this for a page that has turbo frame:

Started GET "/cable" for ::1 at 2024-10-31 14:34:29 -0700
Started GET "/cable" [WebSocket] for ::1 at 2024-10-31 14:34:29 -0700
Successfully upgraded to WebSocket (REQUEST_METHOD: GET, HTTP_CONNECTION: Upgrade, HTTP_UPGRADE: websocket)
Turbo::StreamsChannel is transmitting the subscription confirmation
Turbo::StreamsChannel is streaming from conversation

But with Trestle, you see the following and none of the turbo works.

ActionController::RoutingError (No route matches [GET] "/cable"):
  
Started GET "/cable" for ::1 at 2024-10-31 14:48:27 -0700

This is with nothing else changed except install Trestle and before running bin/rails generate trestle:install .

This is only thing that's preventing us from going forward and using Trestle. Any help would be much appreciated.

@spohlenz
Copy link
Member

spohlenz commented Nov 1, 2024

I have been able to reproduce this on Rails 8.0.0.rc2, though the issue doesn't appear to be present in Rails 7.2. I've narrowed it down to the call to Rails.application.reload_routes! within the Trestle reloader, and I believe is related to test failures I'm seeing with trestle-auth on Rails 8.0.

I will keep investigating further.

@spohlenz
Copy link
Member

spohlenz commented Nov 4, 2024

It looks like there is now a PR in place for rails code (rails/rails#53522) to fix this. I've tested the branch and it appears to fix this issue as well as the trestle-auth test failures with Rails 8.0.

I'll keep this issue open until it is fully merged in upstream but hopefully that will be the solution here.

@spohlenz
Copy link
Member

spohlenz commented Nov 5, 2024

Closing as the fix has now been merged into the Rails 8-0-stable branch.

@spohlenz spohlenz closed this as completed Nov 5, 2024
@yangtheman
Copy link
Author

@spohlenz Hey, I just want to thank you for being on top of the issue! I really appreciate it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants