Skip to content

Beta branch - Not supporting special chars in received payload #319

Open

Description

@Dancho80

in case the payload contains some special char like ®, the client fails with error:

TypeError: Cannot convert argument to a ByteString because the character at index 10117 has a value of 8482 which is greater than 255.
at Client.fetch (/smee-client/node_modules/undici/index.js:112:13)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async Client.onmessage (file:///smee-client/index.js:52:30)

Activity

  1. wolfy1339 commented on Sep 25, 2024

    @wolfy1339
    Contributor

    Can you try changing line 82 so it looks like this

        headers["content-type"] = "application/json; charset=utf-8";

    Are you sending the payload as JSON or urlencoded?

  2. Dancho80 commented on Sep 26, 2024

    @Dancho80
    Author

    same error
    my use case: sending Webhooks from GitHub, Content Type = application/json
    [EDIT]
    if I switch the method from application/json to urlencoded in GitHub Webhook settings
    so smee-client is passing the payload but the receiver doesnt accept it with the error 431

    org.eclipse.jetty.http.HttpParser parseFields
    Header is too large 8193>8192
    
  3. boegel commented on Jun 12, 2025

    @boegel

    I've run into a similar problem, also when sending webhooks from GitHub through smee.

    In my case, I found the trigger: the PR title from which an event was triggered had … in the PR title (which is done automatically by GitHub when the commit message of the first commit is too long).

    That's clearly not digested well by smee-client.

    The change suggested by @wolfy1339 (using charset=utf-8 in content-type) didn't make a difference, same TypeError was raised.

  4. boegel commented on Jun 12, 2025

    @boegel

    Same problem also happens when event data (like PR comments) include emojis...

  5. Uzlopak commented on Jun 12, 2025

    @Uzlopak
    Collaborator

    @boegel
    Do you hava a code snippet so that i can try it locally?

    Seems to be an issue with multibyte characters. Maybe it is not an issue of the smee-client itself but more of the smee.io server. The server is internally manipulating the received payload alot.

  6. Dancho80 commented on Oct 29, 2025

    @Dancho80
    Author

    any update on that?

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions