Skip to content

Cannot set property 'root' of null #68

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

Closed
alepee opened this issue Feb 25, 2015 · 4 comments
Closed

Cannot set property 'root' of null #68

alepee opened this issue Feb 25, 2015 · 4 comments

Comments

@alepee
Copy link

alepee commented Feb 25, 2015

I run a Rails 4.1.0 app and an error occur randomly on precompile during deploy (with mina) or directly throw by local server, etc... this is not yet on production but it could happen on it as well.

The file compiled when this error occurs is different each time, and the error is thrown randomly without any changes to source code.

ExecJS::ProgramError: TypeError: Cannot set property 'root' of null

This error happened using therubyracer 0.12.1 as JS runtime, I did not test it with another runtime yet

This issue has been referenced here jashkenas/coffeescript#3829
The full stack trace I get from Mina on deploy:

ExecJS::ProgramError: TypeError: Cannot set property 'root' of null
(in /home/deploy/tmp/build-142485688618988/app/assets/javascripts/controllers/selections_ctrl.js.coffee)
/home/deploy/tmp/build-142485688618988/vendor/bundle/ruby/2.0.0/gems/execjs-2.3.0/lib/execjs/ruby_racer_runtime.rb:58:in `rescue in block in call'
/home/deploy/tmp/build-142485688618988/vendor/bundle/ruby/2.0.0/gems/execjs-2.3.0/lib/execjs/ruby_racer_runtime.rb:52:in `block in call'
/home/deploy/tmp/build-142485688618988/vendor/bundle/ruby/2.0.0/gems/execjs-2.3.0/lib/execjs/ruby_racer_runtime.rb:87:in `block in lock'
/home/deploy/tmp/build-142485688618988/vendor/bundle/ruby/2.0.0/gems/execjs-2.3.0/lib/execjs/ruby_racer_runtime.rb:85:in `call'
/home/deploy/tmp/build-142485688618988/vendor/bundle/ruby/2.0.0/gems/execjs-2.3.0/lib/execjs/ruby_racer_runtime.rb:85:in `Locker'
/home/deploy/tmp/build-142485688618988/vendor/bundle/ruby/2.0.0/gems/execjs-2.3.0/lib/execjs/ruby_racer_runtime.rb:85:in `lock'
/home/deploy/tmp/build-142485688618988/vendor/bundle/ruby/2.0.0/gems/execjs-2.3.0/lib/execjs/ruby_racer_runtime.rb:51:in `call'
/home/deploy/tmp/build-142485688618988/vendor/bundle/ruby/2.0.0/gems/coffee-script-2.3.0/lib/coffee_script.rb:76:in `compile'
/home/deploy/tmp/build-142485688618988/vendor/bundle/ruby/2.0.0/gems/tilt-1.4.1/lib/tilt/coffee.rb:46:in `evaluate'
/home/deploy/tmp/build-142485688618988/vendor/bundle/ruby/2.0.0/gems/tilt-1.4.1/lib/tilt/template.rb:103:in `render'
/home/deploy/tmp/build-142485688618988/vendor/bundle/ruby/2.0.0/gems/sprockets-2.12.3/lib/sprockets/context.rb:197:in `block in evaluate'
/home/deploy/tmp/build-142485688618988/vendor/bundle/ruby/2.0.0/gems/sprockets-2.12.3/lib/sprockets/context.rb:194:in `each'
/home/deploy/tmp/build-142485688618988/vendor/bundle/ruby/2.0.0/gems/sprockets-2.12.3/lib/sprockets/context.rb:194:in `evaluate'
/home/deploy/tmp/build-142485688618988/vendor/bundle/ruby/2.0.0/gems/sprockets-2.12.3/lib/sprockets/processed_asset.rb:12:in `initialize'
/home/deploy/tmp/build-142485688618988/vendor/bundle/ruby/2.0.0/gems/sprockets-2.12.3/lib/sprockets/base.rb:374:in `new'
/home/deploy/tmp/build-142485688618988/vendor/bundle/ruby/2.0.0/gems/sprockets-2.12.3/lib/sprockets/base.rb:374:in `block in build_asset'
/home/deploy/tmp/build-142485688618988/vendor/bundle/ruby/2.0.0/gems/sprockets-2.12.3/lib/sprockets/base.rb:395:in `circular_call_protection'
/home/deploy/tmp/build-142485688618988/vendor/bundle/ruby/2.0.0/gems/sprockets-2.12.3/lib/sprockets/base.rb:373:in `build_asset'
/home/deploy/tmp/build-142485688618988/vendor/bundle/ruby/2.0.0/gems/sprockets-2.12.3/lib/sprockets/index.rb:94:in `block in build_asset'
/home/deploy/tmp/build-142485688618988/vendor/bundle/ruby/2.0.0/gems/sprockets-2.12.3/lib/sprockets/caching.rb:58:in `cache_asset'
/home/deploy/tmp/build-142485688618988/vendor/bundle/ruby/2.0.0/gems/sprockets-2.12.3/lib/sprockets/index.rb:93:in `build_asset'
/home/deploy/tmp/build-142485688618988/vendor/bundle/ruby/2.0.0/gems/sprockets-2.12.3/lib/sprockets/base.rb:287:in `find_asset'
/home/deploy/tmp/build-142485688618988/vendor/bundle/ruby/2.0.0/gems/sprockets-2.12.3/lib/sprockets/index.rb:61:in `find_asset'
/home/deploy/tmp/build-142485688618988/vendor/bundle/ruby/2.0.0/gems/sprockets-2.12.3/lib/sprockets/bundled_asset.rb:16:in `initialize'
/home/deploy/tmp/build-142485688618988/vendor/bundle/ruby/2.0.0/gems/sprockets-2.12.3/lib/sprockets/base.rb:377:in `new'
/home/deploy/tmp/build-142485688618988/vendor/bundle/ruby/2.0.0/gems/sprockets-2.12.3/lib/sprockets/base.rb:377:in `build_asset'
/home/deploy/tmp/build-142485688618988/vendor/bundle/ruby/2.0.0/gems/sprockets-2.12.3/lib/sprockets/index.rb:94:in `block in build_asset'
/home/deploy/tmp/build-142485688618988/vendor/bundle/ruby/2.0.0/gems/sprockets-2.12.3/lib/sprockets/caching.rb:58:in `cache_asset'
/home/deploy/tmp/build-142485688618988/vendor/bundle/ruby/2.0.0/gems/sprockets-2.12.3/lib/sprockets/index.rb:93:in `build_asset'
/home/deploy/tmp/build-142485688618988/vendor/bundle/ruby/2.0.0/gems/sprockets-2.12.3/lib/sprockets/base.rb:287:in `find_asset'
/home/deploy/tmp/build-142485688618988/vendor/bundle/ruby/2.0.0/gems/sprockets-2.12.3/lib/sprockets/index.rb:61:in `find_asset'
/home/deploy/tmp/build-142485688618988/vendor/bundle/ruby/2.0.0/gems/sprockets-2.12.3/lib/sprockets/manifest.rb:211:in `block in find_asset'
/home/deploy/tmp/build-142485688618988/vendor/bundle/ruby/2.0.0/gems/sprockets-2.12.3/lib/sprockets/manifest.rb:257:in `benchmark'
/home/deploy/tmp/build-142485688618988/vendor/bundle/ruby/2.0.0/gems/sprockets-2.12.3/lib/sprockets/manifest.rb:210:in `find_asset'
/home/deploy/tmp/build-142485688618988/vendor/bundle/ruby/2.0.0/gems/sprockets-2.12.3/lib/sprockets/manifest.rb:119:in `block in compile'
/home/deploy/tmp/build-142485688618988/vendor/bundle/ruby/2.0.0/gems/sprockets-2.12.3/lib/sprockets/manifest.rb:118:in `each'
/home/deploy/tmp/build-142485688618988/vendor/bundle/ruby/2.0.0/gems/sprockets-2.12.3/lib/sprockets/manifest.rb:118:in `compile'
/home/deploy/tmp/build-142485688618988/vendor/bundle/ruby/2.0.0/gems/sprockets-rails-2.2.4/lib/sprockets/rails/task.rb:70:in `block (3 levels) in define'
/home/deploy/tmp/build-142485688618988/vendor/bundle/ruby/2.0.0/gems/sprockets-2.12.3/lib/rake/sprocketstask.rb:146:in `with_logger'
/home/deploy/tmp/build-142485688618988/vendor/bundle/ruby/2.0.0/gems/sprockets-rails-2.2.4/lib/sprockets/rails/task.rb:69:in `block (2 levels) in define'
@alepee
Copy link
Author

alepee commented Feb 25, 2015

This issue seems to be linked to latest coffee-script version 1.9.x.
jashkenas/coffeescript#3829

Fixed within a rails project by specifying coffee-script-source version in Gemfile

gem 'coffee-rails'
gem 'coffee-script-source', '~>1.8.0'

@alepee alepee closed this as completed Feb 25, 2015
@pacuna
Copy link

pacuna commented Mar 23, 2015

thanks!

@jainyzau
Copy link

Thanks, this solved my problem. Hope this can be fixed in latest version of coffee-script.

@deepak07
Copy link

deepak07 commented Apr 7, 2015

This solved my issue. Thanks :)

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

4 participants