rollbar / rollbar.js

Error tracking and logging from Javascript to Rollbar

Home Page:https://docs.rollbar.com/docs/javascript

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error with Rollbar Integration on Cloudflare Workers: "addEventListener(): useCapture must be false."

danielplan opened this issue · comments

Issue Description:

I'm encountering an issue when using Rollbar with Astro 4 on the Cloudflare Workers JavaScript runtime. The error message I'm seeing is:

"addEventListener(): useCapture must be false."

What I did

I have integrated the Rollbar initialization script on the page level of Astro, to automatically catch errors in the SSR runtime.

import Rollbar from 'rollbar';
var rollbar = new Rollbar({
    accessToken: '<Access Token>',
    captureUncaught: true,
    captureUnhandledRejections: true,
    payload: {
        code_version: '1.0.0',
    },
});

Once i am trying to run this with wrangler, this error pops up.
image

Questions

  1. Am I doing something wrong with the Rollbar integration in Astro 4 on Cloudflare JavaScript Runtime?
  2. Is it even possible to capture SSR errors with Rollbar in Astro/Vite-based Frameworks?