scoutapp / scout_apm_ruby

ScoutAPM Ruby Agent. Supports Rails, Sinatra, Grape, Rack, and many other frameworks

Home Page:https://scoutapm.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Undefined method `desc=' for nil:NilClass in 4.0.2

berkos opened this issue Β· comments

πŸ‘‹ It seems like 4.0.2could have introduced this potential issue where req.current_layer is nil.

NoMethodError: undefined method `desc=' for nil:NilClass
  from scout_apm (4.0.2) lib/scout_apm/instruments/typhoeus.rb:54:in `run'

It's occurs here related with #376.

System:
Rails 6.1.1
Ruby 3.0.0

Please let me know if more information is needed. πŸ™

Is there a deeper backtrace on that? I'll fix it with the nil check that's needed, but curious how it happened since the start_layer call is the line just above (so there's always at least one layer).

Hi @cschneid , thanks for quick reply.

I hope this is more helpful.

NoMethodError: undefined method `desc=' for nil:NilClass
  from scout_apm (4.0.2) lib/scout_apm/instruments/typhoeus.rb:54:in `run'
  from docspring (1.3.2) lib/docspring/api_client.rb:51:in `call_api'
  from docspring (1.3.2) lib/docspring/api/pdf_api.rb:884:in `generate_pdf_with_http_info'
  from docspring (1.3.2) lib/docspring/api/pdf_api.rb:844:in `generate_pdf'
  from docspring (1.3.2) lib/docspring/api/client.rb:23:in `generate_pdf'
  ...
  from paper_trail (11.1.0) lib/paper_trail/request.rb:110:in `with'
  from paper_trail (11.1.0) lib/paper_trail.rb:91:in `request'
  ...
  from app/commands/base_command.rb:15:in `block in call'
  from paper_trail (11.1.0) lib/paper_trail/request.rb:110:in `with'
  from paper_trail (11.1.0) lib/paper_trail.rb:91:in `request'
  from app/commands/base_command.rb:14:in `call'
  ...
  from sidekiq (6.1.2) lib/sidekiq/processor.rb:196:in `execute_job'
  from sidekiq (6.1.2) lib/sidekiq/processor.rb:164:in `block (2 levels) in process'
  from sidekiq (6.1.2) lib/sidekiq/middleware/chain.rb:138:in `block in invoke'
  from app/lib/performance.rb:8:in `call'
  from sidekiq (6.1.2) lib/sidekiq/middleware/chain.rb:140:in `block in invoke'
  from scout_apm (4.0.2) lib/scout_apm/background_job_integrations/sidekiq.rb:68:in `call'
  from sidekiq (6.1.2) lib/sidekiq/middleware/chain.rb:140:in `block in invoke'
  from sentry-raven (3.1.1) lib/raven/integrations/sidekiq/cleanup_middleware.rb:7:in `call'
  from sidekiq (6.1.2) lib/sidekiq/middleware/chain.rb:140:in `block in invoke'
  ...
  from sidekiq (6.1.2) lib/sidekiq/middleware/chain.rb:143:in `invoke'
  from sidekiq (6.1.2) lib/sidekiq/processor.rb:163:in `block in process'
  from sidekiq (6.1.2) lib/sidekiq/processor.rb:136:in `block (6 levels) in dispatch'
  from sidekiq (6.1.2) lib/sidekiq/job_retry.rb:111:in `local'
  from sidekiq (6.1.2) lib/sidekiq/processor.rb:135:in `block (5 levels) in dispatch'
  from sidekiq (6.1.2) lib/sidekiq/rails.rb:14:in `block in call'
  from activesupport (6.1.1) lib/active_support/execution_wrapper.rb:88:in `wrap'
  from activesupport (6.1.1) lib/active_support/reloader.rb:72:in `block in wrap'
  from activesupport (6.1.1) lib/active_support/execution_wrapper.rb:88:in `wrap'
  from activesupport (6.1.1) lib/active_support/reloader.rb:71:in `wrap'
  from sidekiq (6.1.2) lib/sidekiq/rails.rb:13:in `call'
  from sidekiq (6.1.2) lib/sidekiq/processor.rb:131:in `block (4 levels) in dispatch'
  from sidekiq (6.1.2) lib/sidekiq/processor.rb:257:in `stats'
  from sidekiq (6.1.2) lib/sidekiq/processor.rb:126:in `block (3 levels) in dispatch'
  from sidekiq (6.1.2) lib/sidekiq/job_logger.rb:13:in `call'
  from sidekiq (6.1.2) lib/sidekiq/processor.rb:125:in `block (2 levels) in dispatch'
  from sidekiq (6.1.2) lib/sidekiq/job_retry.rb:78:in `global'
  from sidekiq (6.1.2) lib/sidekiq/processor.rb:124:in `block in dispatch'
  from sidekiq (6.1.2) lib/sidekiq/logger.rb:10:in `with'
  from sidekiq (6.1.2) lib/sidekiq/job_logger.rb:33:in `prepare'
  from sidekiq (6.1.2) lib/sidekiq/processor.rb:123:in `dispatch'
  from sidekiq (6.1.2) lib/sidekiq/processor.rb:162:in `process'
  from sidekiq (6.1.2) lib/sidekiq/processor.rb:78:in `process_one'
  from sidekiq (6.1.2) lib/sidekiq/processor.rb:68:in `run'
  from sidekiq (6.1.2) lib/sidekiq/util.rb:15:in `watchdog'
  from sidekiq (6.1.2) lib/sidekiq/util.rb:24:in `block in safe_thread'