Spectrum: Sentry not working on prod

Created on 18 Apr 2018  路  3Comments  路  Source: withspectrum/spectrum

I'm seeing the 'Raven not enabled locally' warning in prod - maybe I messed something up

Bug

Most helpful comment

@brianlovin one way to do this is to define new webpack plugin to pass server environment variables to browser's process.env.
refer: https://github.com/dev-drprasad/fetch-music/blob/master/webpack.config.js#L29-L35

All 3 comments

@brianlovin i checked src/helpers/events.js, that error will come when SENTRY_DSN_CLIENT environment variable not passed to application. Even the error message is misleading. If SENTRY_DSN_CLIENT not present in env, it doesn't mean its local environment. i can refactor logic and and send PR if needed !

@dev-drprasad I think I was really dumb and didn't realize we probably can't access env variables in the client :P

We're trying to set ourselves up so that we only get Sentry errors from Spectrum, and not from contributors running our code locally - I'm not totally sure how to approach this now so that we can get error reports from the client without exposing a secret token from Sentry

@brianlovin one way to do this is to define new webpack plugin to pass server environment variables to browser's process.env.
refer: https://github.com/dev-drprasad/fetch-music/blob/master/webpack.config.js#L29-L35

Was this page helpful?
0 / 5 - 0 ratings

Related issues

carloslfu picture carloslfu  路  3Comments

mxstbr picture mxstbr  路  6Comments

brianlovin picture brianlovin  路  3Comments

ArturKlajnerok picture ArturKlajnerok  路  7Comments

mxstbr picture mxstbr  路  5Comments