fix: Improve navigate_page_history error messages#321
Merged
OrKoN merged 9 commits intoChromeDevTools:mainfrom Oct 13, 2025
Merged
fix: Improve navigate_page_history error messages#321OrKoN merged 9 commits intoChromeDevTools:mainfrom
OrKoN merged 9 commits intoChromeDevTools:mainfrom
Conversation
Check navigation result and provide specific feedback: - Detect when no previous/next page exists in history - Show timeout errors with duration details - Include actual error messages instead of generic text
Contributor
Author
|
Fixes: #259 |
OrKoN
reviewed
Oct 10, 2025
OrKoN
reviewed
Oct 10, 2025
Per puppeteer/puppeteer#14160, null return from goBack/goForward indicates successful navigation without network request, not failure. Puppeteer throws error when no history exists. Simplified to append error.message as suggested by @OrKoN.
OrKoN
approved these changes
Oct 13, 2025
This was referenced Oct 13, 2025
OrKoN
pushed a commit
that referenced
this pull request
Oct 13, 2025
🤖 I have created a release *beep* *boop* --- ## [0.8.1](chrome-devtools-mcp-v0.8.0...chrome-devtools-mcp-v0.8.1) (2025-10-13) ### Bug Fixes * add an option value to the snapshot ([#362](#362)) ([207137e](207137e)) * improve navigate_page_history error messages ([#321](#321)) ([0624029](0624029)) * return the default dialog value correctly ([#366](#366)) ([f08f808](f08f808)) * update puppeteer to 24.24.1 ([#370](#370)) ([477eef4](477eef4)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The
navigate_page_historytool previously suppressed allnavigation errors with a generic message: "Unable to
navigate {back|forward} in currently selected page." This
provided no context about why the navigation failed, making
it difficult for users to understand whether:
Solution
Enhanced error handling to provide specific, actionable
feedback:
from
goBack()/goForward()to detect when navigation isimpossible
null, return:"Cannot navigate back, no previous page in history."
out after 30000ms."
generic text
Changes
navigate_page_historyhandler insrc/tools/pages.tsTesting
first page
end of history