I'm using webpack to build my app and it works locally with #sentry/webpack-plugin – it autogenerates the release and uploads the sourcemaps to Sentry.
However, if I'm trying to build the same app on Heroku it gives me the following error:
Error: Command failed: /tmp/build_e3ae44a78c063d6493d3fdfc983bd8d6/client/node_modules/#sentry/cli/sentry-cli releases propose-version
INFO 2019-04-16 13:33:13.141611957 +00:00 Loaded config from /tmp/build_e3ae44a78c063d6493d3fdfc983bd8d6/client/.sentryclirc
DEBUG 2019-04-16 13:33:13.141666891 +00:00 sentry-cli version: 1.41.0, platform: "linux", architecture: "x86_64"
INFO 2019-04-16 13:33:13.141684793 +00:00 sentry-cli was invoked with the following command line: "/tmp/build_e3ae44a78c063d6493d3fdfc983bd8d6/client/node_modules/#sentry/cli/sentry-cli" "releases" "propose-version"
DEBUG 2019-04-16 13:33:13.141916192 +00:00 error: running update nagger
DEBUG 2019-04-16 13:33:13.141939514 +00:00 skipping update nagger because session is not attended
error: Could not automatically determine release name
DEBUG 2019-04-16 13:33:13.142576118 +00:00 client close; no transport to shut down (from sentry)
at ChildProcess.exithandler (child_process.js:289:12)
at ChildProcess.emit (events.js:182:13)
at maybeClose (internal/child_process.js:962:16)
at Socket.stream.socket.on (internal/child_process.js:381:11)
at Socket.emit (events.js:182:13)
at Pipe._handle.close (net.js:606:12)
What am I doing wrong?
You can fix this by manually specifying the release name in the plugin config:
const version = require('../VERSION').version;
webpackConfig.plugins.push(new SentryWebpackPlugin({
include: '../src',
ignoreFile: '.sentrycliignore',
ignore: ['node_modules', 'webpack.config.js'],
configFile: '.sentryclirc',
release: version
}));
We use a module called release-it to build a VERSION file when we run npm run release. Here's the .release-it.json config file we use for that:
{
"non-interactive": true,
"npm": {
"publish": false
},
"use": "git.tag",
"pkgFiles": null,
"scripts": {
"afterBump": "echo module.exports = {version: \"'\"${version}\"'\"} > $(git rev-parse --show-toplevel)/VERSION"
},
"git": {
"commitMessage": "release: v${version}",
"requireCleanWorkingDir": false,
"tagName": "v${version}"
}
}
I had the same issue when I build with a slow internet connection.
Also, check if the API token you are using have the write permission in https://sentry.io/settings/account/api/auth-tokens/
Related
I have this weird error when Cypress GitHub Action can't successfully complete whilst CLI command is doing just fine.
Here is how I tried to do it originally with GitHub Action:
- name: Run acceptance tests with Cypress 📝
uses: cypress-io/github-action#v2
with:
working-directory: e2e
browser: chrome
record: true
parallel: true
start: npm run start-server
wait-on: 'http://localhost:1080'
wait-on-timeout: 360
env:
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
MIX_ENV: acceptance_tests
DEBUG: '#cypress/github-action'
Here is my cypress.json config - you can see that wait-on and baseUrl are pointing to the same URL:
{
"testFiles": "**/*.feature",
"projectId": "...",
"baseUrl": "http://localhost:1080"
}
And the fun fact is that app under test responds to at least one request!
arning: 2022-05-18T21:04:34.089Z #cypress/github-action Separated 1 start commands npm run app_server
start server "npm run app_server command "npm run app_server"
current working directory "/__w/mimisbrunnr/mimisbrunnr/e2e"
2022-05-18T21:04:34.090Z #cypress/github-action parsed command: npm run app_server
waiting on "http://localhost:1080" with timeout of 60 seconds
Warning: 2022-05-18T21:04:34.091Z #cypress/github-action Waiting for urls http://localhost:1080
2022-05-18T21:04:34.092Z #cypress/github-action Waiting for url http://localhost:1080
Warning: 2022-05-18T21:04:34.092Z #cypress/github-action total ping timeout 90000
2022-05-18T21:04:34.092Z #cypress/github-action individual ping timeout 30000ms
Warning: 2022-05-18T21:04:34.092Z #cypress/github-action retries limit 3
2022-05-18T21:04:34.107Z #cypress/github-action got error {"name":"RequestError","code":"ECONNREFUSED","timings":{"start":1652907874098,"socket":1652907874099,"lookup":1652907874100,"error":1652907874101,"phases":{"wait":1,"dns":1,"total":3}}}
Warning: 2022-05-18T21:04:34.107Z #cypress/github-action 15ms undefined undefined ECONNREFUSED attempt 1
2022-05-18T21:04:34.108Z #cypress/github-action found command "/usr/local/bin/npm"
Warning: 2022-05-18T21:04:34.108Z #cypress/github-action with arguments run app_server
2022-05-18T21:04:34.108Z #cypress/github-action running "/usr/local/bin/npm" run app_server in /__w/mimisbrunnr/mimisbrunnr/e2e
Warning: 2022-05-18T21:04:34.108Z #cypress/github-action waiting for the command to finish? false
/usr/local/bin/npm run app_server
> gjallarhorn#1.0.0 app_server
> cd ../main && mix phx.server
here it comes ->
warning: the VM is running with native name encoding of latin1 which may cause Elixir to malfunction as it expects utf8. Please ensure your locale is set to UTF-8 (which can be verified by running "locale" in your shell)
2022-05-18T21:04:35.109Z #cypress/github-action got error {"name":"RequestError","code":"ECONNREFUSED","timings":{"start":1652907875108,"socket":1652907875108,"lookup":1652907875108,"error":1652907875109,"phases":{"wait":0,"dns":0,"total":1}}}
Warning: 2022-05-18T21:04:35.109Z #cypress/github-action 1017ms undefined undefined ECONNREFUSED attempt 2
21:04:35.419 [info] Running MimisbrunnrWeb.Endpoint with cowboy 2.9.0 at 127.0.0.1:1080 (http)
21:04:35.428 [info] Access MimisbrunnrWeb.Endpoint at http://localhost:1080
[+] Starting static assets build with esbuild. Build mode development...
[+] Starting static assets build with esbuild. Build mode development...
21:04:36.251 request_id=FvBO9LpFQLx0rPYAAAFx [info] GET /
21:04:36.339 request_id=FvBO9LpFQLx0rPYAAAFx [info] Sent 200 in 87ms
2022-05-18T21:04:36.348Z #cypress/github-action pinging http://localhost:1080 has finished ok after 2256ms
but even though cypress successfully pinged the main app the party is still over
Warning: 2022-05-18T21:04:36.349Z #cypress/github-action Running Cypress tests using NPM module API
2022-05-18T21:04:36.349Z #cypress/github-action requiring cypress dependency, cwd is /__w/mimisbrunnr/mimisbrunnr
Warning: 2022-05-18T21:04:36.349Z #cypress/github-action working directory /__w/mimisbrunnr/mimisbrunnr/e2e
2022-05-18T21:04:36.351Z #cypress/github-action resolved cypress /__w/mimisbrunnr/mimisbrunnr/e2e/node_modules/cypress/index.js
Warning: 2022-05-18T21:04:36.721Z #cypress/github-action Cypress config "pageLoadTimeout=100000,baseUrl=http://localhost:1080"
2022-05-18T21:04:36.722Z #cypress/github-action Determining build id by asking GitHub about run 2348169225
Warning: 2022-05-18T21:04:36.841Z #cypress/github-action Resource not accessible by integration
2022-05-18T21:04:36.841Z #cypress/github-action HttpError: Resource not accessible by integration
Warning: at /__w/_actions/cypress-io/github-action/v2/dist/index.js:58740:21
at processTicksAndRejections (internal/process/task_queues.js:97:5)
Warning: at async getCiBuildId (/__w/_actions/cypress-io/github-action/v2/dist/index.js:6230:18)
at async runTests (/__w/_actions/cypress-io/github-action/v2/dist/index.js:6468:33)
Error: Resource not accessible by integration
Ok. Fair enough, but look - it's all fine with a simple CLI command run through start-server-and-test. Here is the relevant part of the package.json:
"scripts": {
"test": "cypress run",
"start-server": "cd ../main && mix phx.server",
"ci": "start-server-and-test start-server http://localhost:1080 test"
}
and GitHub Action step:
- name: Run acceptance tests with Cypress
run: npm run ci
working-directory: e2e
env:
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
MIX_ENV: acceptance_tests
START_SERVER_AND_TEST_INSECURE: 1
DEBUG: start-server-and-test
and logs:
making HTTP(S) head request to url:http://localhost:1080 ...
21:40:36.375 request_id=FvBQ66vDSZ10rPYAAAES [info] HEAD /
21:40:36.548 request_id=FvBQ66vDSZ10rPYAAAES [info] Sent 200 in 172ms
HTTP(S) result for http://localhost:1080: {
Warning: status: 200,
statusText: 'OK',
headers: {
'cache-control': 'max-age=0, private, must-revalidate',
connection: 'close',
'content-length': '3910',
'content-type': 'text/html; charset=utf-8',
'cross-origin-window-policy': 'deny',
date: 'Wed, 18 May 2022 21:40:36 GMT',
Warning: server: 'Cowboy',
'x-content-type-options': 'nosniff',
'x-download-options': 'noopen',
'x-frame-options': 'SAMEORIGIN',
'x-permitted-cross-domain-policies': 'none',
'x-request-id': 'FvBQ66vDSZ10rPYAAAES',
'x-xss-protection': '1; mode=block',
'set-cookie': [
'_app_web_key=SFMyNTY.g3QAAAABbQAAAAtfY3NyZl90b2tlbm0AAAAYdmc0cXlvMkVha3JhcS1hVEJpalFxQ0J5.28LG5PrAPHrEQfvD1fpHR2-pLeEDgRrZkox8--yxP9M; path=/; HttpOnly'
]
},
data: ''
}
2022-05-18T21:40:36.564Z start-server-and-test waitOn finished successfully
Warning: 2022-05-18T21:40:36.565Z start-server-and-test running test script command: npm run test
wait-on(3361) complete
[+] Esbuild /__w/mimisbrunnr/mimisbrunnr/main/apps/mimisbrunnr_web/assets/js/app.js to /__w/mimisbrunnr/mimisbrunnr/main/apps/mimisbrunnr_web/priv/static/assets/app.js succeeded.
[+] Esbuild /__w/mimisbrunnr/mimisbrunnr/main/apps/mimisbrunnr_web/assets/css/app.scss to /__w/mimisbrunnr/mimisbrunnr/main/apps/mimisbrunnr_web/priv/static/assets/app.css succeeded.
> gjallarhorn#1.0.0 test
> cypress run
[3631:0518/214038.922826:ERROR:gpu_init.cc(453)] Passthrough is not supported, GL is swiftshader, ANGLE is
mail server at port 7777
====================================================================================================
(Run Starting)
┌────────────────────────────────────────────────────────────────────────────────────────────────┐
│ Cypress: 9.6.0 │
│ Browser: Electron 94 (headless) │
│ Node Version: v16.14.0 (/usr/local/bin/node) │
│ Specs: 2 found (patient_dashboard.feature, sign_up.feature) │
└────────────────────────────────────────────────────────────────────────────────────────────────┘
So my question is what exactly resource is not accessible by the integration?
Having trouble to launch Firefox browser from Protractor. getting error
E/launcher - Unable to create new service: GeckoDriverService
Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:25:53'
Most probable reason is your driver version and browser are mismatched.
I'm using geckodriver-v0.28.0.exe and browser version is 83.0 (64-bit)
Config:
jvmArgs: [
'-Dwebdriver.gecko.driver=./src/driver/geckodriver-v0.28.0.exe'
],
directConnect: false,
multiCapabilities: [
{
browserName: 'firefox'
}
],
Situation
Our front-end app is hosted by Heroku.
I followed this tutorial: https://docs.sentry.io/guides/integrate-frontend/
Package.json scripts:
"scripts": {
"build": "REACT_APP_RELEASE=`./node_modules/.bin/sentry-cli releases propose-version --log-level=debug` REACT_APP_STAGE=production react-app-rewired build && make setup_release",
"start": "REACT_APP_RELEASE=`./node_modules/.bin/sentry-cli releases propose-version --log-level=debug` REACT_APP_STAGE=production serve -s ./build",
... irrelevant scripts
},
Makefile
SENTRY_AUTH_TOKEN=<sentry_auth_token>
SENTRY_ORG=<sentry_org>
SENTRY_PROJECT=<sentry_project>
VERSION=`./node_modules/.bin/sentry-cli releases propose-version --log-level=debug`
PREFIX=static/js
setup_release: create_release upload_sourcemaps
create_release:
./node_modules/.bin/sentry-cli releases -o $(SENTRY_ORG) new -p $(SENTRY_PROJECT) $(VERSION) --log-level=debug
upload_sourcemaps:
./node_modules/.bin/sentry-cli releases -o $(SENTRY_ORG) -p $(SENTRY_PROJECT) files $(VERSION) \
upload-sourcemaps --url-prefix "~/$(PREFIX)" --validate build/$(PREFIX) --log-level=debug
Local test
Running npm run build locally works competely fine. Gives something like this:
Source Map Upload Report
Minified Scripts
~/static/js/0.5d07aaef.chunk.js (sourcemap at 0.5d07aaef.chunk.js.map)
~/static/js/1.baafde2d.chunk.js (sourcemap at 1.baafde2d.chunk.js.map)
...
... more entries
...
~/static/js/main.8b1cab7e.chunk.js (sourcemap at main.8b1cab7e.chunk.js.map)
~/static/js/runtime~main.b6cf63c4.js (sourcemap at runtime~main.b6cf63c4.js.map)
Source Maps
~/static/js/0.5d07aaef.chunk.js.map
~/static/js/15.5b79a308.chunk.js.map
...
... more entries
...
~/static/js/9.44f0809a.chunk.js.map
~/static/js/main.8b1cab7e.chunk.js.map
Heroku deploy test
Running the deploy sequence on Heroku gives the following:
remote: -----> Build
remote: Running build
remote:
remote: > <heroku_project_name>#0.1.0 build /tmp/build_43aa3bf4ce7530858abaf7fc0103a317
remote: > REACT_APP_RELEASE=`./node_modules/.bin/sentry-cli releases propose-version --log-level=debug` REACT_APP_STAGE=production react-app-rewired build && make setup_release
remote:
remote: INFO 2019-10-15 10:29:17.592182558 +00:00 Loaded config from /tmp/build_43aa3bf4ce7530858abaf7fc0103a317/.sentryclirc
remote: DEBUG 2019-10-15 10:29:17.592238531 +00:00 sentry-cli version: 1.48.0, platform: "linux", architecture: "x86_64"
remote: INFO 2019-10-15 10:29:17.592260636 +00:00 sentry-cli was invoked with the following command line: "/tmp/build_43aa3bf4ce7530858abaf7fc0103a317/node_modules/#sentry/cli/sentry-cli" "releases" "propose-version" "--log-level=debug"
remote: DEBUG 2019-10-15 10:29:17.592446409 +00:00 error: running update nagger
remote: DEBUG 2019-10-15 10:29:17.592465389 +00:00 skipping update nagger because session is not attended
remote: error: Could not automatically determine release name
remote: DEBUG 2019-10-15 10:29:17.592964391 +00:00 client close; no transport to shut down (from sentry)
What is this update nagger thing? Why is it causing this error?
I am learning graphql and following this tutorial https://www.howtographql.com/react-apollo/1-getting-started/
i have installed prisma using npm install -g prisma and while running this command prisma deploy in server folder iam getting this error:
config CWD /Users/aravind/tekie/hackernews-react-apollo/server +0ms
config HOME /Users/aravind +2ms
config definitionDir /Users/aravind/tekie/hackernews-react-apollo/server/database +5ms
config definitionPath /Users/aravind/tekie/hackernews-react-apollo/server/database/prisma.yml +0ms
cli { isGlobal: true } +0ms
StatusChecker setting status checker +0ms
cli command id deploy +7ms
cli:plugincache Got plugin from cache +0ms
cli:plugincache /Users/aravind/Library/Caches/prisma/plugins.json +1ms
cli:plugincache Got plugin from cache +1ms
cli:plugincache /Users/aravind/Library/Caches/prisma/plugins.json +0ms
plugins findCommand prisma-cli-core +0ms
plugin requiring command +0ms
cli-engine:plugins:manager requiring /usr/local/lib/node_modules/prisma/node_modules/prisma-cli-core +0ms
portfinder:defaultHosts exports._defaultHosts is: [ '0.0.0.0', '127.0.0.1', '::1', 'fe80::1', 'fe80::18fb:a4af:2b44:3fea', '192.168.43.100', '2405:204:6209:18b0:144f:bac3:86ac:3cdf', '2405:204:6209:18b0:fd46:e3b7:952f:d569', 'fe80::1c49:3cff:fe5f:7e16', 'fe80::3e5f:ab5d:16dd:a8bf' ] +0ms
cli-engine:plugins:manager required +538ms
plugin required command +540ms
StatusChecker setting status checker +569ms
Error: Cluster undefined does not exist.
at Deploy.<anonymous> (/usr/local/lib/node_modules/prisma/node_modules/prisma-cli-core/src/commands/deploy/index.ts:175:13)
at step (/usr/local/lib/node_modules/prisma/node_modules/prisma-cli-core/dist/commands/deploy/index.js:42:23)
at Object.next (/usr/local/lib/node_modules/prisma/node_modules/prisma-cli-core/dist/commands/deploy/index.js:23:53)
at fulfilled (/usr/local/lib/node_modules/prisma/node_modules/prisma-cli-core/dist/commands/deploy/index.js:14:58)
at <anonymous>
util timed out +0ms
Exiting with code: 0
up to this all the set-up was correct and I am unable to run this command. Any help is appreciated.
I also witnessed the same problem that you identified while trying to deploy the service, following the same tutorial.
I stumbled upon the "solution" from the tutorial writer itself, in this GitHub issue:
The current version of the tutorial just works with Prisma CLI
versions < 1.7, so be sure you have some 1.6.x version installed. You
can check your current prisma version with this command:
prisma version
Then uninstall and install the correct version like this:
npm uninstall -g prisma
npm install -g prisma#1.6.3
Can you run with yarn prisma deploy after download yarn not using npm prisma deploy
I've got a problem with my CI setup.
Since a couple of days Firefox doesn't run our Jasmine tests with Karma anymore.
But Chrome does - so the error should not depend on the tests themselves.
On my development environment it runs as well.
I did not change anything on the CI-server (Ubuntu).
What happens:
Firefox is connecting to the web-server and establishes a session.
But the tests are not executed.
What I already tried:
I already changed the timeout.
I already restarted the machine (a couple of times).
And I already reinstalled firefox.
Do you have an idea, what causes this strange behaviour or how I can debug this?
We are using
karma#0.12.37
karma-jasmine#0.3.5
karma-firefox-launcher#0.1.6
Firefox v.38.0
Ubuntu
nodejs v.0.10.25
npm v 1.3.10
Xvfb
karma.conf.js
module.exports = function(config) {
config.set({
browserNoActivityTimeout: 100000,
basePath: 'src/main/webapp/',
singleRun: true,
// autoWatch: true,
logLevel: config.LOG_DEBUG,
files: [
'assets/libs/jquery/dist/jquery.min.js',
'assets/libs/angular/angular.min.js',
'assets/libs/angular-mocks/angular-mocks.js',
'assets/libs/**/*.min.js',
'app/app.js',
'app/**/*.js',
'app/directives/*/*.html',
'app/directives/*/*.js',
'../../test/frontend/**/*.js', {
pattern: 'assets/libs/**/*.map',
included: false
},
'app/views/*.html'
],
preprocessors: {
'app/views/*.html': 'ng-html2js',
'app/directives/*/*.html': 'ng-html2js'
},
frameworks: ['jasmine'],
browsers: [
'Firefox'
],
plugins: [
'karma-chrome-launcher',
'karma-firefox-launcher',
'karma-safari-launcher',
'karma-ie-launcher',
'karma-jasmine',
'karma-junit-reporter',
'karma-ng-html2js-preprocessor'
],
reporters: ['progress', 'junit'],
junitReporter: {
outputFile: '../../../build/test-results/karma-test-results.xml'
},
ngHtml2JsPreprocessor: {
moduleName: 'myc-templates'
}
});
};
Output of 'xvfb-run karma start'
INFO [karma]: Karma v0.12.37 server started at http://localhost:9876/
INFO [launcher]: Starting browser Firefox
DEBUG [temp-dir]: Creating temp dir at /tmp/karma-70931573
DEBUG [launcher]: firefox http://localhost:9876/?id=70931573 -profile /tmp/karma-70931573 -no-remote
DEBUG [web-server]: serving: /var/lib/jenkins/jobs/MYC/workspace/node_modules/karma/static/client.html
DEBUG [web-server]: serving: /var/lib/jenkins/jobs/MYC/workspace/node_modules/karma/static/karma.js
DEBUG [web-server]: serving: /var/lib/jenkins/jobs/MYC/workspace/node_modules/karma/static/favicon.ico
DEBUG [web-server]: upgrade /socket.io/1/websocket/5wtT2gW7_XuaTRZ3Gctt
DEBUG [karma]: A browser has connected on socket 5wtT2gW7_XuaTRZ3Gctt
INFO [Firefox 38.0.0 (Ubuntu 0.0.0)]: Connected on socket 5wtT2gW7_XuaTRZ3Gctt with id 70931573
DEBUG [launcher]: Firefox (id 70931573) captured in 3.542 secs
DEBUG [web-server]: serving: /var/lib/jenkins/jobs/MYC/workspace/node_modules/karma/static/context.html
DEBUG [Firefox 38.0.0 (Ubuntu 0.0.0)]: Disconnected during run, waiting 2000ms for reconnecting.
WARN [Firefox 38.0.0 (Ubuntu 0.0.0)]: Disconnected (1 times)
DEBUG [karma]: Run complete, exiting.
DEBUG [launcher]: Disconnecting all browsers
DEBUG [reporter.junit]: JUnit results written to "/var/lib/jenkins/jobs/MYC/workspace/build/test-results/karma-test-results.xml".
DEBUG [launcher]: Process Firefox exited with code 0
DEBUG [temp-dir]: Cleaning temp dir /tmp/karma-70931573
npm ERR! weird error 1
npm WARN This failure might be due to the use of legacy binary "node"
npm WARN For further explanations, please read
/usr/share/doc/nodejs/README.Debian
npm ERR! not ok code 0
Any tipps or ideas how to solve this are very much appreciated ;-)
Thanks, Sebastian