Some links on this page are affiliate links: if you buy through them we may earn a commission, at no extra cost to you.
If protractor-html-screenshot-reporter creates neither an HTML report nor screenshots, do not assume one universal bug. The historical symptom—“no HTML or screenshots are saved to folder”—can result from a reporter that was never registered, a missing or unwritable path, tests that produced no eligible screenshots, custom builders, or an old Protractor stack. Work through the checks below in order, then collect versions, logs, configuration, test outcomes, and the exact expected and actual paths before escalating.
What the reporter is supposed to create
The package is a Jasmine reporter used from Protractor’s onPrepare hook. Its documented output includes a summary HTML page, stack-trace information, JSON metadata, and PNG screenshots. The package is built on protractor-screenshot-reporter, whose README describes PNG images with matching JSON metadata. A missing directory alone is not conclusive: the documentation says the base directory is created when a screenshot needs to be stored, so no directory may simply mean that no eligible screenshot was produced.
The package’s upstream project is marked unmaintained and GitHub archived it on January 26, 2023. That is a maintenance warning, not proof that your particular versions are incompatible. Treat every diagnosis as version- and environment-specific.
1. Confirm installation and module resolution
Install the package in the same project and working directory used by the Protractor command:
#1 Best Overall
npm install protractor-html-screenshot-reporter --save-dev
Then verify that Node can resolve it from that project:
node -e "console.log(require.resolve('protractor-html-screenshot-reporter'))"
If require.resolve fails, check that:
- you ran
npm installin the project containing the Protractor configuration; - the command is using the expected checkout, container, or CI workspace;
node_moduleswas installed after the lockfile was restored; and- the package name is spelled exactly.
The documented import is:
var HtmlReporter = require('protractor-html-screenshot-reporter');
If this line throws, fix installation or module resolution before investigating output files. Registry search results list version 0.0.21 as very old; that is a legacy signal, not a verified compatibility matrix.
2. Register the reporter in the configuration that actually runs
Use the smallest documented setup first. The constructor requires baseDirectory:
Quick wins for a faster PC:
Repair Windows errors before they cause bigger problemsFix Now →Fix the driver behind crashes, sound loss and screen glitchesFind Drivers →var HtmlReporter = require('protractor-html-screenshot-reporter');
exports.config = {
framework: 'jasmine',
specs: ['specs/**/*.js'],
onPrepare: function () {
jasmine.getEnv().addReporter(new HtmlReporter({
baseDirectory: '/tmp/protractor-report'
}));
}
};
Replace the path with an absolute directory that the process can write. During diagnosis, avoid relative paths because the current working directory may differ between a laptop, npm script, Docker container, and CI runner.
Confirm all of the following:
- The Protractor command names this configuration file (for example, the file passed with
--config). - The
onPreparefunction is reached; add a temporary console message if necessary. - Jasmine is the active framework. This integration is documented for Jasmine’s reporter API.
- The process user can create and write the chosen directory.
A successful require does not prove that the reporter was registered: a different config file, a misspelled hook, or another test runner can leave the suite running without this reporter.
3. Check whether this run should produce screenshots
Screenshot creation depends on test outcomes and reporter options. The documented defaults are important:
| Setting | Default | Effect |
|---|---|---|
takeScreenShotsForSkippedSpecs |
false |
Skipped specs do not receive screenshots unless enabled. |
takeScreenShotsOnlyForFailedSpecs |
false |
With true, passing tests still get a report, but no screenshot. |
First prove that specs really executed. A run that discovers no specs, exits during setup, or marks everything skipped may not create the files you expect. Compare the test summary with the capture settings.
The Tool Desk
Outbyte PC Repair FREEClear out junk files and repair common Windows errorsFree Scan →Outbyte Driver Updater FREEFix the driver behind crashes, sound loss and screen glitchesFind Drivers →Rank #2
- HTML CSS Design and Build Web Sites
- Comes with secure packaging
- It can be a gift option
For a diagnostic run, explicitly choose the behavior you want:
onPrepare: function () {
jasmine.getEnv().addReporter(new HtmlReporter({
baseDirectory: '/tmp/protractor-report',
takeScreenShotsForSkippedSpecs: true,
takeScreenShotsOnlyForFailedSpecs: false
}));
}
Do not leave these options enabled merely because they produce more files; select them according to whether you need evidence for skipped, failed, or all executed specs.
4. Simplify optional configuration
Once the minimal setup works, add custom behavior one option at a time. Documented extension points and options include:
pathBuilder, which controls where artifacts are placed;metaDataBuilder, which changes JSON metadata;docTitleanddocName;cssOverrideFile;preserveDirectory; and- the skipped-spec and failed-only screenshot switches.
The documented defaults are report.html for the report name, Generated test report for the document title, and false for preserveDirectory. Temporarily remove custom pathBuilder and metaDataBuilder functions. The default GUID-based path behavior and README example provide a known baseline. Then restore one customization, run one or two specs, and inspect the resulting path before adding the next.
This isolation method does not establish that either builder is defective; it separates reporter registration and filesystem behavior from application-specific callbacks.
5. Verify filesystem paths and CI artifact handling
Use a path that is both absolute and writable by the account running WebDriver. In a shell, check the parent directory and effective user; in CI, check the workspace rather than a developer-only path. A report can be generated successfully but appear “missing” when:
- the job runs in a container that is discarded after the test;
- artifacts are collected from a different directory;
- the process writes under a different current working directory; or
- a cleanup step removes the report before collection.
Configure your CI system to archive the exact baseDirectory, including nested PNG and JSON files. Capture the reporter’s console output, the final test summary, and any permission or filesystem error. If no error is printed, add temporary logging around the resolved configuration path and the test process’s current working directory.
Rank #3
6. Distinguish report generation from screenshot capture
The intended artifact set is a summary HTML report plus per-test PNG and JSON data. Use a run with a deliberately failing spec to test capture conditions, while keeping the test safe and isolated. If the HTML appears but images do not, inspect screenshot eligibility, browser startup, and write permissions separately. If neither HTML nor images appears, prioritize module resolution, registration, config selection, and process termination.
Recommended Free Tools
A browser failure, timeout, or premature process exit can prevent capture even though the reporter code is present. Preserve the complete Protractor and WebDriver output instead of reporting only “does not work.”
7. Collect the details needed for a responsible diagnosis
The historical Stack Overflow question from March 2, 2017 described version 0.0.21, registration in onPrepare, and no HTML or screenshots. Its accepted answer suggested Jasmine Allure, but did not identify the underlying cause or establish that switching reporters fixed the setup. It is useful as an example of the symptom, not as package support guidance.
When asking for help, include:
- Protractor, Node.js, Jasmine, Selenium/WebDriver, and reporter versions;
- the complete command used to start the run;
- the full configuration, including
onPrepareand reporter options; - all console output and stack traces;
- whether specs were executed, passed, failed, or skipped;
- the expected output directory and the actual process working directory; and
- operating system, container, or CI details and filesystem permissions.
Without those facts, no single root cause can be asserted from the symptom alone.
Maintenance and replacement decisions
The named package depends on an upstream reporter that is unmaintained and archived. For a modern suite, first establish whether your Protractor, Node.js, browser, and Selenium versions are still supported by this legacy integration. The available documentation does not provide a current supported-version matrix or a tested migration path, so avoid promising that a named replacement will work without checking its maintenance activity and runner compatibility.
Windows Errors? Fix Them Before They Spread
Repair common Windows errors and clear accumulated junk for a smoother, more stable PC - no reinstall needed.Free scan · no reinstallCrashes, No Sound, or Screen Glitches?
Random freezes, missing sound and display glitches usually trace back to one bad driver. Find and replace yours safely.Free scan · under a minuteCompare any alternative on the dimensions that affect your pipeline:
| Question | Why it matters |
|---|---|
| Does it support your exact Protractor/Jasmine/Node versions? | Runner and API mismatches can fail before a test executes. |
| Are screenshots attached per failed spec or emitted as files? | This determines CI retention and report linking. |
| Which report formats are produced? | HTML, JSON, and image handling differ across artifact systems. |
| How active is maintenance? | Archived dependencies increase security and compatibility risk. |
| How much configuration is required? | More hooks create more places for path and callback errors. |
Or skip the browser setup
If your actual requirement is reliable website images or PDFs rather than a Jasmine reporter attached to a legacy Protractor run, ScreenshotNeo provides a single HTTP capture endpoint. Before capture it accepts cookie or consent banners and removes more than 60 known consent platforms, newsletter popups, and chat widgets; each step can be disabled. Bot checks and CAPTCHAs, blank pages, timeouts, failed loads, and cache hits are not billed, and response headers identify the page verdict and billing status.
Use the API documentation at https://screenshotneo.com/docs/ for all options. A minimal cURL request is:
Rank #4
- Brand: Wiley
- Set of 2 Volumes
- A handy two-book set that uniquely combines related technologies Highly visual format and accessible language makes these books highly effective learning tools Perfect for beginning web designers and front-end developers
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp
Python:
import requests
r = requests.get("https://api.screenshotneo.com/v1/shot", params={"access_key": "YOUR_API_KEY", "url": "https://stripe.com"}, timeout=90)
open("shot.webp", "wb").write(r.content)
Node.js:
const q = new URLSearchParams({ access_key: 'YOUR_API_KEY', url: 'https://stripe.com' });
const res = await fetch(`https://api.screenshotneo.com/v1/shot?${q}`);
ScreenshotNeo also offers an MCP server for AI agents, including Claude and Cursor, with take_screenshot, get_page_info, and capture_pdf tools. Its plans include 1,000 screenshots per month free with no card; paid plans start at $5 for 3,000 shots. Sign up at https://screenshotneo.com/account/sign-up/.
Common failure patterns and fixes
Cannot find module
Install the package in the project used by the Protractor command, verify require.resolve, and check the active Node workspace.
onPrepare appears ignored
Confirm the command’s --config target, add temporary logging, and verify Jasmine is selected.
Directory never appears
Use an absolute writable path and confirm that at least one test meets the screenshot condition. The documented lazy directory creation means no eligible screenshot can leave the directory absent.
Only passing tests are present
If takeScreenShotsOnlyForFailedSpecs is true, reports can exist without screenshots for passing specs.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
Skipped tests have no images
Enable takeScreenShotsForSkippedSpecs; its default is false.
Custom paths produce nothing
Remove pathBuilder and metaDataBuilder, test the defaults, then reintroduce callbacks individually.
Best Value
Works locally but not in CI
Check the CI user’s permissions, current working directory, container lifetime, and artifact collection path.
FAQ
Is version 0.0.21 definitely incompatible with current Node.js?
No. Its age is a warning to verify compatibility, not proof of a particular failure.
Does a missing base directory prove the reporter constructor failed?
No. The documented behavior creates the directory when a screenshot needs saving, so no eligible capture can also leave it absent.
Does the historical Stack Overflow answer identify the root cause?
No. It suggested Jasmine Allure but did not demonstrate why the original setup failed.
Can this integration be treated as actively supported?
The upstream project is archived and described as unmaintained; verify your own compatibility before relying on it.
The Bottom Line
Start with module resolution, the active Protractor configuration, a writable absolute baseDirectory, and screenshot eligibility. Then remove custom builders and verify CI artifact paths. If the legacy stack remains unsuitable, document the exact versions and outputs before choosing a replacement—or use ScreenshotNeo when you need standalone captures without maintaining browser-reporter plumbing.
Free tools Windows power users keep installed
One-click scans. No signup required.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

