-
Notifications
You must be signed in to change notification settings - Fork 283
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 `[]' for nil:NilClass #195
Comments
Thanks @lardcanoe , we'll see if we can repro. |
@lardcanoe are you using an async handler to send the data? Do you have a full backtrace? |
@brianr finally I've rescued the exception, log the error and payload and re-raise the exception. In order to report an internal error for this I'd add a new method |
We don't do anything special other than wrap in scoped:
and
|
Thanks again for reporting this @lardcanoe . We've fixed this in #196 and pushed it as a new release, version 1.3.1 on rubygems. When you get the chance, can you verify that it's fixed? |
I am able to reproduce this error. It's now trapped and handled (I'm on gem version 1.5.1 which contains #196) but still occurs. It happens when you use an async reporting mechanism (I'm using Sidekiq) and you call I believe that's sufficient to reproduce the error originally reported here. |
@aaronlerch can you explain better the first scenario? Your point is that the extra info is not reported? About the second one, I don't know if you have any problem with it. Custom exception, which are not rescued, don't provide a backtrace in Ruby, and we don't do any magic by default. You can enable backtraces for not-caught exceptions with this option: configuration.populate_empty_backtraces |
Sorry, I wasn't very clear -- let me try to clarify. The original error report was the error with a message I received the same My addition here is just to say that I am able to reliably reproduce Does that make more sense? My main point is that I was able to reproduce it and contrary to "In normal situations this shouldn't happen never." it can happen when using the Rollbar API in a supported way. Hope that makes sense! Thanks! :) |
@aaronlerch do you have backtrace of this? |
Is this what you are looking for?
|
Yes, thanks @aaronlerch. We'll fix this during this week. Thank you every much for the report, and sorry for the inconveniences. |
No trouble, just wanted to help add a specific reproduction of the issue. Thanks! |
@aaronlerch we've opened a PR for this, #240. This will be merged today probably. Thanks for this again. BTW, I had a question. Why is so big the payload you are trying to send to our API? The message is huge? Is there any Sidekiq data in the payload that is very long? Thanks! |
Trade secrets, I can't say why. ;) Okay, I'll tell. In this case I'm using rollbar in a custom monitoring process that looks for invalid data. I've just been including the data directly in the message, for example I'm going to be trimming it down to ensure it only includes an example or two, because I can follow up on it myself without having all the data. It was just very convenient to have it included in the error report. |
Oh thanks 😄. The question was about to detect any other potential bug. Thanks again! |
Fix min body truncation strategy. Fixes #195
No idea how to reproduce, but it happened...
https://github.com/rollbar/rollbar-gem/blob/master/lib/rollbar/truncation/frames_strategy.rb#L27
The text was updated successfully, but these errors were encountered: