rollbar-gem: 2.15.6 crash on Rails deploy at rollbar:sourcemap stage
TLDR: Moving from 2.15.5 to 2.15.6 has added a new rollbar:sourcemap stage to my capistrano deploys, which crashes unless I add a rollbar_sourcemaps_minified_url_base config value (even though I have no meaningful value to set on most of our apps).
Below is relevant bit from the bundle exec cap production deploy --trace (partly anonymised):
** Invoke deploy:assets:backup_manifest (first_time)
** Execute deploy:assets:backup_manifest
00:14 deploy:assets:backup_manifest
01 mkdir -p /var/www/projectname/releases/20180418084937/assets_manifest_backup
✔ 01 deploy@server.hostname.com 0.054s
02 cp /var/www/projectname/releases/20180418084937/public/assets/.sprockets-manifest-ba1494b464b023103745788f3cd11928.json /var/www/projectname/releases/20180418084937/assets_manifest_backup
✔ 02 deploy@server.hostname.com 0.056s
** Invoke rollbar:sourcemap (first_time)
** Execute rollbar:sourcemap
00:14 rollbar:sourcemap
Uploading source maps from
#<Thread:0x00000001055bf788@/Users/username/.rvm/gems/ruby-2.5.1@projectname/gems/sshkit-1.16.0/lib/sshkit/runners/parallel.rb:10 run> terminated with exception (report_on_exception is true):
Traceback (most recent call last):
1: from /Users/username/.rvm/gems/ruby-2.5.1@projectname/gems/sshkit-1.16.0/lib/sshkit/runners/parallel.rb:11:in `block (2 levels) in execute'
/Users/username/.rvm/gems/ruby-2.5.1@projectname/gems/sshkit-1.16.0/lib/sshkit/runners/parallel.rb:15:in `rescue in block (2 levels) in execute': Exception while executing as deploy@server.hostname.com: undefined local variable or method `rollbar_sourcemaps_minified_url_base' for #<SSHKit::Backend::Netssh:0x00000001055bf620> (SSHKit::Runner::ExecuteError)
cap aborted!
SSHKit::Runner::ExecuteError: Exception while executing as deploy@server.hostname.com: undefined local variable or method `rollbar_sourcemaps_minified_url_base' for #<SSHKit::Backend::Netssh:0x00000001055bf620>
/Users/username/.rvm/gems/ruby-2.5.1@projectname/gems/sshkit-1.16.0/lib/sshkit/runners/parallel.rb:15:in `rescue in block (2 levels) in execute'
/Users/username/.rvm/gems/ruby-2.5.1@projectname/gems/sshkit-1.16.0/lib/sshkit/runners/parallel.rb:11:in `block (2 levels) in execute'
Caused by:
NameError: undefined local variable or method `rollbar_sourcemaps_minified_url_base' for #<SSHKit::Backend::Netssh:0x00000001055bf620>
/Users/username/.rvm/gems/ruby-2.5.1@projectname/gems/rollbar-2.15.6/lib/rollbar/tasks/rollbar.cap:39:in `block (3 levels) in <top (required)>'
/Users/username/.rvm/gems/ruby-2.5.1@projectname/gems/sshkit-1.16.0/lib/sshkit/backends/abstract.rb:29:in `instance_exec'
/Users/username/.rvm/gems/ruby-2.5.1@projectname/gems/sshkit-1.16.0/lib/sshkit/backends/abstract.rb:29:in `run'
/Users/username/.rvm/gems/ruby-2.5.1@projectname/gems/sshkit-1.16.0/lib/sshkit/runners/parallel.rb:12:in `block (2 levels) in execute'
Tasks: TOP => rollbar:sourcemap
The deploy has failed with an error: Exception while executing as deploy@server.hostname.com: undefined local variable or method `rollbar_sourcemaps_minified_url_base' for #<SSHKit::Backend::Netssh:0x00000001055bf620>
** Invoke deploy:failed (first_time)
** Execute deploy:failed
Having had a glance at the top of the backtrace - https://github.com/rollbar/rollbar-gem/blob/master/lib/rollbar/tasks/rollbar.cap#L39 - it should probably just be a string, without the interpolation.
I assume setting a rollbar_sourcemaps_minified_url_base value will fix the problem, however this application (any several others of ours) has no sourcemaps and is also firewalled to be internal to our company. So I don’t have a useful value to assign here.
I tested this with 3 of our applications and bundle update rollbar then bundle exec cap production deploy is enough to cause the exception.
I’m rolling back to 2.15.5 for now, but thought I’d let you know.
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Reactions: 9
- Comments: 15 (3 by maintainers)
Commits related to this issue
- Fix rollbar The latest version is broken: https://github.com/rollbar/rollbar-gem/issues/713 Downgrading until a fix is released. — committed to fsek/web by navro 6 years ago
- Fix rollbar The latest version is broken: https://github.com/rollbar/rollbar-gem/issues/713 Downgrading until a fix is released. — committed to fsek/web by navro 6 years ago
- Keeping rollbar locked at 2.15.5 until issue fixed https://github.com/rollbar/rollbar-gem/issues/713 — committed to ophrescue/RescueRails by markottaviani 6 years ago
- Keeping rollbar locked at 2.15.5 until issue fixed https://github.com/rollbar/rollbar-gem/issues/713 — committed to ophrescue/RescueRails by markottaviani 6 years ago
- Lock rollbar to 2.15.6 See https://github.com/rollbar/rollbar-gem/issues/713 — committed to tablexi/nucore-open by jhanggi 6 years ago
- Lock rollbar to 2.15.6 (#1547) See https://github.com/rollbar/rollbar-gem/issues/713 — committed to tablexi/nucore-open by jhanggi 6 years ago
- related to #713. provide default value — committed to westonplatter/rollbar-gem by westonplatter 6 years ago
- related to #713. comment out the source maps upload code to make it work. — committed to westonplatter/rollbar-gem by ArturMoczulski 6 years ago
We will take a look into this, sorry for the delay!