-
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
[bug] Receiving API reject 400 for some requests when using Ruby 2.6.0 #797
Comments
@johannesluedke we'll investigate. @jessicahsieh could you verify that the payload is properly formed and that the request body is within the acceptable length for our API? |
We hit this as well. @johannesluedke did you start getting this after switching to ruby 2.6.0? We switched back to 2.5.3 and the problem went away. Looks like 2.6.0 isn't ready for production use yet.... |
@johannesluedke could you show me your configuration and account/project name so i can investigate? @jessewgibbs ill look into it. @letaniaferreira and i have been in contact with @benhutton via intercom and looks like the issue is related to ruby 2.6.0 although havent had a change to look into what is causing it. the payload is getting formatted properly for most of the errors but not all. |
@jessicahsieh I wrote you a message via within rollbar. -- |
@johannesluedke @benhutton any update on whether there's a new Ruby release yet that solves this problem? I'm inclined to treat this as a known issue vs. trying to fix it since it seems like Ruby isn't behaving as expected. |
@jessewgibbs there is no new Ruby release yet. The fix has been made, but the code hasn't been released as a new version yet. As for whether or not you should try to fix things for the rollbar gem
So to summarize, I think you should ship a fix. I wouldn't use it. But I want Rollbar to be the type of company that would ship a fix for this. And I think it would serve other customers well. Alternatively, you could email all of your customers that are running on ruby 2.6.0, pointing out the ruby bug and suggesting they downgrade to ruby 2.5.3 until ruby 2.6.1 releases. That would be an even more helpful thing to do, as not every rubyist knows about this error yet, I would imagine. |
@benhutton thanks for the guidance on this. We've issued a warning to our customers advising against using Rollbar with Ruby 2.6.0 until the maintainers release the fix to https://bugs.ruby-lang.org/issues/15472. |
Has anyone tried patching this with confirmed fix before downgrading? |
I deployed a patch reopening https://gist.github.com/rromanchuk/0b239ca4a31bd67c12c566250501837b#file-protocol-rb-L51 |
The bug is specific to multi-byte characters. (The length is erroneously calculated based on characters instead of bytes.) There are two apparent ways to work around in rollbar-gem.
Option #1 may not work at all times or on all platforms. Option #2 requires patching a core Ruby class (only for 2.6.0 of course), but should be expected to to work in all environments. |
Is this fixed now that 2.6.1 is out? |
@brandoncc Yes, this is fixed in 2.6.1. For 2.6.0, PR #814 is currently pending, and may be included in the next rollbar-gem release. |
Issue #797: Handle multi-byte body in Net::HTTP on ruby 2.6.0
For some error from my rails application, I get an error entry at rollbar
Request
How can this be fixed?
the request body length is ~ 65,527 characters
The text was updated successfully, but these errors were encountered: