Puppeteer: A malformed download URL was found: {value}.
The download URL does not yield an archive filename.
The download URL does not yield an archive filename.
Error message
A malformed download URL was found: {value}.
{value} is replaced by the value shown in your error message.
How this error happens
A custom browser provider returned a directory URL ending with /. The installer needs a final archive filename to choose its local archive path.
The class illustrates the provider passed to a standalone browser install call; it does not launch a page.
import {
DefaultProvider,
} from "@puppeteer/browsers";
class MirrorProvider extends DefaultProvider {
getDownloadUrl() {
return new URL(
"https://mirror.example/"
);
}
}
When the installer tries the first provider, the URL’s last path component is empty. Defining the class alone does not throw the error.
How to fix
Return the actual supported browser archive URL rather than a directory.
class MirrorProvider extends DefaultProvider {
getDownloadUrl() {
return new URL(
"https://mirror.example/chrome-linux64.zip"
);
}
}
Things to keep in mind
Replace the example mirror with a trusted source serving the correct browser archive. The URL alone does not prove integrity or compatibility. A failed custom-provider attempt can be hidden by a successful default-provider fallback.