Error in github actions after adding Sentry to project

Hello there! I am trying to get Sentry.io working in my app. Currently, I’ve done the following:

  1. I installed sentry and the sentry webpack plugin like so:
npm install --save @sentry/browser @sentry/tracing
npm install @sentry/webpack-plugin --save-dev
  1. I put the code into my main.ts file like so:
import * as Sentry from '@sentry/browser';
import { Integrations } from '@sentry/tracing';

Sentry.init({
	dsn: 'https://xxx@xxx.ingest.sentry.io/xxx',
	integrations: [new Integrations.BrowserTracing()],

	// Set tracesSampleRate to 1.0 to capture 100%
	// of transactions for performance monitoring.
	// We recommend adjusting this value in production
	tracesSampleRate: 1.0,
});
  1. I added a .sentryclirc file with the following:
const SentryCliPlugin = require('@sentry/webpack-plugin');

const config = {
	plugins: [
		new SentryCliPlugin({
			include: '.',
			ignoreFile: '.sentrycliignore',
			ignore: ['node_modules', 'webpack.config.js'],
			configFile: 'sentry.properties',
		}),
	],
};
  1. I created a purposeful error in my code like so:
console.log(whatever);

I get the results in Sentry (wahoo!). However, looks like the JS in Sentry looks like so:

webpack-internal:///./node_modules/cache-loader/dist/cjs.js?!./node_modules/babel-loader/lib/index.js!./node_modules/cache-loader/dist/cjs.js?!./node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist/index.js?!./src/views/Home.vue?vue&type=script&lang=js

webpack-internal:///./node_modules/@vue/runtime-core/dist/runtime-core.esm-bundler.js in callWithErrorHandling at line 279:22

webpack-internal:///./node_modules/@vue/runtime-core/dist/runtime-core.esm-bundler.js in callWithAsyncErrorHandling at line 288:21

webpack-internal:///./node_modules/@vue/runtime-core/dist/runtime-core.esm-bundler.js in Array.hook.__weh.hook.__weh at line 3024:29

webpack-internal:///./node_modules/@vue/runtime-core/dist/runtime-core.esm-bundler.js in flushPostFlushCbs at line 479:47

webpack-internal:///./node_modules/@vue/runtime-core/dist/runtime-core.esm-bundler.js in flushJobs at line 515:9

Would like to fix this. My other issue is Github Actions and Ionic AppFlow (similar to Github Actions) both fail now with the same type of error:

> @sentry/cli@1.70.1 install /home/runner/work/jetfoil-mobile-app/jetfoil-mobile-app/node_modules/@sentry/cli
> node scripts/install.js

