Skip to content
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

NoMethodError: undefined method `add_session' for nil:NilClass #2232

Closed
aliuk2012 opened this issue Jan 15, 2024 · 1 comment
Closed

NoMethodError: undefined method `add_session' for nil:NilClass #2232

aliuk2012 opened this issue Jan 15, 2024 · 1 comment
Assignees
Labels

Comments

@aliuk2012
Copy link

aliuk2012 commented Jan 15, 2024

Hi
Dependabot has created a PR for 4 repos and all of the repos rspec request spec are failing with the following error message.

NoMethodError:
       undefined method `add_session' for nil:NilClass

It updates sentry-rails & sentry-ruby from 5.15.2 to 5.16.1. I had a look through the release notes and cannot spot what might have changed between the versions to see this error crop up. All the other specs are passing.

Apps are Rails 7.1.2, Ruby 3.2.2 and using rspec/

@aliuk2012
Copy link
Author

Ah it seems to be related to this one lot of specs affecting all the request specs

https://github.com/alphagov/forms-product-page/blob/main/spec/integration/sentry_spec.rb

If I comment out this file then all the request specs pass. I think it has to do with the setting up/tear down in the before/after blocks thats having an impact.

I tried isolating the issue in a completely new rails app and everything passed but it didn't have this spec file in it.

Happy for any pointers otherwise, I'll continue to investigate on my own.

Many thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Archived in project
Development

No branches or pull requests

2 participants