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

Error invoking remote method 'send-http-request' #3673

Open
2 tasks done
MehdiElMellali opened this issue Dec 17, 2024 · 1 comment
Open
2 tasks done

Error invoking remote method 'send-http-request' #3673

MehdiElMellali opened this issue Dec 17, 2024 · 1 comment
Assignees
Labels
bug Something isn't working triage-pending Triage Pending

Comments

@MehdiElMellali
Copy link

I have checked the following:

  • I use the newest version of bruno.
  • I've searched existing issues and found nothing related to my issue.

Describe the bug

When attempting to execute requests that include JavaScript code leveraging the js library in Bruno, the following error is encountered:

This occurs because Bruno's Safe Mode (enabled by default) restricts JavaScript execution in a secure sandbox, preventing access to libraries and modules installed locally.

Steps to Reproduce
Install the ****** library in your project:

npm install ******

Add a Bruno script that requires the javascript library

Attempt to execute the request in Bruno with Safe Mode enabled.

Expected Behavior:
The script should execute correctly, generating the required client assertion.

Observed Behavior
The following error occurs:

Error invoking remote method 'send-http-request': Error: Cannot find module *****

Solution
Switch from Safe Mode to Developer Mode in Bruno:

Open Bruno.

  • Change the mode from Safe Mode (Beta) to Developer Mode:
  • Save changes and retry the request.

.bru file to reproduce the bug

No response

Screenshots/Live demo link

image

@MehdiElMellali MehdiElMellali added the bug Something isn't working label Dec 17, 2024
@ganesh-bruno ganesh-bruno self-assigned this Dec 18, 2024
@ganesh-bruno
Copy link
Collaborator

Hey @MehdiElMellali,

Thanks for reporting this issue.

Could you please confirm that you have added the script section to the bruno.json file and whitelisted the module?

You can follow this Bruno official document. Let me know if it works for you or if you're still facing issues.

@sreelakshmi-bruno sreelakshmi-bruno added the triage-pending Triage Pending label Dec 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working triage-pending Triage Pending
Projects
None yet
Development

No branches or pull requests

3 participants