-
Notifications
You must be signed in to change notification settings - Fork 29
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 `keys' for nil #242
Comments
Hi @Alagaesia93 Thank for reporting this. What Knapsack Pro command do you call? Do you pass any custom options? Can you share the full txt output from the CI node? You can share it with support at https://knapsackpro.com/contact for confidentiality. Have you tried upgrading the dotenv gem and rspec-core to the latest version? Do you have any specific dotenv configuration? Do you use |
Thank you @ArturT for jumping in so quickly! ci.yml
not sure what else to add from the CI node, we have hundreds of thousands of tests so it's a gigantic file with the same error repeated for each test :) I have dotenv (not dotenv-rails) 3.0.2, released few days ago. I see that there is 3.0.3 with some fixes, I'll run CI again No specific dotenv config, yes autorestore because it's default The interesting part is knapsack 6.x works perfectly, knapsack 7.0 breaks everything. EDIT: just tried with dotenv 3.0.3, same error. Please note that bundle exec rspec works perfectly |
Could you update rspec-core to 3.13? Please replace:
to
Does it help? You can also try this:
We did a big refactor for RSpec in Queue Mode. I see the error is coming from the following line. We directly call the RSpec
|
I am seeing the same behavior with v7, FWIW. We're using rspec-core 3.13, dotenv 3.0.3, and knapsack-pro 7.0.0. All of our specs fail with the following error:
We're running our tests as follows: |
Thank you, @tmtrademarked, for the details. We will get back to you. Please share any further information you find about the root issue. -- I have created an internal ticket for the issue. |
I ran into the same thing. Similar gems to what @tmtrademarked mentioned above. Though, we do have this bit of code in our spec_helper:
We get the failure at |
rspec-core updated ✅ error gone ❌ |
Thanks for the details. I'll get back to you. |
For more context, I also tried with dotenv 3.1.0 - same results, unfortunately. |
Hi @Alagaesia93 @tmtrademarked @irphilli I'm Mat and I work with Artur at Knapsack. |
@Pacyfik - thanks! From testing on our CI, it seems like adding |
That's great to hear @tmtrademarked Thanks for checking it out 🙌 I'll let you know when the fix is out so you can update knapsack_pro and remove the temporary fix. |
@Pacyfik unfortunately, that didn't help us. |
Hey @Alagaesia93 @tmtrademarked @irphilli We've just published version 7.0.1 of the gem. Could you please update and let me know if your issue still persists? Hi @hoshy I'm sorry to hear that. I'd appreciate it if you could also update your gem to 7.0.1 and check if that helps. If not, let me know and we'll investigate further and see what we can do about it. |
@Pacyfik The workaround (and subsequently, 7.0.1) solved the issue for me. Thank you! |
Hi @Pacyfik! Sorry for delay, I was off With 7.0.1 it doesn't work for me, but it works if I do The app I'm managing is quite old so we have that file, not sure if you want to add that as an option. I'm also fine with keeping the bundle exec rake "knapsack_pro:queue:rspec[--require spec_helper]", maybe add to readme? |
Hey @Alagaesia93 Thanks for letting me know. |
Hi @Pacyfik it's working on our side! Problem was that we haven't excluded some tags which causes the failures. Adding |
yes
I don't have it
nope
yes
not sure what you mean here
in local, I hope it helps! |
Thanks @Alagaesia93 It seems your app has a slightly less common RSpec setup which might be explained by the age of your project. At the moment, knapsack_pro has all the current RSpec defaults covered. We will have to consider what changes to introduce to cover a wider range of custom RSpec configurations. For now, seeing as all the people who reported the original issue with their apps, have been able to fix it, I would consider the issue resolved. |
Hello!
After bumping version to 7.0 my whole RSpec CI fails with this error
NoMethodError: undefined method 'keys' for nil
It must be something connected with dotenv and some env variables, but it started failing only after 7.0 version. I tried to check online, but no luck.
If you need anything else, happy to help!
Full error stack
The text was updated successfully, but these errors were encountered: