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

NoMethodError: undefined method `on_kwrest_param' #5209

Closed
boris-petrov opened this issue Jun 6, 2018 · 7 comments
Closed

NoMethodError: undefined method `on_kwrest_param' #5209

boris-petrov opened this issue Jun 6, 2018 · 7 comments
Milestone

Comments

@boris-petrov
Copy link

JRuby version 9.2.0.0. Using Capybara 3.2.1 and rspec 3.7.0. The following code:

require_relative './spec_helper'

RSpec.feature 'basic HTTP authentication', driver: :rack_test do
  scenario 'can be accessed with basic HTTP authentication' do
  end
end

Blows up with the following:

NoMethodError: undefined method `on_kwrest_param' for #<Ripper::SexpBuilderPP:0x6935b72f>
                                       parse at org/jruby/ext/ripper/RubyRipper.java:343
                                        sexp at uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/ripper/sexp.rb:33
                                         ast at /home/boris/project/build/tmp/jrubyExec/gems/rspec-support-3.7.1/lib/rspec/support/source.rb:45
                        nodes_by_line_number at /home/boris/project/build/tmp/jrubyExec/gems/rspec-support-3.7.1/lib/rspec/support/source.rb:61
            location_nodes_at_beginning_line at /home/boris/project/build/tmp/jrubyExec/gems/rspec-core-3.7.1/lib/rspec/core/formatters/snippet_extractor.rb:118
                             expression_node at /home/boris/project/build/tmp/jrubyExec/gems/rspec-core-3.7.1/lib/rspec/core/formatters/snippet_extractor.rb:96
  line_range_of_location_nodes_in_expression at /home/boris/project/build/tmp/jrubyExec/gems/rspec-core-3.7.1/lib/rspec/core/formatters/snippet_extractor.rb:88
                    line_range_of_expression at /home/boris/project/build/tmp/jrubyExec/gems/rspec-core-3.7.1/lib/rspec/core/formatters/snippet_extractor.rb:57
                            expression_lines at /home/boris/project/build/tmp/jrubyExec/gems/rspec-core-3.7.1/lib/rspec/core/formatters/snippet_extractor.rb:42
                 extract_expression_lines_at at /home/boris/project/build/tmp/jrubyExec/gems/rspec-core-3.7.1/lib/rspec/core/formatters/snippet_extractor.rb:31
                           read_failed_lines at /home/boris/project/build/tmp/jrubyExec/gems/rspec-core-3.7.1/lib/rspec/core/formatters/exception_presenter.rb:218
                   failure_slash_error_lines at /home/boris/project/build/tmp/jrubyExec/gems/rspec-core-3.7.1/lib/rspec/core/formatters/exception_presenter.rb:163
                      block in failure_lines at /home/boris/project/build/tmp/jrubyExec/gems/rspec-core-3.7.1/lib/rspec/core/formatters/exception_presenter.rb:150
                                         tap at org/jruby/RubyKernel.java:1876
                               failure_lines at /home/boris/project/build/tmp/jrubyExec/gems/rspec-core-3.7.1/lib/rspec/core/formatters/exception_presenter.rb:149
                     colorized_message_lines at /home/boris/project/build/tmp/jrubyExec/gems/rspec-core-3.7.1/lib/rspec/core/formatters/exception_presenter.rb:34
             formatted_message_and_backtrace at /home/boris/project/build/tmp/jrubyExec/gems/rspec-core-3.7.1/lib/rspec/core/formatters/exception_presenter.rb:240
                       fully_formatted_lines at /home/boris/project/build/tmp/jrubyExec/gems/rspec-core-3.7.1/lib/rspec/core/formatters/exception_presenter.rb:86
         block in sub_failure_list_formatter at /home/boris/project/build/tmp/jrubyExec/gems/rspec-core-3.7.1/lib/rspec/core/formatters/exception_presenter.rb:350
                                        each at org/jruby/RubyArray.java:1801
                             each_with_index at org/jruby/RubyEnumerable.java:1180
                                        each at org/jruby/RubyEnumerator.java:326
                                    flat_map at org/jruby/RubyEnumerable.java:881
                                    flat_map at /home/boris/project/build/tmp/jrubyExec/gems/rspec-core-3.7.1/lib/rspec/core/flat_map.rb:7
         block in sub_failure_list_formatter at /home/boris/project/build/tmp/jrubyExec/gems/rspec-core-3.7.1/lib/rspec/core/formatters/exception_presenter.rb:339
                       fully_formatted_lines at /home/boris/project/build/tmp/jrubyExec/gems/rspec-core-3.7.1/lib/rspec/core/formatters/exception_presenter.rb:87
                             fully_formatted at /home/boris/project/build/tmp/jrubyExec/gems/rspec-core-3.7.1/lib/rspec/core/formatters/exception_presenter.rb:78
                             fully_formatted at /home/boris/project/build/tmp/jrubyExec/gems/rspec-core-3.7.1/lib/rspec/core/notifications.rb:200
    block in fully_formatted_failed_examples at /home/boris/project/build/tmp/jrubyExec/gems/rspec-core-3.7.1/lib/rspec/core/notifications.rb:114
                                        each at org/jruby/RubyArray.java:1801
                             each_with_index at org/jruby/RubyEnumerable.java:1180
             fully_formatted_failed_examples at /home/boris/project/build/tmp/jrubyExec/gems/rspec-core-3.7.1/lib/rspec/core/notifications.rb:113
                               dump_failures at /home/boris/project/build/tmp/jrubyExec/gems/rspec-core-3.7.1/lib/rspec/core/formatters/base_text_formatter.rb:32
                             block in notify at /home/boris/project/build/tmp/jrubyExec/gems/rspec-core-3.7.1/lib/rspec/core/reporter.rb:206
                                        each at org/jruby/RubyArray.java:1801
                                      notify at /home/boris/project/build/tmp/jrubyExec/gems/rspec-core-3.7.1/lib/rspec/core/reporter.rb:205
                             block in finish at /home/boris/project/build/tmp/jrubyExec/gems/rspec-core-3.7.1/lib/rspec/core/reporter.rb:175
                                 close_after at /home/boris/project/build/tmp/jrubyExec/gems/rspec-core-3.7.1/lib/rspec/core/reporter.rb:191
                                      finish at /home/boris/project/build/tmp/jrubyExec/gems/rspec-core-3.7.1/lib/rspec/core/reporter.rb:171
                                      report at /home/boris/project/build/tmp/jrubyExec/gems/rspec-core-3.7.1/lib/rspec/core/reporter.rb:81
                                   run_specs at /home/boris/project/build/tmp/jrubyExec/gems/rspec-core-3.7.1/lib/rspec/core/runner.rb:112
                                         run at /home/boris/project/build/tmp/jrubyExec/gems/rspec-core-3.7.1/lib/rspec/core/runner.rb:87
                                         run at /home/boris/project/build/tmp/jrubyExec/gems/rspec-core-3.7.1/lib/rspec/core/runner.rb:71
                                      invoke at /home/boris/project/build/tmp/jrubyExec/gems/rspec-core-3.7.1/lib/rspec/core/runner.rb:45
                                      <main> at /home/boris/project/build/tmp/jrubyExec/gems/rspec-core-3.7.1/exe/rspec:4
                                        load at org/jruby/RubyKernel.java:994
                                      <main> at /home/boris/project/build/tmp/jrubyExec/bin/rspec:23

If I remove the , driver: :rack_test argument, it works fine.

I'm not sure whether I'm doing something wrong, whether this is a bug in JRuby or anything at all, just thought to report here. :) Please tell me if you need more information.

@twalpole
Copy link
Contributor

twalpole commented Jun 8, 2018

I think this is because there is no entry for kwrest_param in the parser event table - https://github.com/jruby/jruby/blob/master/core/src/main/java/org/jruby/ext/ripper/RubyRipper.java#L132 - although I'm not familiar enough with the code to say 100% for sure

@headius
Copy link
Member

headius commented Jun 11, 2018

@twalpole That seems like a good theory. Likely another quick one for @enebo.

@headius headius added this to the JRuby 9.2.1.0 milestone Jun 11, 2018
@enebo enebo closed this as completed in 8903315 Jun 11, 2018
@enebo
Copy link
Member

enebo commented Jun 11, 2018

@twalpole yep. You were right that we were missing that entry in parser event table.

@twalpole
Copy link
Contributor

twalpole commented Jun 11, 2018

@enebo Great - any chance of there being a 9.2.0.x fix release with this in? or does it really need to wait for the 9.2.1.0 release as the milestone would tend to indicate (unless 9.2.1.0 is imminent in which case it doesn't matter)

@enebo
Copy link
Member

enebo commented Jun 11, 2018

@twalpole we should get a 9.2.1.0 probably beginning of next week to do a fast turn around point release. Some travel also interfered with us getting more fixed but we want to address all recently reported issues to keep the momentum up.

@twalpole
Copy link
Contributor

@enebo Sounds good, thanks for the info.

@ketan
Copy link
Member

ketan commented Jul 16, 2018

Is there a timeline for when this release will be available?

ketan added a commit to ketan/gocd that referenced this issue Jul 17, 2018
ketan added a commit to ketan/gocd that referenced this issue Jul 26, 2018
ketan added a commit to ketan/gocd that referenced this issue Jul 26, 2018
ketan added a commit to ketan/gocd that referenced this issue Jul 26, 2018
ketan added a commit to ketan/gocd that referenced this issue Jul 26, 2018
ketan added a commit to ketan/gocd that referenced this issue Jul 26, 2018
BrianHawley added a commit to BrianHawley/airbrake that referenced this issue Jan 23, 2020
RSpec's output formatter breaks on jruby-9.2.0.0 because of a bug in
that jruby version (jruby/jruby#5209). This causes failures reporting
test failures in test assertions which are formatted in certain ways.
This prevents you from finding out what the test failure actually was.

To avoid that kind of problem debugging test failures, bump up the
tested jruby version to 9.2.1.0, which included a fix for that bug.
BrianHawley added a commit to BrianHawley/airbrake that referenced this issue Jan 23, 2020
RSpec's output formatter breaks on jruby-9.2.0.0 because of a bug in
that jruby version (jruby/jruby#5209). This causes failures reporting
test failures in test assertions which are formatted in certain ways.
This prevents you from finding out what the test failure actually was.

To avoid that kind of problem debugging test failures, bump up the
tested JRuby version. JRuby 9.2.1.0 included a fix for that bug, but
isn't supported by circleci, so using 9.2.2.0.
BrianHawley added a commit to BrianHawley/airbrake that referenced this issue Jan 24, 2020
RSpec's output formatter breaks on jruby-9.2.0.0 because of a bug in
that jruby version (jruby/jruby#5209). This causes failures reporting
test failures in test assertions which are formatted in certain ways.
This prevents you from finding out what the test failure actually was.

To avoid that kind of problem debugging test failures, bump up the
tested JRuby version. JRuby 9.2.1.0 included a fix for that bug, but
isn't supported by circleci, so using 9.2.2.0.
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