AutoGPT icon indicating copy to clipboard operation
AutoGPT copied to clipboard

fix(frontend): Fix Sentry httpClientIntegration bug with URL objects

Open seer-by-sentry[bot] opened this issue 2 months ago β€’ 7 comments

Changes πŸ—οΈ

Fixes BUILDER-3QB. The issue was that: Sentry's fetch instrumentation failed to handle Next.js passing a URL object to fetch, incorrectly calling string method .includes().

  • Wraps the window.fetch function to convert URL objects to strings before passing them to Sentry's instrumentation.
  • This resolves the "url.includes is not a function" error caused by Sentry's httpClientIntegration not properly handling URL objects.

This fix was generated by Seer in Sentry, triggered automatically. πŸ‘οΈ Run ID: 1749699

Not quite right? Click here to continue debugging with Seer.

Checklist πŸ“‹

For code changes:

  • [ ] I have clearly listed my changes in the PR description
  • [ ] I have made a test plan
  • [ ] I have tested my changes according to the test plan:
    • [ ] Manually triggered the error by passing a URL object to fetch and confirmed that the fix resolves the issue.
Example test plan
  • [ ] Create from scratch and execute an agent with at least 3 blocks
  • [ ] Import an agent from file upload, and confirm it executes correctly
  • [ ] Upload agent to marketplace
  • [ ] Import an agent from marketplace and confirm it executes correctly
  • [ ] Edit an agent from monitor, and confirm it executes correctly

For configuration changes:

  • [ ] .env.default is updated or already compatible with my changes
  • [ ] docker-compose.yml is updated or already compatible with my changes
  • [ ] I have included a list of my configuration changes in the PR description (under Changes)
Examples of configuration changes
  • Changing ports
  • Adding new services that need to communicate with each other
  • Secrets or environment variable changes
  • New or infrastructure changes such as databases

seer-by-sentry[bot] avatar Oct 03 '25 10:10 seer-by-sentry[bot]

This PR targets the master branch but does not come from dev or a hotfix/* branch.

Automatically setting the base branch to dev.

github-actions[bot] avatar Oct 03 '25 10:10 github-actions[bot]

[!IMPORTANT]

Review skipped

Auto reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.


Comment @coderabbitai help to get the list of available commands and usage tips.

coderabbitai[bot] avatar Oct 03 '25 10:10 coderabbitai[bot]

Deploy Preview for auto-gpt-docs canceled.

Name Link
Latest commit ec1ebb4d1dcecc791210b004ac09b853a80f6d67
Latest deploy log https://app.netlify.com/projects/auto-gpt-docs/deploys/68df9f8da495f10008ef1771

netlify[bot] avatar Oct 03 '25 10:10 netlify[bot]

Here's the code health analysis summary for commits 8b4eb6f..ec1ebb4. View details on DeepSourceΒ β†—.

Analysis Summary

AnalyzerStatusSummaryLink
DeepSource JavaScript LogoJavaScriptβœ…Β SuccessView CheckΒ β†—
DeepSource Python LogoPythonβœ…Β SuccessView CheckΒ β†—

πŸ’‘ If you’re a repository administrator, you can configure the quality gates from the settings.

deepsource-io[bot] avatar Oct 03 '25 10:10 deepsource-io[bot]

Thank you for submitting this PR to fix the Sentry issue with URL objects. The code change looks good and appropriately addresses the problem.

However, I noticed that the checklist in your PR description is not fully completed. Please check off all the relevant items in the checklist to confirm that:

  • You have clearly listed your changes (this appears done but not checked)
  • You have made a test plan
  • You have tested your changes according to the test plan

You've already provided a good test plan (manually triggering the error by passing a URL object to fetch), but it needs to be checked off to indicate that you've completed this testing.

Once the checklist is properly completed, the PR will be ready to merge.

AutoGPT-Agent avatar Oct 03 '25 10:10 AutoGPT-Agent

Thanks for this PR addressing the Sentry issue with URL objects in fetch calls.

The code change looks good and focused on solving the specific problem. The PR description explains the issue and solution clearly.

However, before this can be merged, please complete the checklist in the PR description by checking the following boxes:

  • "I have clearly listed my changes in the PR description"
  • "I have made a test plan"

You've actually provided this information in the description, but the checkboxes themselves need to be marked as completed. Once you've checked those boxes, this PR will be ready to merge.

AutoGPT-Agent avatar Oct 03 '25 10:10 AutoGPT-Agent

This pull request has conflicts with the base branch, please resolve those so we can evaluate the pull request.

github-actions[bot] avatar Oct 21 '25 08:10 github-actions[bot]