ajv: missing sourcemap?

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!

About this issue

  • Original URL
  • State: open
  • Created 3 years ago
  • Reactions: 7
  • Comments: 15

Most upvoted comments

i have the same problem

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

i also have this warnings with latest versions electron-store 8.0.1 conf 10.0.3 ajv 8.6.3

@sindresorhus thanks for the update!

unfortunately, it seems as conf -> ajv still generates these warnings. 😞

DevTools failed to load SourceMap: Could not load content for http://localhost:8080/Users/myUser/projects/my_test_repo/node_modules/conf/node_modules/ajv/dist/ajv.js.map: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE
DevTools failed to load SourceMap: Could not load content for http://localhost:8080/Users/myUser/projects/my_test_repo/node_modules/conf/node_modules/ajv/dist/core.js.map: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE
DevTools failed to load SourceMap: Could not load content for http://localhost:8080/Users/myUser/projects/my_test_repo/node_modules/conf/node_modules/ajv/dist/compile/validate/index.js.map: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE
DevTools failed to load SourceMap: Could not load content for http://localhost:8080/Users/myUser/projects/my_test_repo/node_modules/conf/node_modules/ajv/dist/compile/validate/boolSchema.js.map: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE
DevTools failed to load SourceMap: Could not load content for http://localhost:8080/Users/myUser/projects/my_test_repo/node_modules/conf/node_modules/ajv/dist/compile/errors.js.map: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE
DevTools failed to load SourceMap: Could not load content for http://localhost:8080/Users/myUser/projects/my_test_repo/node_modules/conf/node_modules/ajv/dist/compile/codegen/index.js.map: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE
DevTools failed to load SourceMap: Could not load content for http://localhost:8080/Users/myUser/projects/my_test_repo/node_modules/conf/node_modules/ajv/dist/compile/codegen/code.js.map: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE
DevTools failed to load SourceMap: Could not load content for http://localhost:8080/Users/myUser/projects/my_test_repo/node_modules/conf/node_modules/ajv/dist/compile/codegen/scope.js.map: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE
DevTools failed to load SourceMap: Could not load content for http://localhost:8080/Users/myUser/projects/my_test_repo/node_modules/conf/node_modules/ajv/dist/compile/util.js.map: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE
DevTools failed to load SourceMap: Could not load content for http://localhost:8080/Users/myUser/projects/my_test_repo/node_modules/conf/node_modules/ajv/dist/compile/names.js.map: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE
DevTools failed to load SourceMap: Could not load content for http://localhost:8080/Users/myUser/projects/my_test_repo/node_modules/conf/node_modules/ajv/dist/compile/rules.js.map: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE
DevTools failed to load SourceMap: Could not load content for http://localhost:8080/Users/myUser/projects/my_test_repo/node_modules/conf/node_modules/ajv/dist/compile/validate/dataType.js.map: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE
DevTools failed to load SourceMap: Could not load content for http://localhost:8080/Users/myUser/projects/my_test_repo/node_modules/conf/node_modules/ajv/dist/compile/validate/applicability.js.map: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE
DevTools failed to load SourceMap: Could not load content for http://localhost:8080/Users/myUser/projects/my_test_repo/node_modules/conf/node_modules/ajv/dist/compile/validate/defaults.js.map: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE
DevTools failed to load SourceMap: Could not load content for http://localhost:8080/Users/myUser/projects/my_test_repo/node_modules/conf/node_modules/ajv/dist/compile/validate/keyword.js.map: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE
DevTools failed to load SourceMap: Could not load content for http://localhost:8080/Users/myUser/projects/my_test_repo/node_modules/conf/node_modules/ajv/dist/vocabularies/code.js.map: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE
DevTools failed to load SourceMap: Could not load content for http://localhost:8080/Users/myUser/projects/my_test_repo/node_modules/conf/node_modules/ajv/dist/compile/validate/subschema.js.map: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE
DevTools failed to load SourceMap: Could not load content for http://localhost:8080/Users/myUser/projects/my_test_repo/node_modules/conf/node_modules/ajv/dist/compile/resolve.js.map: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE
DevTools failed to load SourceMap: Could not load content for http://localhost:8080/Users/myUser/projects/my_test_repo/node_modules/uri-js/dist/es5/uri.all.js.map: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE
DevTools failed to load SourceMap: Could not load content for http://localhost:8080/Users/myUser/projects/my_test_repo/node_modules/conf/node_modules/ajv/dist/runtime/validation_error.js.map: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE
DevTools failed to load SourceMap: Could not load content for http://localhost:8080/Users/myUser/projects/my_test_repo/node_modules/conf/node_modules/ajv/dist/compile/ref_error.js.map: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE
DevTools failed to load SourceMap: Could not load content for http://localhost:8080/Users/myUser/projects/my_test_repo/node_modules/conf/node_modules/ajv/dist/compile/index.js.map: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE
DevTools failed to load SourceMap: Could not load content for http://localhost:8080/Users/myUser/projects/my_test_repo/node_modules/conf/node_modules/ajv/dist/vocabularies/core/index.js.map: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE
DevTools failed to load SourceMap: Could not load content for http://localhost:8080/Users/myUser/projects/my_test_repo/node_modules/conf/node_modules/ajv/dist/vocabularies/validation/index.js.map: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE
DevTools failed to load SourceMap: Could not load content for http://localhost:8080/Users/myUser/projects/my_test_repo/node_modules/conf/node_modules/ajv/dist/vocabularies/draft7.js.map: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE
DevTools failed to load SourceMap: Could not load content for http://localhost:8080/Users/myUser/projects/my_test_repo/node_modules/conf/node_modules/ajv/dist/vocabularies/core/id.js.map: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE
DevTools failed to load SourceMap: Could not load content for http://localhost:8080/Users/myUser/projects/my_test_repo/node_modules/conf/node_modules/ajv/dist/vocabularies/core/ref.js.map: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE
DevTools failed to load SourceMap: Could not load content for http://localhost:8080/Users/myUser/projects/my_test_repo/node_modules/conf/node_modules/ajv/dist/vocabularies/validation/limitNumber.js.map: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE
DevTools failed to load SourceMap: Could not load content for http://localhost:8080/Users/myUser/projects/my_test_repo/node_modules/conf/node_modules/ajv/dist/vocabularies/validation/multipleOf.js.map: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE
DevTools failed to load SourceMap: Could not load content for http://localhost:8080/Users/myUser/projects/my_test_repo/node_modules/conf/node_modules/ajv/dist/vocabularies/validation/limitLength.js.map: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE
DevTools failed to load SourceMap: Could not load content for http://localhost:8080/Users/myUser/projects/my_test_repo/node_modules/conf/node_modules/ajv/dist/runtime/ucs2length.js.map: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE
DevTools failed to load SourceMap: Could not load content for http://localhost:8080/Users/myUser/projects/my_test_repo/node_modules/conf/node_modules/ajv/dist/vocabularies/validation/pattern.js.map: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE
DevTools failed to load SourceMap: Could not load content for http://localhost:8080/Users/myUser/projects/my_test_repo/node_modules/conf/node_modules/ajv/dist/vocabularies/validation/limitProperties.js.map: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE
DevTools failed to load SourceMap: Could not load content for http://localhost:8080/Users/myUser/projects/my_test_repo/node_modules/conf/node_modules/ajv/dist/vocabularies/validation/required.js.map: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE
DevTools failed to load SourceMap: Could not load content for http://localhost:8080/Users/myUser/projects/my_test_repo/node_modules/conf/node_modules/ajv/dist/vocabularies/validation/limitItems.js.map: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE
DevTools failed to load SourceMap: Could not load content for http://localhost:8080/Users/myUser/projects/my_test_repo/node_modules/conf/node_modules/ajv/dist/vocabularies/validation/uniqueItems.js.map: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE
DevTools failed to load SourceMap: Could not load content for http://localhost:8080/Users/myUser/projects/my_test_repo/node_modules/conf/node_modules/ajv/dist/runtime/equal.js.map: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE
DevTools failed to load SourceMap: Could not load content for http://localhost:8080/Users/myUser/projects/my_test_repo/node_modules/conf/node_modules/ajv/dist/vocabularies/validation/const.js.map: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE
DevTools failed to load SourceMap: Could not load content for http://localhost:8080/Users/myUser/projects/my_test_repo/node_modules/conf/node_modules/ajv/dist/vocabularies/validation/enum.js.map: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE
DevTools failed to load SourceMap: Could not load content for http://localhost:8080/Users/myUser/projects/my_test_repo/node_modules/conf/node_modules/ajv/dist/vocabularies/applicator/index.js.map: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE
DevTools failed to load SourceMap: Could not load content for http://localhost:8080/Users/myUser/projects/my_test_repo/node_modules/conf/node_modules/ajv/dist/vocabularies/applicator/additionalItems.js.map: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE
DevTools failed to load SourceMap: Could not load content for http://localhost:8080/Users/myUser/projects/my_test_repo/node_modules/conf/node_modules/ajv/dist/vocabularies/applicator/prefixItems.js.map: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE
DevTools failed to load SourceMap: Could not load content for http://localhost:8080/Users/myUser/projects/my_test_repo/node_modules/conf/node_modules/ajv/dist/vocabularies/applicator/items.js.map: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE
DevTools failed to load SourceMap: Could not load content for http://localhost:8080/Users/myUser/projects/my_test_repo/node_modules/conf/node_modules/ajv/dist/vocabularies/applicator/items2020.js.map: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE
DevTools failed to load SourceMap: Could not load content for http://localhost:8080/Users/myUser/projects/my_test_repo/node_modules/conf/node_modules/ajv/dist/vocabularies/applicator/contains.js.map: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE
DevTools failed to load SourceMap: Could not load content for http://localhost:8080/Users/myUser/projects/my_test_repo/node_modules/conf/node_modules/ajv/dist/vocabularies/applicator/dependencies.js.map: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE
DevTools failed to load SourceMap: Could not load content for http://localhost:8080/Users/myUser/projects/my_test_repo/node_modules/conf/node_modules/ajv/dist/vocabularies/applicator/propertyNames.js.map: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE
DevTools failed to load SourceMap: Could not load content for http://localhost:8080/Users/myUser/projects/my_test_repo/node_modules/conf/node_modules/ajv/dist/vocabularies/applicator/additionalProperties.js.map: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE
DevTools failed to load SourceMap: Could not load content for http://localhost:8080/Users/myUser/projects/my_test_repo/node_modules/conf/node_modules/ajv/dist/vocabularies/applicator/properties.js.map: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE
DevTools failed to load SourceMap: Could not load content for http://localhost:8080/Users/myUser/projects/my_test_repo/node_modules/conf/node_modules/ajv/dist/vocabularies/applicator/patternProperties.js.map: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE
DevTools failed to load SourceMap: Could not load content for http://localhost:8080/Users/myUser/projects/my_test_repo/node_modules/conf/node_modules/ajv/dist/vocabularies/applicator/not.js.map: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE
DevTools failed to load SourceMap: Could not load content for http://localhost:8080/Users/myUser/projects/my_test_repo/node_modules/conf/node_modules/ajv/dist/vocabularies/applicator/anyOf.js.map: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE
DevTools failed to load SourceMap: Could not load content for http://localhost:8080/Users/myUser/projects/my_test_repo/node_modules/conf/node_modules/ajv/dist/vocabularies/applicator/oneOf.js.map: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE
DevTools failed to load SourceMap: Could not load content for http://localhost:8080/Users/myUser/projects/my_test_repo/node_modules/conf/node_modules/ajv/dist/vocabularies/applicator/allOf.js.map: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE
DevTools failed to load SourceMap: Could not load content for http://localhost:8080/Users/myUser/projects/my_test_repo/node_modules/conf/node_modules/ajv/dist/vocabularies/applicator/thenElse.js.map: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE
DevTools failed to load SourceMap: Could not load content for http://localhost:8080/Users/myUser/projects/my_test_repo/node_modules/conf/node_modules/ajv/dist/vocabularies/format/index.js.map: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE
DevTools failed to load SourceMap: Could not load content for http://localhost:8080/Users/myUser/projects/my_test_repo/node_modules/conf/node_modules/ajv/dist/vocabularies/format/format.js.map: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE
DevTools failed to load SourceMap: Could not load content for http://localhost:8080/Users/myUser/projects/my_test_repo/node_modules/conf/node_modules/ajv/dist/vocabularies/applicator/if.js.map: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE
DevTools failed to load SourceMap: Could not load content for http://localhost:8080/Users/myUser/projects/my_test_repo/node_modules/conf/node_modules/ajv/dist/vocabularies/metadata.js.map: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE
DevTools failed to load SourceMap: Could not load content for http://localhost:8080/Users/myUser/projects/my_test_repo/node_modules/conf/node_modules/ajv/dist/vocabularies/discriminator/index.js.map: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE
DevTools failed to load SourceMap: Could not load content for http://localhost:8080/Users/myUser/projects/my_test_repo/node_modules/conf/node_modules/ajv/dist/vocabularies/discriminator/types.js.map: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE
DevTools failed to load SourceMap: Could not load content for http://localhost:8080/Users/myUser/projects/my_test_repo/node_modules/conf/node_modules/ajv-formats/dist/index.js.map: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE
DevTools failed to load SourceMap: Could not load content for http://localhost:8080/Users/myUser/projects/my_test_repo/node_modules/conf/node_modules/ajv-formats/dist/formats.js.map: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE
DevTools failed to load SourceMap: Could not load content for http://localhost:8080/Users/myUser/projects/my_test_repo/node_modules/conf/node_modules/ajv-formats/dist/limit.js.map: HTTP error: status code 404, 

*I’m using conf inside a webworker, from an Electron project if that helps.