#[Error] Unable to determine version. Make sure to include `release` - sentry/gatsby + Cloudflare

7 messages · Page 1 of 1 (latest)

next grotto
#

Hello team!

I am trying to install Sentry in my Gatsby (4.6) application with Cloudflare pages.

I have configured the Sentry plugin in gatsby-config such as:
{
resolve: "@sentry/gatsby",
options: {
dsn: "https://xxxxx",
release: process.env.CF_PAGES_COMMIT_SHA
}
},

But my builds are stll failing in cloudflare:
Sentry CLI Plugin: Unable to determine version. Make sure to include release
09:47:55.387 option or use the environment that supports auto-detection
09:47:55.388 https://docs.sentry.io/cli/releases/#creating-releases

Sentry's command line interface can be used for release management. The CLI allows you to create, edit and delete releases as well as upload release artifacts.

neat jacinth
#

I would set the SENTRY_RELEASE environmental variable, is that possible to configure?

next grotto
#

Hello Abhi, thank you for your prompt reply!
Yes, but what value should SENTRY_RELEASE take here? Isn't it supposed to be dynamic?

neat jacinth
#

our Gatsby SDK unfortunately uses v1 of the sentry webpack plugin, which doesn't have good release discovery for cloudflare pages

#

in v8 we are trying to fix this by bumping to v2 of the plugin

#

SENTRY_RELEASE should map to whatever CF_PAGES_COMMIT_SHA is

#

so the webpack plugin can pick that up