question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

missing sourcemap?

See original GitHub issue

Hi there,

I have an Electron (11) project in which Im using an opensource library named electron-store which requires the library conf which requires finally ajv.

It seems that on the last updates something happened with the sourcemap of ajv and I started to get the following errors:

DevTools failed to load SourceMap: Could not parse content for app://./Applications/MyApp.app/Contents/Resources/app.asar/node_modules/conf/node_modules/ajv/dist/ajv.js.map: Unexpected end of JSON input
DevTools failed to load SourceMap: Could not parse content for app://./Applications/MyApp.app/Contents/Resources/app.asar/node_modules/conf/node_modules/ajv/dist/compile/context.js.map: Unexpected end of JSON input
DevTools failed to load SourceMap: Could not parse content for app://./Applications/MyApp.app/Contents/Resources/app.asar/node_modules/conf/node_modules/ajv/dist/compile/validate/dataType.js.map: Unexpected end of JSON input
DevTools failed to load SourceMap: Could not parse content for app://./Applications/MyApp.app/Contents/Resources/app.asar/node_modules/conf/node_modules/ajv/dist/compile/rules.js.map: Unexpected end of JSON input
DevTools failed to load SourceMap: Could not parse content for app://./Applications/MyApp.app/Contents/Resources/app.asar/node_modules/conf/node_modules/ajv/dist/compile/validate/applicability.js.map: Unexpected end of JSON input
DevTools failed to load SourceMap: Could not parse content for app://./Applications/MyApp.app/Contents/Resources/app.asar/node_modules/conf/node_modules/ajv/dist/compile/errors.js.map: Unexpected end of JSON input
DevTools failed to load SourceMap: Could not parse content for app://./Applications/MyApp.app/Contents/Resources/app.asar/node_modules/conf/node_modules/ajv/dist/compile/codegen/index.js.map: Unexpected end of JSON input
DevTools failed to load SourceMap: Could not parse content for app://./Applications/MyApp.app/Contents/Resources/app.asar/node_modules/conf/node_modules/ajv/dist/compile/codegen/code.js.map: Unexpected end of JSON input
DevTools failed to load SourceMap: Could not parse content for app://./Applications/MyApp.app/Contents/Resources/app.asar/node_modules/conf/node_modules/ajv/dist/compile/codegen/scope.js.map: Unexpected end of JSON input
DevTools failed to load SourceMap: Could not parse content for app://./Applications/MyApp.app/Contents/Resources/app.asar/node_modules/conf/node_modules/ajv/dist/compile/names.js.map: Unexpected end of JSON input
DevTools failed to load SourceMap: Could not parse content for app://./Applications/MyApp.app/Contents/Resources/app.asar/node_modules/conf/node_modules/ajv/dist/compile/util.js.map: Unexpected end of JSON input
DevTools failed to load SourceMap: Could not parse content for app://./Applications/MyApp.app/Contents/Resources/app.asar/node_modules/conf/node_modules/ajv/dist/compile/validate/index.js.map: Unexpected end of JSON input
DevTools failed to load SourceMap: Could not parse content for app://./Applications/MyApp.app/Contents/Resources/app.asar/node_modules/conf/node_modules/ajv/dist/compile/validate/boolSchema.js.map: Unexpected end of JSON input
DevTools failed to load SourceMap: Could not parse content for app://./Applications/MyApp.app/Contents/Resources/app.asar/node_modules/conf/node_modules/ajv/dist/compile/validate/iterate.js.map: Unexpected end of JSON input
DevTools failed to load SourceMap: Could not parse content for app://./Applications/MyApp.app/Contents/Resources/app.asar/node_modules/conf/node_modules/ajv/dist/compile/validate/defaults.js.map: Unexpected end of JSON input
DevTools failed to load SourceMap: Could not parse content for app://./Applications/MyApp.app/Contents/Resources/app.asar/node_modules/conf/node_modules/ajv/dist/compile/validate/keyword.js.map: Unexpected end of JSON input
DevTools failed to load SourceMap: Could not parse content for app://./Applications/MyApp.app/Contents/Resources/app.asar/node_modules/conf/node_modules/ajv/dist/vocabularies/code.js.map: Unexpected end of JSON input
DevTools failed to load SourceMap: Could not parse content for app://./Applications/MyApp.app/Contents/Resources/app.asar/node_modules/conf/node_modules/ajv/dist/compile/subschema.js.map: Unexpected end of JSON input
DevTools failed to load SourceMap: Could not parse content for app://./Applications/MyApp.app/Contents/Resources/app.asar/node_modules/conf/node_modules/ajv/dist/compile/resolve.js.map: Unexpected end of JSON input
DevTools failed to load SourceMap: Could not parse content for app://./Applications/MyApp.app/Contents/Resources/app.asar/node_modules/uri-js/dist/es5/uri.all.js.map: Unexpected end of JSON input
DevTools failed to load SourceMap: Could not parse content for app://./Applications/MyApp.app/Contents/Resources/app.asar/node_modules/conf/node_modules/ajv/dist/core.js.map: Unexpected end of JSON input
DevTools failed to load SourceMap: Could not parse content for app://./Applications/MyApp.app/Contents/Resources/app.asar/node_modules/conf/node_modules/ajv/dist/compile/error_classes.js.map: Unexpected end of JSON input

Is there a configuration fix/workaround for that (beside going into electron’s devtools and clearing or filtering these warnings)?

What version of Ajv are you using? Does the issue happen if you use the latest version? this issue happens on the versions mentioned here below, note that ajv is a depndency of a dependency of a dependency 🙃

"electron-store": "7.0.2" ----------------------------- > requires "conf": "^9.0.0" -------------------------------------------------------------> requires "ajv": "^7.0.3", "ajv-formats": "^1.5.1"

Your code (usage inside electron-store -> conf library) https://github.com/sindresorhus/conf/blob/ce1dcee195e95cbd71493b1dfd6efcf7fe185a51/source/index.ts#L97-L108

Thanks!

Issue Analytics

  • State:open
  • Created 2 years ago
  • Reactions:5
  • Comments:15

github_iconTop GitHub Comments

1reaction
fzf404commented, May 15, 2022

i have the same problem

1reaction
lsagetlethiascommented, Nov 22, 2021

Hello ! Any update on this one? Has someone found a trick of any kind?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Angular 12 source map is missing in browser - Stack Overflow
I am on Angular 13 and I'm struggling to get the sourceMaps in order to debug. Anyone has had the issue on the...
Read more >
Missing/broken sourcemaps for JS modules w/ imports when ...
IntelliJ/WebStorm/VSCode seems to be unable to properly debug local JavaScript files when debugging JS modules imported into Vue components in a ...
Read more >
Source map errors — Firefox Source Docs documentation
The source map resource can be missing or inaccessible. Source map file is missing. The fix here is to make sure the file...
Read more >
4 Reasons Why Your Source Maps are Broken - Sentry Blog
Missing or incorrect source map directive · Missing original source files · Bad source maps caused by multiple transformations · Files are ...
Read more >
Devtool - webpack
devtool performance production quality (none) build: fastest rebuild: fastest yes bundle eval build: fast rebuild: fastest no generated eval‑cheap‑source‑map build: ok rebuild: fast no transformed
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found