-
Notifications
You must be signed in to change notification settings - Fork 68
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
"Cannot unmarshal string into Go struct field StackFrame.line" after truncating big notices #285
Comments
I posted the notice json, but deleted it because it has some slightly sensitive information in it. |
Here's a relevant snippet: {
"file": "[GEM_ROOT]/gems/rack-timeout-0.4.2/lib/rack/timeout/support/timeout.rb",
"line": "[Circular]",
"function": "timeout",
"code": {
"17": " thr = Thread.current # reference to current thread to be used in timeout thread",
"18": " job = @scheduler.run_in(secs) { @on_timeout.call thr } # schedule this thread to be timed out; should get cancelled if block completes on time",
"19": " return block.call # do what you gotta do",
"20": " ensure #",
"21": " job.cancel! if job # cancel the scheduled timeout job; if the block completed on time, this"
}
},
|
same problem here, we keep getting errors like:
when trying to notify a message using |
The workaround we used: # TODO: Remove these constraints (and the line for airbrake-ruby) once truncation bug in Airbrake is fixed.
gem 'airbrake-ruby', '2.5.1'
gem 'airbrake', '7.0.3' |
We do it similar way:
It looks like the latest version of "airbrake" gem is fine |
Hey guys, sorry about this bug. Can anybody try out this PR? #286 |
I'm going to merge it today and release a new version nevertheless because this bug is critical. |
Released this fix in v2.6.1. |
I've upgraded to the latest version (sorry had no chance to get to it earlier) and seems still having this problem:
Log:
|
Additional fix for #285 ("Cannot unmarshal string into Go struct field StackFrame.line" after truncating big notices) The problem is that `.include?` compares object hashes. For example, if we do ``` h1 = { a: 1 } h2 = { a: 1 } a = [h1, h2] ``` ...then `h1 == h2`. Thus, if we truncate `a`, the truncator will incorrectly mark them as circular. However, their object ids are different and they're not really circular.
Additional fix for #285 ("Cannot unmarshal string into Go struct field StackFrame.line" after truncating big notices) The problem is that `.include?` compares object hashes. For example, if we do ``` h1 = { a: 1 } h2 = { a: 1 } a = [h1, h2] ``` ...then `h1 == h2`. Thus, if we truncate `a`, the truncator will incorrectly mark them as circular. However, their object ids are different and they're not really circular.
Additional fix for #285 ("Cannot unmarshal string into Go struct field StackFrame.line" after truncating big notices) The problem is that `.include?` compares object hashes. For example, if we do ``` h1 = { a: 1 } h2 = { a: 1 } a = [h1, h2] ``` ...then `h1 == h2`. Thus, if we truncate `a`, the truncator will incorrectly mark them as circular. However, their object ids are different and they're not really circular.
Please upgrade to v2.6.2. I hope this bug is fixed. |
This version is seems to be working for me. |
Thanks for testing, that's good news! |
We're unable to send airbrakes with Rails 5.1 and airbrake 7.1.0, airbrake-ruby 2.6.0. We get this error in our heroku logs:
The text was updated successfully, but these errors were encountered: