Puppeteer: .metadata is not an object
The browser-cache metadata JSON is not an object.
The browser-cache metadata JSON is not an object.
Error message
.metadata is not an object
How this error happens
The browser cache’s .metadata file must contain structured JSON. A valid JSON string is still the wrong type for that file.
The failing block is JSON content, not a Puppeteer program.
"damaged-cache-metadata"
How to fix
Use a separate cache for package-managed installation instead of manually inventing metadata or clearing the whole old cache.
PUPPETEER_CACHE_DIR=/absolute/path/new-browser-cache \
npx puppeteer browsers install
Things to keep in mind
The first block illustrates the malformed file contents; reading that cache entry triggers the error. Launch with the same new cache location. Preserve and inspect the damaged entry before removing only that entry.