0

I'm trying to enable Google Cloud Profiler into my Node.js application running on App Engine Flexible environment. The profiler is working, I get generated profile.

In the log of my App Engine application, I got this error:

@google-cloud/profiler Failed to initialize SourceMapper. Source map support has been disabled: Error: An error occurred while processing the source map filesError: An error occurred while reading the sourceMap file /app/dist/index.js.map: Error: You must provide the URL of lib/mappings.wasm by calling SourceMapConsumer.initialize({ 'lib/mappings.wasm': ... }) before using SourceMapConsumer

I'm using the official npm package.

I've tried searching SO to find a solution and can't find.

Does anyone have any idea on how to fix this issue?

Using version 12.18.3 of Node.JS - Using version 4.1.0 of @google-cloud/profiler

  • I found [an issue](https://github.com/GoogleChrome/workbox/issues/2712) similar to the logs you've shown but I can't reproduce your problem. May I know what are your dependencies? Also please include the Node version you've specified on package.json – Donnald Cucharo Feb 24 '21 at 04:38
  • @DonnaldCucharo I've updated the initial post. I have a lot of dependencies but the issue really seems related to @google-cloud/profiler – Charles-olivier Demers Feb 24 '21 at 16:53
  • I looked into the [profiler source code](https://github.com/googleapis/cloud-profiler-nodejs/blob/master/src/profiler.ts#L356) and found that the source map support is disabled when there are problems encountered. Since there's a problem reading your source map file, I noticed is that there's a [certain process](https://github.com/mozilla/source-map/blob/master/lib/read-wasm.js) that is changed depending on your package.json config. I suggest opening a new issue on Cloud Profiler GitHub repo with reproducible code – Donnald Cucharo Feb 25 '21 at 04:58

0 Answers0