Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: handle navigation timing in page.evaluate calls #335

Closed

Conversation

devin-ai-integration[bot]
Copy link
Contributor

Fix "Execution Context Destroyed During Navigation" error that occurs during page.evaluate calls after clicking on products.

Fixes #289

Reproduction Steps

  1. Run pnpm shortest --debug-ai
  2. Test adding a product to cart on an e-commerce site
  3. Click on a product triggers navigation
  4. Error occurs: page.evaluate: Execution context was destroyed, most likely because of a navigation

Changes

  • Added proper navigation handling in click function to wait for navigation before continuing
  • Simplified execute method to rely on click's navigation handling
  • Added error handling in getMetadata for navigation timing issues
  • Improved TypeScript types for error handling

Testing

The changes will be verified by CI. The fix follows existing patterns for navigation handling from the GitHub integration.

Link to Devin run: https://app.devin.ai/sessions/5a590259420a406e9cf77293bdb1e9e1

Copy link

vercel bot commented Feb 11, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
shortest ⬜️ Ignored (Inspect) Visit Preview Feb 11, 2025 7:45pm

Copy link
Contributor Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add "(aside)" to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

@rmarescu
Copy link
Member

Issue is still reproducible, will teach Devin to test against the example repo, closing for now.

@rmarescu rmarescu closed this Feb 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Error: page.evaluate - Execution Context Destroyed During Navigation
1 participant