Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error: release not found #495

Open
alesmenzel opened this issue Mar 1, 2024 · 9 comments
Open

error: release not found #495

alesmenzel opened this issue Mar 1, 2024 · 9 comments

Comments

@alesmenzel
Copy link

Environment

What version are you running? Etc.

[email protected], @sentry/[email protected] uploading to Sentry cloud

Steps to Reproduce

// Sentry plugin configuration
sentryWebpackPlugin({
	debug: true,
	sourcemaps: { assets: './dist/js/**' },
	release: {
		name: '<branch>_#<commit_hash>',
		deploy: {
			env: '<name>',
			url: '<url>',
		},
	},
})

Expected Result

Successful upload of assets and source maps.

Actual Result

> webpack --config ./build/webpack.production.config.js

[sentry-webpack-plugin] Debug: Could not determine debug ID from bundle. This can happen if you did not clean your output folder before installing the Sentry plugin. File will not be source mapped: <redacted>/dist/js/runtime-main.9be08bc5.js
// ... more of those - redacted
[sentry-webpack-plugin] Debug: Could not determine debug ID from bundle. This can happen if you did not clean your output folder before installing the Sentry plugin. File will not be source mapped: <redacted>/dist/js/runtime-main.ddae145d.js
> Found 56 files
> Analyzing 56 sources
> Analyzing completed in 0.091s
> Adding source map references
node:internal/errors:932
  const err = new Error(message);
              ^

Error: Command failed: <redacted>/node_modules/@sentry/cli-darwin/bin/sentry-cli releases finalize master_#<commit_hash|redacted>
error: release not found

Add --log-level=[info|debug] or export SENTRY_LOG_LEVEL=[info|debug] to see more output.
Please attach the full debug log to all bug reports.

    at ChildProcess.exithandler (node:child_process:422:12)
    at ChildProcess.emit (node:events:518:28)
    at maybeClose (node:internal/child_process:1105:16)
    at ChildProcess._handle.onexit (node:internal/child_process:305:5) {
  code: 1,
  killed: false,
  signal: null,
  cmd: '<redacted>/node_modules/@sentry/cli-darwin/bin/sentry-cli releases finalize master_#<commit_hash|redacted>'
}

Node.js v20.11.0
$ // the webpack build process exists here, but Sentry keeps on outputting stuff to console

> Bundling completed in 0.612s
> Bundled 56 files for upload
> Bundle ID: <bundle-id>
> Optimizing completed in 0.026s
> Uploading completed in 4.244s
> Uploaded files to Sentry
> Processing completed in 0.362s
> File upload complete (processing pending on server)
> Organization: <org|redacted>
> Project: <project|redacted>
> Release: master_#<commit_hash|redacted>
> Dist: None
> Upload type: artifact bundle

Source Map Upload Report
  Minified Scripts
    ~/0a80963b-f30e-43ec-8fe9-47046e23ff4b-66.js (sourcemap at 549.6572e883.chunk.js.map, debug id 0a80963b-f30e-43ec-8fe9-47046e23ff4b)
    // ... more of those
    ~/ff0bc065-3cfc-4715-90a4-56968bbd92b9-55.js (sourcemap at 459.b0d32cc7.chunk.js.map, debug id ff0bc065-3cfc-4715-90a4-56968bbd92b9)
Source Maps
    ~/0a80963b-f30e-43ec-8fe9-47046e23ff4b-66.js.map (debug id 0a80963b-f30e-43ec-8fe9-47046e23ff4b)
    // ... more of those
    ~/ff0bc065-3cfc-4715-90a4-56968bbd92b9-55.js.map (debug id ff0bc065-3cfc-4715-90a4-56968bbd92b9)
@alesmenzel
Copy link
Author

It is a duplicate of #392 and #289, but both have been closed without a FIX.

@alesmenzel
Copy link
Author

The [sentry-webpack-plugin] Debug: Could not determine debug ID went away after cleaning the dist/ before the build, so that's unrelated.

@alipek
Copy link

alipek commented Mar 1, 2024

I have same problem from 2 days in project without changes in code and configurations.
When I run old jobs on CI pipelines Error was throw randomly on same code and configuration between many created jobs.

@rodolfoBee
Copy link
Member

rodolfoBee commented Mar 4, 2024

This error seems to be related to the release name containing #, i can easily reproduce and solve by changing it to - or another separator.

Another workaround is to not finalise the release by setting release.finalize to false

@lforst
Copy link
Member

lforst commented Mar 4, 2024

@alipek Can you also verify that this is due to some special characters in the release name?

@rodolfoBee
Copy link
Member

Another workaround is to not finalise the release by setting release.finalize to false

Updating on the workaround: please try renaming the release. further testing with finalize:false had issues uploading source maps to my release.

@suekou
Copy link

suekou commented Aug 1, 2024

I encountered the same error while using Next.js. In my case, the issue was that a team member had changed the project name in Sentry, and the next.config.js file created during the Sentry setup with npx @sentry/wizard@latest -i nextjs still referenced the old project name. If you've changed the project name, I recommend checking your configuration files to ensure they don't still contain the old project name.

@lforst
Copy link
Member

lforst commented Aug 1, 2024

@szokeasaurusrex maybe we can improve the error message in Sentry CLI?

Suggestion:

error: Release not found. Verify that you have configured the right organization and project for this operation.

@szokeasaurusrex
Copy link
Member

@lforst good idea, I agree that many of the Sentry CLI error messages are too vague. getsentry/sentry-cli#2111.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: No status
Status: Waiting for: Community
Development

No branches or pull requests

8 participants