-
Notifications
You must be signed in to change notification settings - Fork 280
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
ArgumentError: redundant UTF-8 sequence #85
Comments
Thanks Fabian. We'll take a look. |
Alright, I also occasionally get this exception, it is possibly related: The stacktrace is the following:
|
I just want to bump this, I'm still getting these errors occasionally, also with newer versions of the rollbar gem, currently
It would be great to get this resolved as I fear I'm missing errors my users are seeing because of this. |
I just looked at the logs, and rollbar is trying to report an However, this should still be fixed as it could mask more serious errors behind internal rollbar errors. Thanks for the quick reply! |
I investigated a little more, and the problem only occurs when using sidekiq as backend, because sidekiq dumps the payload as JSON before writing it to redis. To work around this issue the sidekiq-backend would have to sanitize the payload (e.g. using context 'in face of malformed UTF-8' do
let(:payload) { { 'foo' => "\255".force_encoding('UTF-8') } }
it_behaves_like "a Rollbar processor"
end |
Having the same problem. It would be nice to have it fixed. |
So...this is a Rollbar related issue? I've just seen this error reported while a third party firm was running security testing. Rails 3.2.17 and Ruby 2.0.0p451 |
@sbezboro, this issue is still happening for a payload hash with keys that are symbols improperly encoded in UTF-8. For example, run
This is actually happening for us with 1.0.0 release of rollbar as it seems rails ActionPack formats some hashes with symbols of ASCII-8BIT encoding depending on the incoming request. Let me know if you want to see a stacktrace.
I think converting symbols to strings here is OK as they are JSON-encoded as the end result and symbols become strings sooner or later but let me know if there will be side effects. Do you want me to submit a pull-request for this with proper tests? |
Hi Victor, Thanks for the info. Please send over a PR and some tests. Otherwise, I'll add it to our backlog. Thanks! |
Hi,
I'm not sure this is a rollbar issue, but it's the only dependency turning up in the stacktrace. I'm using version
0.11.7
- I know there are newer versions, but I hesitate to update because there were quite a few regressions.Here's the stacktrace:
Thanks!
Fabian
The text was updated successfully, but these errors were encountered: