Getting **non-serializable** errors when setting user context with Ember

I’m using Ember 3.7.0 with Sentry 5.7.1.

I’ve followed the CDN inclusion path process and properly setup sentry using an init call in my app.js.

I’ve set the user context like this:

                "email": "",
                "username": "usernameHere"

However when an issue is reported, the user context comes across like this:


Which is **non-serializable**.

What am I doing wrong?


This is very odd.
Is this exactly your code you are passing to setUser?
Are you using our ember integration?

Yes, well I made the values more generic for this posting. Here is an example of my init in app.js:

    environment: config.environment,
    environments: [...redacted...],
    beforeSend: (event) => {
      return ["test"].includes(config.environment) ? null : event;
    dsn: '...redacted...',
    integrations: [new Sentry.Integrations.Ember()],
    appVersion: config['ember-cli-app-version']['version'],
    release: config['ember-cli-app-version']['version'],
    whitelistUrls: [

and here’s what I’m including in index.html:

    <!-- <script src="" integrity="sha384-h+FyW7fMq0eyUQeRnmnwiWXMxycy0z8n5sOtIH3NJx5GfqxdletL62letiWALtKy" crossorigin="anonymous"></script> -->
    <script src=""
      integrity="sha384-KMv6bBTABABhv0NI+rVWly6PIRvdippFEgjpKyxUcpEmDWZTkDOiueL5xW+cztZZ" crossorigin="anonymous">

    <!-- If you include the integration it will be available under Sentry.Integrations.Ember -->
    <script src="" crossorigin="anonymous"></script>

And you call to setUser is really just two strings or are you passing a complext user object?

Yes. I copy / pasted the code into the initial comment above and edited the values from
value + “string”

to simple string values above so that I could obscure some private information but yes, it evaluates to a string.

I would need a small repro example for this since I am not able to reproduce this. If you can provide a minimal example to try, we can take a look what’s going on.