Closed mrnagydavid closed 4 years ago
Hey David,
First of all thanks for the detailed error description 👍
I think you are missing the release
option in your config, that's why your crash is not associated to a release and therefore it could be that also the stack trace is not correctly mapped.
You have to do something like this
config('DSN', {
release: 'SENTRY_VERSION'
});
I came back to see if there was any follow up to my response just to see that my message is missing. I have no idea how. I even included a screenshot :(
So, I did as you told me and included the release version in the source code. That really did the trick and now the issues appear under the given release.
However, the stack trace still shows the javascript code. :(
Any update on this ? Seems we can't get typescript + sourcemaps + sentry working.
I tried on @sentry/node and @sentry/browser 5.0.0. In my case the release is existing, match the code and contains the source file + source maps.
Source code was not found for app:///.next/server/static/ZYVS41NqhScfHuannaVZL/pages/_document.js
even if ~/.next/server/static/ZYVS41NqhScfHuannaVZL/pages/_document.js.map
and ~/.next/server/static/ZYVS41NqhScfHuannaVZL/pages/_document.js
are existing.
Thanks !
I am confused by this output:
> Analyzing 14 sources
> Rewriting sources
> Adding source map references
> Uploading source maps for release 59c587b77
Source Map Upload Report
Minified Scripts
~/0.59c587b77.chunk.js (sourcemap at 0.59c587b77.map)
- warning: could not determine a source map reference (Could not auto-detect referenced sourcemap for ~/0.59c587b77.chunk.js.)
~/1.59c587b77.chunk.js (sourcemap at 1.59c587b77.map)
- warning: could not determine a source map reference (Could not auto-detect referenced sourcemap for ~/1.59c587b77.chunk.js.)
~/2.59c587b77.chunk.js (sourcemap at 2.59c587b77.map)
- warning: could not determine a source map reference (Could not auto-detect referenced sourcemap for ~/2.59c587b77.chunk.js.)
~/attribution.bundle.js (sourcemap at attribution.59c587b77.map)
- warning: could not determine a source map reference (Could not auto-detect referenced sourcemap for ~/attribution.bundle.js.)
~/manifest.59c587b77.bundle.js (sourcemap at manifest.59c587b77.map)
- warning: could not determine a source map reference (Could not auto-detect referenced sourcemap for ~/manifest.59c587b77.bundle.js.)
~/vendor.59c587b77.bundle.js (sourcemap at vendor.59c587b77.map)
- warning: could not determine a source map reference (Could not auto-detect referenced sourcemap for ~/vendor.59c587b77.bundle.js.)
~/webApp.59c587b77.bundle.js (sourcemap at webApp.59c587b77.map)
- warning: could not determine a source map reference (Could not auto-detect referenced sourcemap for ~/webApp.59c587b77.bundle.js.)
Source Maps
~/0.59c587b77.map
~/1.59c587b77.map
~/2.59c587b77.map
~/attribution.59c587b77.map
~/manifest.59c587b77.map
~/vendor.59c587b77.map
~/webApp.59c587b77.map
WPK | Webpack finished bundling.
From the output, the source map files are right next to the minified files, and yet it says a source map reference could not be found. What gives?
I'm facing the Same problem described by @heisian
Any updates regarding this? We're facing the same issue (on React Native and Node SDKs) and can't figure out how to solve.
Log displays list of files that has been referenced in all sourcemaps. It doesn't mean that they're available on a disk. And according to the log, it's not the case. Is someone able to provide a repro-case I could use to debug this?
Closing the issue as there seems to be no viable reproduction of the issue. Please do not hesitate to ping me if it is still relevant, and I will happily reopen and work on it. Cheers!
@HazAT, a little help, please. I noticed a lot of unanswered issues of a similar kind and a lot of issues where you didn't get a reply from OP. I won't disappear. Let's figure this out!
The problem is: the errors received in Sentry don't get mapped to the original .ts, but shown only in the transpiled .js. I was following the https://docs.sentry.io/clients/node/typescript/.
Our stack is Typescript using tsc and no webpack, no uglify etc. The folder structure is simple:
tsconfig.json
relevant settings:src/index.ts
is the only file in the test repo:As per suggested by https://docs.sentry.io/clients/node/typescript/.
This produces the
index.js
and theindex.js.map
:We use Codeship, so I use
jet
andgetsentry/sentry-cli:latest
attaching the project root to/work
:codeship-steps.yml
:And finally the relevant commands in
sentry-release.sh
run inside the docker container:With this setup running
jet steps --tag sentry
the sourcemaps get uploaded without a warning (both index.js and index.js.map), and the new release is registered on the dashboard.When I run
node build/index.js
it throws an error that gets registered by Sentry. It is never assigned to the release I uploaded, but only appears on the mainIssues
page. And there:The only divergences from the sentry tutorial is that I use 'build' instead of 'dist' and I am not using a global root, because there is only one file, the entry file.
When I changed
app:///
to just~/
, then the two errors disappeared from theEvent
block, but the Error stack trace is still displaying the .js file instead of the sourcemapped .ts.How to move on?
Thanks, David