Skip to content

ThreadError resque:no_fork resque:work New Level: Error Unhandled can't be called from trap context (ThreadError) #2495

@iuliabirleanu

Description

@iuliabirleanu

Issue Description

When trying to upgrade our sentry-ruby version from 5.21 to the latest 5.22, I noticed the following error:

ThreadError resque:no_fork resque:work
Unhandled
can't be called from trap context (ThreadError)

The trace indicates the error is coming from sentry-ruby/lib/sentry-ruby.rb at line 310 from inside get_main_hub.
get_main_hub was indeed updated in the last release, but I can not say why is generating the error above.

Reproduction Steps

I don't know what triggers it.

Expected Behavior

The error mentioned above should not be present.

Actual Behavior

The error mentioned above is present.

Ruby Version

3.2.6

SDK Version

5.21 - 5.22

Integration and Its Version

Rails 7.0.8.5

Sentry Config

Exceptions.configure do |config|
  config.sentry.with(
    enabled: ENV.fetch('SENTRY_ENABLED', 'false') == 'true',
    dsn:  ENV.fetch('SENTRY_DSN', nil)
  )
  config.generate_fingerprint = false
end

Metadata

Metadata

Assignees

Projects

Status

No status

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions