arduino/Arduino · error · IOException
'Missing '' + p + '' from library'
Error message
'Missing '' + p + '' from library'
What it means
UserLibrary.create() checks that library.properties declares every key in Constants.LIBRARY_MANDATORY_PROPERTIES (name, version, author, maintainer, sentence, paragraph etc.). If any mandatory property is absent from the parsed properties map, an IOException naming the missing key is thrown so the library cannot be loaded.
Source
Thrown at arduino-core/src/processing/app/packages/UserLibrary.java:97
// Library sanity checks
// ---------------------
// Compatibility with 1.5 rev.1 libraries:
// "email" field changed to "maintainer"
if (!properties.containsKey("maintainer") && properties.containsKey("email")) {
properties.put("maintainer", properties.get("email"));
}
// Compatibility with 1.5 rev.1 libraries:
// "arch" folder no longer supported
File archFolder = new File(libFolder, "arch");
if (archFolder.isDirectory())
throw new IOException("'arch' folder is no longer supported! See http://goo.gl/gfFJzU for more information");
// Check mandatory properties
for (String p : Constants.LIBRARY_MANDATORY_PROPERTIES)
if (!properties.containsKey(p))
throw new IOException("Missing '" + p + "' from library");
// Check layout
LibraryLayout layout;
File srcFolder = new File(libFolder, "src");
if (srcFolder.exists() && srcFolder.isDirectory()) {
// Layout with a single "src" folder and recursive compilation
layout = LibraryLayout.RECURSIVE;
} else {
// Layout with source code on library's root and "utility" folders
layout = LibraryLayout.FLAT;
}
// Warn if root folder contains development leftovers
File[] files = libFolder.listFiles();
if (files == null) {
throw new IOException("Unable to list files of library in " + libFolder);
}View on GitHub (pinned to a0df6e0e83)
Solutions
- Open <library>/library.properties and add the missing key reported in the message (name, version, author, maintainer, sentence, paragraph, url...)
- Validate the manifest with the Arduino library-spec checklist or arduino-lint
- Re-download/reinstall the library if library.properties was truncated or corrupted
- Run the arduino-library-manager formatter (Arduino IDE: convert legacy library) to generate a complete library.properties
Example fix
// before name=MyLib version=1.0.0 // after (complete manifest) name=MyLib version=1.0.0 author=Jane Doe maintainer=Jane Doe <jane@example.com> sentence=Does something useful. paragraph=Longer description. url=https://example.com/mylib
Defensive patterns
Strategy: validation
Validate before calling
Properties props = new Properties();
props.load(new FileInputStream(new File(libFolder, "library.properties")));
for (String p : Constants.LIBRARY_MANDATORY_PROPERTIES)
if (!props.containsKey(p)) throw new IllegalStateException("Missing " + p); Try / catch
try {
UserLibrary lib = UserLibrary.create(libFolder);
} catch (IOException e) {
if (e.getMessage().startsWith("Missing '")) {
String key = e.getMessage().replace("Missing '", "").replace("' from library", "");
// append key to library.properties
}
} Prevention
- Keep a template library.properties with all mandatory fields
- Run arduino-lint or the IDE's library spec checker before publishing
- Never hand-edit library.properties without re-validating it
When it happens
Trigger: Calling UserLibrary.create(libFolder) on a library whose library.properties (or.properties file for flat layouts) is missing one or more mandatory keys, or where the properties file could not be parsed into those keys.
Common situations: Hand-writing a library.properties and forgetting a required field like 'sentence' or 'maintainer'; converting a legacy library to 1.5 format with an incomplete manifest; corrupted or truncated library.properties after a bad download.
Understand the failure class
Background: "is required", "must be set", "missing required field": configuration validation errors across open-source libraries — this error's family across 36 libraries.
Related errors
- no headers files (.h) found in {0}
- 'arch' folder is no longer supported! See http://goo.gl/gfFJ
- 'Unable to list files of library in ' + libFolder
- Board is not selected
- Can't download {0}: invalid filename or exinsting directory
AI-assisted analysis of arduino/Arduino@a0df6e0e83 (2026-09-06).
Data as JSON: /api/errors/42eb34c85142540e.
Report an issue: GitHub.