Base64 encoded Source Maps support

Hey guys,

does anyone know or have any experience in using Base64 encoded sourcemaps with Sentry? These are inlined in our generated JS files (from TypeScript) and contain the original TS file content.

We use gulp sourcemaps to generate these but when we use Raven.captureException(e);, the sourcemaps are not used.

Thanks!

Is this actually part of the specification?

We definitely have support for this in code, but I’ve never seen it used in practice.

@martinambrus if you’re a sentry.io customer, would you mind contacting support and linking to an issue where this didn’t work?

@matt I’m trialling Sentry on a free account, so customer support is not available to me.

Also, perhaps I should mention that we use Raven client for NodeJS to send exceptions, errors and messages to Sentry. We do not manually upload our sourcemaps, which is the only way I found in docs to use source maps so far.

I was basically hoping that, since I already see the JS source code in Sentry along with the message I send, that Sentry would be able to parse the source of that JS file, find the last line with source map and decode it. If that’s not the case, is uploading a decoded source map the only way to use this functionality?

This is a sample JS file source which has a source map at the end:

"use strict";
/**
 * Created by Jan Kanajlo <kanajlo@jablotron.cz> on 16.12.2016.
 */
const OPERATION_RESULT = {
    ERROR: 'ERROR',
    OK: 'OK',
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = OPERATION_RESULT;

//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9jb25zdGFudC9vcGVyYXRpb25SZXN1bHQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBOztHQUVHO0FBQ0gsTUFBTSxnQkFBZ0IsR0FBRztJQUNyQixLQUFLLEVBQUUsT0FBTztJQUNkLEVBQUUsRUFBRSxJQUFJO0NBQ1gsQ0FBQzs7QUFFRixrQkFBZSxnQkFBZ0IsQ0FBQyIsImZpbGUiOiJjb25zdGFudC9vcGVyYXRpb25SZXN1bHQuanMiLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIENyZWF0ZWQgYnkgSmFuIEthbmFqbG8gPGthbmFqbG9AamFibG90cm9uLmN6PiBvbiAxNi4xMi4yMDE2LlxuICovXG5jb25zdCBPUEVSQVRJT05fUkVTVUxUID0ge1xuICAgIEVSUk9SOiAnRVJST1InLFxuICAgIE9LOiAnT0snLFxufTtcblxuZXhwb3J0IGRlZmF1bHQgT1BFUkFUSU9OX1JFU1VMVDsiXX0=

Ah, then in this case, the problem is Node. We don’t support sourcemaps for Node yet. Which is why none of this is working for you.