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

500 error, possibly related to web sockets with Ferrum #232

Open
andrewkatz opened this issue Apr 20, 2023 · 0 comments
Open

500 error, possibly related to web sockets with Ferrum #232

andrewkatz opened this issue Apr 20, 2023 · 0 comments

Comments

@andrewkatz
Copy link

I'm seeing an error that pops up sometimes. Not a consistent issue, but enough to fail our builds every few days.

Failed to load resource: the server responded with a status of 500 (Internal Server Error)
#<Thread:0x00007fb8b0052858 /home/runner/work/platform/platform/vendor/bundle/ruby/3.1.0/gems/ferrum-0.13/lib/ferrum/browser/web_socket.rb:30 run> terminated with exception (report_on_exception is true):
/home/runner/work/platform/platform/spec/support/capybara.rb:19:in `puts': undefined method `[]' for nil:NilClass (NoMethodError)

      Kernel.puts "#{log_body['params']['entry']['url']} - #{log_body['params']['entry']['text']}"
                                                ^^^^^^^
	from /home/runner/work/platform/platform/vendor/bundle/ruby/3.1.0/gems/ferrum-0.13/lib/ferrum/browser/web_socket.rb:64:in `on_message'
	from /home/runner/work/platform/platform/vendor/bundle/ruby/3.1.0/gems/websocket-driver-0.7.5/lib/websocket/driver/event_emitter.rb:39:in `block in emit'
	from /home/runner/work/platform/platform/vendor/bundle/ruby/3.1.0/gems/websocket-driver-0.7.5/lib/websocket/driver/event_emitter.rb:38:in `each'
	from /home/runner/work/platform/platform/vendor/bundle/ruby/3.1.0/gems/websocket-driver-0.7.5/lib/websocket/driver/event_emitter.rb:38:in `emit'
	from /home/runner/work/platform/platform/vendor/bundle/ruby/3.1.0/gems/websocket-driver-0.7.5/lib/websocket/driver/hybi.rb:408:in `emit_message'
	from /home/runner/work/platform/platform/vendor/bundle/ruby/3.1.0/gems/websocket-driver-0.7.5/lib/websocket/driver/hybi.rb:390:in `emit_frame'
	from /home/runner/work/platform/platform/vendor/bundle/ruby/3.1.0/gems/websocket-driver-0.7.5/lib/websocket/driver/hybi.rb:118:in `parse'
	from /home/runner/work/platform/platform/vendor/bundle/ruby/3.1.0/gems/websocket-driver-0.7.5/lib/websocket/driver/client.rb:63:in `parse'
	from /home/runner/work/platform/platform/vendor/bundle/ruby/3.1.0/gems/ferrum-0.13/lib/ferrum/browser/web_socket.rb:39:in `block (2 levels) in initialize'
	from /home/runner/work/platform/platform/vendor/bundle/ruby/3.1.0/gems/ferrum-0.13/lib/ferrum/browser/web_socket.rb:35:in `loop'
	from /home/runner/work/platform/platform/vendor/bundle/ruby/3.1.0/gems/ferrum-0.13/lib/ferrum/browser/web_socket.rb:35:in `block in initialize'

After that error, the next request attempt times out and we'll see:

No route matches [GET] "/features"
Ferrum::TimeoutError

I figured I would start here as the actual exception is occurring in Capybara, but happy to move this to the Ferrum repo if that's a more appropriate place.

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

1 participant