Skip to content

exception happened in background worker: source sequence is illegal/malformed utf-8 #2805

Closed

Description

@grosser

Issue Description

Something fails in production and all I see in the logs is this message,
which is not helpful since I need the original backtrace and error message to begin debugging

Reproduction Steps

raise an error that includes invalid utf8

Expected Behavior

<?> icons replace invalid utf8

Actual Behavior

error not sent to sentry and log shows message

Ruby Version

3.4.6

SDK Version

5.28.0

Integration and Its Version

none

Sentry Config

nothing special, except a custom logger that does {message: message}.to_json

Activity

  1. linear commented on Dec 2, 2025

    @linear
  2. moved this to Waiting for: Product Owner in GitHub Issues with 👀 3on Dec 2, 2025
  3. solnic commented on Dec 9, 2025

    @solnic
    Collaborator

    @grosser thanks for the report. Any chance you could give me an example message that causes this? We do have handling of malformed utf-8 strings in place.

  4. moved this from Waiting for: Product Owner to No status in GitHub Issues with 👀 3on Dec 9, 2025
  5. grosser commented on Dec 9, 2025

    @grosser
    Author

    sadly did not find more info and don't have a way to reliably reproduce it
    feel free to close if you don't see any obvious spot where this could have slipped through

  6. moved this to Waiting for: Product Owner in GitHub Issues with 👀 3on Dec 9, 2025
  7. solnic commented on Dec 10, 2025

    @solnic
    Collaborator

    @grosser alright, I'll dig into it - could you tell me what exact custom logger do you use that does {message: message}.to_json?

  8. 20 remaining items

  9. assigned and unassigned on Dec 23, 2025
  10. assigned and unassigned on Dec 24, 2025
  11. dingsdax commented on Jan 5, 2026

    @dingsdax
    Contributor

    @grosser fyi, we decided for a slightly different approach, guarding against any errors in custom loggers and output to stderr in case #2817

  12. grosser commented on Jan 5, 2026

    @grosser
    Author

    yeah that looks like the right approach, there could be various errors with logging and this kinda solves them all

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions