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

Not working with Ruby 3.3.0, because "em-http-request" require dead "cookiejar" #341

Open
le0pard opened this issue Dec 27, 2023 · 4 comments

Comments

@le0pard
Copy link
Contributor

le0pard commented Dec 27, 2023

Hello. Thanks for gem.

Looks like due to dead cookiejar gem, puffing-billy cannot be used in env, where Ruby 3.3.0

/Users/leo/.asdf/installs/ruby/3.3.0/lib/ruby/gems/3.3.0/gems/cookiejar-0.3.3/lib/cookiejar/cookie_validation.rb:48:in `initialize': wrong number of arguments (given 3, expected 1..2) (ArgumentError)

    PARAM2 = Regexp.new "(#{PATTERN::TOKEN})(?:=(#{PATTERN::VALUE2}))?(?:\\Z|;)", '', 'n'
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
	from /Users/leo/.asdf/installs/ruby/3.3.0/lib/ruby/gems/3.3.0/gems/cookiejar-0.3.3/lib/cookiejar/cookie_validation.rb:48:in `new'
	from /Users/leo/.asdf/installs/ruby/3.3.0/lib/ruby/gems/3.3.0/gems/cookiejar-0.3.3/lib/cookiejar/cookie_validation.rb:48:in `<module:CookieValidation>'
	from /Users/leo/.asdf/installs/ruby/3.3.0/lib/ruby/gems/3.3.0/gems/cookiejar-0.3.3/lib/cookiejar/cookie_validation.rb:25:in `<module:CookieJar>'
	from /Users/leo/.asdf/installs/ruby/3.3.0/lib/ruby/gems/3.3.0/gems/cookiejar-0.3.3/lib/cookiejar/cookie_validation.rb:5:in `<main>'
	from /Users/leo/.asdf/installs/ruby/3.3.0/lib/ruby/3.3.0/bundled_gems.rb:74:in `require'
	from /Users/leo/.asdf/installs/ruby/3.3.0/lib/ruby/3.3.0/bundled_gems.rb:74:in `block (2 levels) in replace_require'
	from /Users/leo/.asdf/installs/ruby/3.3.0/lib/ruby/gems/3.3.0/gems/bootsnap-1.17.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in `require'
	from /Users/leo/.asdf/installs/ruby/3.3.0/lib/ruby/gems/3.3.0/gems/zeitwerk-2.6.12/lib/zeitwerk/kernel.rb:38:in `require'
	from /Users/leo/.asdf/installs/ruby/3.3.0/lib/ruby/gems/3.3.0/gems/cookiejar-0.3.3/lib/cookiejar/cookie.rb:3:in `<main>'
	from /Users/leo/.asdf/installs/ruby/3.3.0/lib/ruby/3.3.0/bundled_gems.rb:74:in `require'
	from /Users/leo/.asdf/installs/ruby/3.3.0/lib/ruby/3.3.0/bundled_gems.rb:74:in `block (2 levels) in replace_require'
	from /Users/leo/.asdf/installs/ruby/3.3.0/lib/ruby/gems/3.3.0/gems/bootsnap-1.17.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in `require'
	from /Users/leo/.asdf/installs/ruby/3.3.0/lib/ruby/gems/3.3.0/gems/zeitwerk-2.6.12/lib/zeitwerk/kernel.rb:38:in `require'
	from /Users/leo/.asdf/installs/ruby/3.3.0/lib/ruby/gems/3.3.0/gems/cookiejar-0.3.3/lib/cookiejar.rb:1:in `<main>'
	from /Users/leo/.asdf/installs/ruby/3.3.0/lib/ruby/3.3.0/bundled_gems.rb:74:in `require'
	from /Users/leo/.asdf/installs/ruby/3.3.0/lib/ruby/3.3.0/bundled_gems.rb:74:in `block (2 levels) in replace_require'
	from /Users/leo/.asdf/installs/ruby/3.3.0/lib/ruby/gems/3.3.0/gems/bootsnap-1.17.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in `require'
	from /Users/leo/.asdf/installs/ruby/3.3.0/lib/ruby/gems/3.3.0/gems/zeitwerk-2.6.12/lib/zeitwerk/kernel.rb:38:in `require'
	from /Users/leo/.asdf/installs/ruby/3.3.0/lib/ruby/gems/3.3.0/gems/em-http-request-1.1.7/lib/em-http/client.rb:1:in `<main>'
	from /Users/leo/.asdf/installs/ruby/3.3.0/lib/ruby/3.3.0/bundled_gems.rb:74:in `require'
	from /Users/leo/.asdf/installs/ruby/3.3.0/lib/ruby/3.3.0/bundled_gems.rb:74:in `block (2 levels) in replace_require'
	from /Users/leo/.asdf/installs/ruby/3.3.0/lib/ruby/gems/3.3.0/gems/bootsnap-1.17.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in `require'
	from /Users/leo/.asdf/installs/ruby/3.3.0/lib/ruby/gems/3.3.0/gems/zeitwerk-2.6.12/lib/zeitwerk/kernel.rb:38:in `require'
	from /Users/leo/.asdf/installs/ruby/3.3.0/lib/ruby/gems/3.3.0/gems/em-http-request-1.1.7/lib/em-http.rb:17:in `<main>'
	from /Users/leo/.asdf/installs/ruby/3.3.0/lib/ruby/3.3.0/bundled_gems.rb:74:in `require'
	from /Users/leo/.asdf/installs/ruby/3.3.0/lib/ruby/3.3.0/bundled_gems.rb:74:in `block (2 levels) in replace_require'
	from /Users/leo/.asdf/installs/ruby/3.3.0/lib/ruby/gems/3.3.0/gems/bootsnap-1.17.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in `require'
	from /Users/leo/.asdf/installs/ruby/3.3.0/lib/ruby/gems/3.3.0/gems/zeitwerk-2.6.12/lib/zeitwerk/kernel.rb:38:in `require'
	from /Users/leo/.asdf/installs/ruby/3.3.0/lib/ruby/gems/3.3.0/gems/em-http-request-1.1.7/lib/em-http-request.rb:1:in `<main>'
	from /Users/leo/.asdf/installs/ruby/3.3.0/lib/ruby/3.3.0/bundled_gems.rb:74:in `require'
	from /Users/leo/.asdf/installs/ruby/3.3.0/lib/ruby/3.3.0/bundled_gems.rb:74:in `block (2 levels) in replace_require'
	from /Users/leo/.asdf/installs/ruby/3.3.0/lib/ruby/gems/3.3.0/gems/bootsnap-1.17.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in `require'
	from /Users/leo/.asdf/installs/ruby/3.3.0/lib/ruby/gems/3.3.0/gems/zeitwerk-2.6.12/lib/zeitwerk/kernel.rb:38:in `require'
	from /Users/leo/.asdf/installs/ruby/3.3.0/lib/ruby/gems/3.3.0/gems/em-synchrony-1.0.6/lib/em-synchrony/em-http.rb:2:in `<main>'
	from /Users/leo/.asdf/installs/ruby/3.3.0/lib/ruby/3.3.0/bundled_gems.rb:74:in `require'
	from /Users/leo/.asdf/installs/ruby/3.3.0/lib/ruby/3.3.0/bundled_gems.rb:74:in `block (2 levels) in replace_require'
	from /Users/leo/.asdf/installs/ruby/3.3.0/lib/ruby/gems/3.3.0/gems/bootsnap-1.17.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in `require'
	from /Users/leo/.asdf/installs/ruby/3.3.0/lib/ruby/gems/3.3.0/gems/zeitwerk-2.6.12/lib/zeitwerk/kernel.rb:38:in `require'
	from /Users/leo/.asdf/installs/ruby/3.3.0/lib/ruby/gems/3.3.0/gems/puffing-billy-4.0.0/lib/billy/handlers/proxy_handler.rb:4:in `<main>'
	from /Users/leo/.asdf/installs/ruby/3.3.0/lib/ruby/3.3.0/bundled_gems.rb:74:in `require'
	from /Users/leo/.asdf/installs/ruby/3.3.0/lib/ruby/3.3.0/bundled_gems.rb:74:in `block (2 levels) in replace_require'
	from /Users/leo/.asdf/installs/ruby/3.3.0/lib/ruby/gems/3.3.0/gems/bootsnap-1.17.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in `require'
	from /Users/leo/.asdf/installs/ruby/3.3.0/lib/ruby/gems/3.3.0/gems/zeitwerk-2.6.12/lib/zeitwerk/kernel.rb:38:in `require'
	from /Users/leo/.asdf/installs/ruby/3.3.0/lib/ruby/gems/3.3.0/gems/puffing-billy-4.0.0/lib/billy.rb:7:in `<main>'
	from /Users/leo/.asdf/installs/ruby/3.3.0/lib/ruby/3.3.0/bundled_gems.rb:74:in `require'
	from /Users/leo/.asdf/installs/ruby/3.3.0/lib/ruby/3.3.0/bundled_gems.rb:74:in `block (2 levels) in replace_require'
	from /Users/leo/.asdf/installs/ruby/3.3.0/lib/ruby/gems/3.3.0/gems/bootsnap-1.17.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in `require'
	from /Users/leo/.asdf/installs/ruby/3.3.0/lib/ruby/gems/3.3.0/gems/zeitwerk-2.6.12/lib/zeitwerk/kernel.rb:38:in `require'
	from /Users/leo/.asdf/installs/ruby/3.3.0/lib/ruby/gems/3.3.0/gems/puffing-billy-4.0.0/lib/puffing-billy.rb:1:in `<main>'
	from /Users/leo/.asdf/installs/ruby/3.3.0/lib/ruby/3.3.0/bundled_gems.rb:74:in `require'
	from /Users/leo/.asdf/installs/ruby/3.3.0/lib/ruby/3.3.0/bundled_gems.rb:74:in `block (2 levels) in replace_require'
	from /Users/leo/.asdf/installs/ruby/3.3.0/lib/ruby/gems/3.3.0/gems/bootsnap-1.17.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in `require'
	from /Users/leo/.asdf/installs/ruby/3.3.0/lib/ruby/gems/3.3.0/gems/zeitwerk-2.6.12/lib/zeitwerk/kernel.rb:38:in `require'
	from /Users/leo/.asdf/installs/ruby/3.3.0/lib/ruby/3.3.0/bundler/runtime.rb:60:in `block (2 levels) in require'
	from /Users/leo/.asdf/installs/ruby/3.3.0/lib/ruby/3.3.0/bundler/runtime.rb:55:in `each'
	from /Users/leo/.asdf/installs/ruby/3.3.0/lib/ruby/3.3.0/bundler/runtime.rb:55:in `block in require'
	from /Users/leo/.asdf/installs/ruby/3.3.0/lib/ruby/3.3.0/bundler/runtime.rb:44:in `each'
	from /Users/leo/.asdf/installs/ruby/3.3.0/lib/ruby/3.3.0/bundler/runtime.rb:44:in `require'
	from /Users/leo/.asdf/installs/ruby/3.3.0/lib/ruby/3.3.0/bundler.rb:187:in `require'
	from /Users/leo/programs/projects/coupler/coupler-io-web/config/application.rb:22:in `<main>'
	from /Users/leo/.asdf/installs/ruby/3.3.0/lib/ruby/3.3.0/bundled_gems.rb:74:in `require'
	from /Users/leo/.asdf/installs/ruby/3.3.0/lib/ruby/3.3.0/bundled_gems.rb:74:in `block (2 levels) in replace_require'
	from /Users/leo/.asdf/installs/ruby/3.3.0/lib/ruby/gems/3.3.0/gems/bootsnap-1.17.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in `require'
	from /Users/leo/.asdf/installs/ruby/3.3.0/lib/ruby/gems/3.3.0/gems/railties-7.1.2/lib/rails/commands/server/server_command.rb:139:in `block in perform'
	from <internal:kernel>:90:in `tap'
	from /Users/leo/.asdf/installs/ruby/3.3.0/lib/ruby/gems/3.3.0/gems/railties-7.1.2/lib/rails/commands/server/server_command.rb:136:in `perform'
	from /Users/leo/.asdf/installs/ruby/3.3.0/lib/ruby/gems/3.3.0/gems/thor-1.3.0/lib/thor/command.rb:28:in `run'
	from /Users/leo/.asdf/installs/ruby/3.3.0/lib/ruby/gems/3.3.0/gems/thor-1.3.0/lib/thor/invocation.rb:127:in `invoke_command'
	from /Users/leo/.asdf/installs/ruby/3.3.0/lib/ruby/gems/3.3.0/gems/railties-7.1.2/lib/rails/command/base.rb:178:in `invoke_command'
	from /Users/leo/.asdf/installs/ruby/3.3.0/lib/ruby/gems/3.3.0/gems/thor-1.3.0/lib/thor.rb:527:in `dispatch'
	from /Users/leo/.asdf/installs/ruby/3.3.0/lib/ruby/gems/3.3.0/gems/railties-7.1.2/lib/rails/command/base.rb:73:in `perform'
	from /Users/leo/.asdf/installs/ruby/3.3.0/lib/ruby/gems/3.3.0/gems/railties-7.1.2/lib/rails/command.rb:71:in `block in invoke'
	from /Users/leo/.asdf/installs/ruby/3.3.0/lib/ruby/gems/3.3.0/gems/railties-7.1.2/lib/rails/command.rb:149:in `with_argv'
	from /Users/leo/.asdf/installs/ruby/3.3.0/lib/ruby/gems/3.3.0/gems/railties-7.1.2/lib/rails/command.rb:69:in `invoke'
	from /Users/leo/.asdf/installs/ruby/3.3.0/lib/ruby/gems/3.3.0/gems/railties-7.1.2/lib/rails/commands.rb:18:in `<main>'
	from /Users/leo/.asdf/installs/ruby/3.3.0/lib/ruby/3.3.0/bundled_gems.rb:74:in `require'
	from /Users/leo/.asdf/installs/ruby/3.3.0/lib/ruby/3.3.0/bundled_gems.rb:74:in `block (2 levels) in replace_require'
	from /Users/leo/.asdf/installs/ruby/3.3.0/lib/ruby/gems/3.3.0/gems/bootsnap-1.17.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in `require'
	from bin/rails:6:in `<main>'
@GeoffTidey
Copy link

Looks like a potential fix is to use a fork of cookiejar in em-http-request - igrigorik/em-http-request#354

@ronwsmith
Copy link
Collaborator

Looks like another puffing-billy user has proposed a fix: igrigorik/em-http-request#358

@slavingia
Copy link

Would be great to get an update on this.

@dentarg
Copy link

dentarg commented May 13, 2024

Looks like the cookiejar gem was updated eventually igrigorik/em-http-request#358 (comment)

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

5 participants