info sentry-cli Downloading from https://downloads.sentry-cdn.com/sentry-cli/1.70.1/sentry-cli-Linux-x86_64
fetching sentry-cli-Linux-x86_64 1%
fetching sentry-cli-Linux-x86_64 2%
fetching sentry-cli-Linux-x86_64 3%
fetching sentry-cli-Linux-x86_64 4%
fetching sentry-cli-Linux-x86_64 5%
fetching sentry-cli-Linux-x86_64 6%
fetching sentry-cli-Linux-x86_64 7%
fetching sentry-cli-Linux-x86_64 8%
fetching sentry-cli-Linux-x86_64 9%
fetching sentry-cli-Linux-x86_64 10%
fetching sentry-cli-Linux-x86_64 11%
fetching sentry-cli-Linux-x86_64 12%
fetching sentry-cli-Linux-x86_64 13%
fetching sentry-cli-Linux-x86_64 14%
fetching sentry-cli-Linux-x86_64 15%
fetching sentry-cli-Linux-x86_64 16%
fetching sentry-cli-Linux-x86_64 17%
fetching sentry-cli-Linux-x86_64 18%
fetching sentry-cli-Linux-x86_64 19%
fetching sentry-cli-Linux-x86_64 20%
fetching sentry-cli-Linux-x86_64 21%
fetching sentry-cli-Linux-x86_64 22%
fetching sentry-cli-Linux-x86_64 23%
fetching sentry-cli-Linux-x86_64 24%
fetching sentry-cli-Linux-x86_64 25%
fetching sentry-cli-Linux-x86_64 26%
fetching sentry-cli-Linux-x86_64 27%
fetching sentry-cli-Linux-x86_64 28%
fetching sentry-cli-Linux-x86_64 29%
fetching sentry-cli-Linux-x86_64 30%
fetching sentry-cli-Linux-x86_64 31%
fetching sentry-cli-Linux-x86_64 32%
fetching sentry-cli-Linux-x86_64 33%
fetching sentry-cli-Linux-x86_64 34%
fetching sentry-cli-Linux-x86_64 35%
fetching sentry-cli-Linux-x86_64 36%
fetching sentry-cli-Linux-x86_64 37%
fetching sentry-cli-Linux-x86_64 38%
fetching sentry-cli-Linux-x86_64 39%
fetching sentry-cli-Linux-x86_64 40%
fetching sentry-cli-Linux-x86_64 41%
fetching sentry-cli-Linux-x86_64 42%
fetching sentry-cli-Linux-x86_64 43%
fetching sentry-cli-Linux-x86_64 44%
fetching sentry-cli-Linux-x86_64 45%
fetching sentry-cli-Linux-x86_64 46%
fetching sentry-cli-Linux-x86_64 47%
fetching sentry-cli-Linux-x86_64 48%
fetching sentry-cli-Linux-x86_64 49%
fetching sentry-cli-Linux-x86_64 50%
fetching sentry-cli-Linux-x86_64 51%
fetching sentry-cli-Linux-x86_64 52%
fetching sentry-cli-Linux-x86_64 53%
fetching sentry-cli-Linux-x86_64 54%
fetching sentry-cli-Linux-x86_64 55%
fetching sentry-cli-Linux-x86_64 56%
fetching sentry-cli-Linux-x86_64 57%
fetching sentry-cli-Linux-x86_64 58%
fetching sentry-cli-Linux-x86_64 59%
fetching sentry-cli-Linux-x86_64 60%
fetching sentry-cli-Linux-x86_64 61%
fetching sentry-cli-Linux-x86_64 62%
fetching sentry-cli-Linux-x86_64 63%
fetching sentry-cli-Linux-x86_64 64%
fetching sentry-cli-Linux-x86_64 65%
fetching sentry-cli-Linux-x86_64 66%
fetching sentry-cli-Linux-x86_64 67%
fetching sentry-cli-Linux-x86_64 68%
fetching sentry-cli-Linux-x86_64 69%
fetching sentry-cli-Linux-x86_64 70%
fetching sentry-cli-Linux-x86_64 71%
fetching sentry-cli-Linux-x86_64 72%
fetching sentry-cli-Linux-x86_64 73%
fetching sentry-cli-Linux-x86_64 74%
fetching sentry-cli-Linux-x86_64 75%
fetching sentry-cli-Linux-x86_64 76%
fetching sentry-cli-Linux-x86_64 77%
fetching sentry-cli-Linux-x86_64 78%
fetching sentry-cli-Linux-x86_64 79%
fetching sentry-cli-Linux-x86_64 80%
fetching sentry-cli-Linux-x86_64 81%
fetching sentry-cli-Linux-x86_64 82%
fetching sentry-cli-Linux-x86_64 83%
fetching sentry-cli-Linux-x86_64 84%
fetching sentry-cli-Linux-x86_64 85%
fetching sentry-cli-Linux-x86_64 86%
fetching sentry-cli-Linux-x86_64 87%
fetching sentry-cli-Linux-x86_64 88%
fetching sentry-cli-Linux-x86_64 89%
fetching sentry-cli-Linux-x86_64 90%
fetching sentry-cli-Linux-x86_64 91%
fetching sentry-cli-Linux-x86_64 92%
fetching sentry-cli-Linux-x86_64 93%
fetching sentry-cli-Linux-x86_64 94%
fetching sentry-cli-Linux-x86_64 95%
fetching sentry-cli-Linux-x86_64 96%
fetching sentry-cli-Linux-x86_64 97%
fetching sentry-cli-Linux-x86_64 98%
fetching sentry-cli-Linux-x86_64 99%
fetching sentry-cli-Linux-x86_64 100%
Error: Command failed: /home/runner/work/jetfoil-mobile-app/jetfoil-mobile-app/node_modules/@sentry/cli/sentry-cli --version
error: 12:0 expecting "[Some('='), Some(':')]" but found EOF.
thread 'unnamed' panicked at 'Config not bound yet': src/config.rs:85

   0: backtrace::capture::Backtrace::create


npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @sentry/cli@1.70.1 install: `node scripts/install.js`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the @sentry/cli@1.70.1 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

Any idea what is happening?

Ok I figured out my problem. I had the wrong information in the wrong file.

Step 3 of .sentryclirc should have been:

[defaults]
project=yoursentryproject
org=yoursentryorg

[auth]
token=sentrytoken

And I needed another step for a vue.config.js (instead of webpack.config.js) with the following:

/* eslint-disable @typescript-eslint/no-var-requires */

const Package = require('./package.json');
const SentryWebpackPlugin = require('@sentry/webpack-plugin');
const plugins = [
	new SentryWebpackPlugin({
		include: './dist',
		ignoreFile: '.sentrycliignore',
		ignore: ['node_modules', 'vue.config.js'],
    release: Package.version
	}),
];
module.exports = {
	configureWebpack: {
    devtool: 'source-map',
		plugins,
	},
};

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.