jasmine / jasmine-gem

Jasmine ruby gem
681 stars 275 forks source link

After updating jasmine from jasmine 2.4.0 to jasmine 3.3.0 I am getting some error #305

Closed aniketstiwari closed 4 years ago

aniketstiwari commented 5 years ago

After updating jasmine from jasmine 2.4.0 to jasmine 3.3.0 I am getting some error. The bellow error comes after when my all specs run completely. Also, because of the upgradation I am getting more jasmine failures.

2019-02-15 11:36:19 +0530: Rack app error handling request { POST / }
#<RuntimeError: can't add a new key into hash during iteration>
/home/aniketshivamtiwari/.rvm/rubies/ruby-2.5.3/lib/ruby/2.5.0/set.rb:189:in `replace'
/home/aniketshivamtiwari/.rvm/rubies/ruby-2.5.3/lib/ruby/2.5.0/set.rb:189:in `replace'
/home/aniketshivamtiwari/.rvm/rubies/ruby-2.5.3/lib/ruby/2.5.0/set.rb:405:in `collect!'
/home/aniketshivamtiwari/.rvm/gems/ruby-2.5.3@rails5-portal/gems/sprockets-3.7.2/lib/sprockets/loader.rb:85:in `asset_from_cache'
/home/aniketshivamtiwari/.rvm/gems/ruby-2.5.3@rails5-portal/gems/sprockets-3.7.2/lib/sprockets/loader.rb:35:in `load'
/home/aniketshivamtiwari/.rvm/gems/ruby-2.5.3@rails5-portal/gems/sprockets-3.7.2/lib/sprockets/cached_environment.rb:20:in `block in initialize'
/home/aniketshivamtiwari/.rvm/gems/ruby-2.5.3@rails5-portal/gems/sprockets-3.7.2/lib/sprockets/cached_environment.rb:47:in `load'
/home/aniketshivamtiwari/.rvm/gems/ruby-2.5.3@rails5-portal/gems/sprockets-3.7.2/lib/sprockets/legacy.rb:195:in `block in to_a'
/home/aniketshivamtiwari/.rvm/gems/ruby-2.5.3@rails5-portal/gems/sprockets-3.7.2/lib/sprockets/legacy.rb:195:in `map'
/home/aniketshivamtiwari/.rvm/gems/ruby-2.5.3@rails5-portal/gems/sprockets-3.7.2/lib/sprockets/legacy.rb:195:in `to_a'
/home/aniketshivamtiwari/.rvm/gems/ruby-2.5.3@rails5-portal/gems/jasmine-3.3.0/lib/jasmine/asset_expander.rb:39:in `get_javascript_assets'
/home/aniketshivamtiwari/.rvm/gems/ruby-2.5.3@rails5-portal/gems/jasmine-3.3.0/lib/jasmine/asset_expander.rb:25:in `assets'
/home/aniketshivamtiwari/.rvm/gems/ruby-2.5.3@rails5-portal/gems/jasmine-3.3.0/lib/jasmine/asset_expander.rb:6:in `expand'
/home/aniketshivamtiwari/.rvm/gems/ruby-2.5.3@rails5-portal/gems/jasmine-3.3.0/lib/jasmine/asset_pipeline_mapper.rb:11:in `call'
/home/aniketshivamtiwari/.rvm/gems/ruby-2.5.3@rails5-portal/gems/jasmine-3.3.0/lib/jasmine/asset_pipeline_mapper.rb:11:in `block in map_src_paths'
/home/aniketshivamtiwari/.rvm/gems/ruby-2.5.3@rails5-portal/gems/jasmine-3.3.0/lib/jasmine/asset_pipeline_mapper.rb:10:in `map'
/home/aniketshivamtiwari/.rvm/gems/ruby-2.5.3@rails5-portal/gems/jasmine-3.3.0/lib/jasmine/asset_pipeline_mapper.rb:10:in `map_src_paths'
/home/aniketshivamtiwari/.rvm/gems/ruby-2.5.3@rails5-portal/gems/jasmine-3.3.0/lib/jasmine/configuration.rb:108:in `block in map'
/home/aniketshivamtiwari/.rvm/gems/ruby-2.5.3@rails5-portal/gems/jasmine-3.3.0/lib/jasmine/configuration.rb:106:in `each'
/home/aniketshivamtiwari/.rvm/gems/ruby-2.5.3@rails5-portal/gems/jasmine-3.3.0/lib/jasmine/configuration.rb:106:in `inject'
/home/aniketshivamtiwari/.rvm/gems/ruby-2.5.3@rails5-portal/gems/jasmine-3.3.0/lib/jasmine/configuration.rb:106:in `map'
/home/aniketshivamtiwari/.rvm/gems/ruby-2.5.3@rails5-portal/gems/jasmine-3.3.0/lib/jasmine/configuration.rb:59:in `js_files'
(erb):11:in `block in render'
/home/aniketshivamtiwari/.rvm/rubies/ruby-2.5.3/lib/ruby/2.5.0/erb.rb:876:in `eval'
/home/aniketshivamtiwari/.rvm/rubies/ruby-2.5.3/lib/ruby/2.5.0/erb.rb:876:in `result'
/home/aniketshivamtiwari/.rvm/gems/ruby-2.5.3@rails5-portal/gems/jasmine-3.3.0/lib/jasmine/page.rb:8:in `render'
/home/aniketshivamtiwari/.rvm/gems/ruby-2.5.3@rails5-portal/gems/jasmine-3.3.0/lib/rack/jasmine/runner.rb:15:in `call'
/home/aniketshivamtiwari/.rvm/gems/ruby-2.5.3@rails5-portal/gems/rack-2.0.6/lib/rack/cascade.rb:33:in `block in call'
/home/aniketshivamtiwari/.rvm/gems/ruby-2.5.3@rails5-portal/gems/rack-2.0.6/lib/rack/cascade.rb:24:in `each'
/home/aniketshivamtiwari/.rvm/gems/ruby-2.5.3@rails5-portal/gems/rack-2.0.6/lib/rack/cascade.rb:24:in `call'
/home/aniketshivamtiwari/.rvm/gems/ruby-2.5.3@rails5-portal/gems/rack-2.0.6/lib/rack/urlmap.rb:68:in `block in call'
/home/aniketshivamtiwari/.rvm/gems/ruby-2.5.3@rails5-portal/gems/rack-2.0.6/lib/rack/urlmap.rb:53:in `each'
/home/aniketshivamtiwari/.rvm/gems/ruby-2.5.3@rails5-portal/gems/rack-2.0.6/lib/rack/urlmap.rb:53:in `call'
/home/aniketshivamtiwari/.rvm/gems/ruby-2.5.3@rails5-portal/gems/jasmine-3.3.0/lib/rack/jasmine/cache_control.rb:10:in `call'
/home/aniketshivamtiwari/.rvm/gems/ruby-2.5.3@rails5-portal/gems/rack-2.0.6/lib/rack/head.rb:12:in `call'
/home/aniketshivamtiwari/.rvm/gems/ruby-2.5.3@rails5-portal/gems/rack-2.0.6/lib/rack/builder.rb:153:in `call'
/home/aniketshivamtiwari/.rvm/gems/ruby-2.5.3@rails5-portal/gems/puma-3.12.0/lib/puma/configuration.rb:225:in `call'
/home/aniketshivamtiwari/.rvm/gems/ruby-2.5.3@rails5-portal/gems/puma-3.12.0/lib/puma/server.rb:658:in `handle_request'
/home/aniketshivamtiwari/.rvm/gems/ruby-2.5.3@rails5-portal/gems/puma-3.12.0/lib/puma/server.rb:472:in `process_client'
/home/aniketshivamtiwari/.rvm/gems/ruby-2.5.3@rails5-portal/gems/puma-3.12.0/lib/puma/server.rb:332:in `block in run'
/home/aniketshivamtiwari/.rvm/gems/ruby-2.5.3@rails5-portal/gems/puma-3.12.0/lib/puma/thread_pool.rb:133:in `block in spawn_thread'

My configuration

Rails- 5.2.2 ruby - 2.5.3 jasmine (3.3.0) jasmine-core (~> 3.3.0) phantomjs rack (>= 1.2.1) rake jasmine-core (3.3.0) jasmine-jquery-rails (2.0.3)

slackersoft commented 5 years ago

Based on that error and stack trace, it looks like sprockets is finding a duplicate asset when Jasmine is attempting to render your page. The way that Jasmine looks up assets has changed a bit around 3.0 and it's possible that this duplication wasn't a problem in earlier versions.

We are using basically the same code to pull debug assets as sprockets-rails does, so I would expect you to get the same error in rails with debug assets turned on.

Can you check your js assets for duplicates or try your rails app with debug assets and not just sourcemaps and see if you see the issue there as well?

slackersoft commented 4 years ago

We haven't heard anything further on this issue in quite some time, so I'm going to close it. Please update or open a new issue if you have more information or a succinct reproduction.

Thanks for using Jasmine!