PlatformIO Community

ManifestParserError: Could not parse manifest

I somewhat randomly started getting this error when trying to build my project. I was having trouble uploading a project to a board so I decided to try and upload a different project to the same board in a troubleshooting effort but now I can’t even build the code :man_shrugging:.

I am getting the following error:

ManifestParserError: Could not parse manifest -> Expecting value: line 2 column 1 (char 1):
  File "/Users/scottcampbell/.platformio/penv/lib/python3.6/site-packages/platformio/builder/main.py", line 151:
    env.SConscript("$BUILD_SCRIPT")
  File "/Users/scottcampbell/.platformio/packages/tool-scons/script/../engine/SCons/Script/SConscript.py", line 605:
    return _SConscript(self.fs, *files, **subst_kw)
  File "/Users/scottcampbell/.platformio/packages/tool-scons/script/../engine/SCons/Script/SConscript.py", line 286:
    exec(compile(scriptdata, scriptname, 'exec'), call_stack[-1].globals)
  File "/Users/scottcampbell/.platformio/platforms/ststm32/builder/main.py", line 91:
    target_elf = env.BuildProgram()
  File "/Users/scottcampbell/.platformio/packages/tool-scons/script/../engine/SCons/Environment.py", line 224:
    return self.method(*nargs, **kwargs)
  File "/Users/scottcampbell/.platformio/penv/lib/python3.6/site-packages/platformio/builder/tools/platformio.py", line 140:
    _build_project_deps(env)
  File "/Users/scottcampbell/.platformio/penv/lib/python3.6/site-packages/platformio/builder/tools/platformio.py", line 48:
    project_lib_builder = env.ConfigureProjectLibBuilder()
  File "/Users/scottcampbell/.platformio/packages/tool-scons/script/../engine/SCons/Environment.py", line 224:
    return self.method(*nargs, **kwargs)
  File "/Users/scottcampbell/.platformio/penv/lib/python3.6/site-packages/platformio/builder/tools/piolib.py", line 1029:
    lib_builders = env.GetLibBuilders()
  File "/Users/scottcampbell/.platformio/packages/tool-scons/script/../engine/SCons/Environment.py", line 224:
    return self.method(*nargs, **kwargs)
  File "/Users/scottcampbell/.platformio/penv/lib/python3.6/site-packages/platformio/builder/tools/piolib.py", line 954:
    lb = LibBuilderFactory.new(env, lib_dir)
  File "/Users/scottcampbell/.platformio/penv/lib/python3.6/site-packages/platformio/builder/tools/piolib.py", line 54:
    obj = getattr(sys.modules[__name__], clsname)(env, path, verbose=verbose)
  File "/Users/scottcampbell/.platformio/penv/lib/python3.6/site-packages/platformio/builder/tools/piolib.py", line 111:
    self._manifest = manifest if manifest else self.load_manifest()
  File "/Users/scottcampbell/.platformio/penv/lib/python3.6/site-packages/platformio/builder/tools/piolib.py", line 662:
    return ManifestParserFactory.new_from_file(manifest_path).as_dict()
  File "/Users/scottcampbell/.platformio/penv/lib/python3.6/site-packages/platformio/package/manifest/parser.py", line 67:
    return ManifestParserFactory.new(get_file_contents(path), t, remote_url)
  File "/Users/scottcampbell/.platformio/penv/lib/python3.6/site-packages/platformio/package/manifest/parser.py", line 117:
    return globals()[clsname](contents, remote_url, package_dir)
  File "/Users/scottcampbell/.platformio/penv/lib/python3.6/site-packages/platformio/package/manifest/parser.py", line 127:
    raise ManifestParserError("Could not parse manifest -> %s" % e)

Anyone have any ideas?

For anyone else who comes across this, check all your open-source libraries you are using in the lib folder for their library.json file and ensure they are valid JSON files.

2 Likes