[GH-ISSUE #3291] [bug]: unable to run the collection using env file from hoppscotch cli #1090

Closed
opened 2026-03-16 18:32:06 +03:00 by kerem · 3 comments
Owner

Originally created by @nids2307 on GitHub (Aug 24, 2023).
Original GitHub issue: https://github.com/hoppscotch/hoppscotch/issues/3291

Is there an existing issue for this?

  • I have searched the existing issues

Current behavior

There is import/export of environment file is not available at the individual environment file level. It is only available to export all the environment files including variables from those multiple files.

Macbook terminal:
The exported format does not work in Hoppscotch cli and throws error:
Hoppscotch % hopp test -e HS_reqres_env.json Sandbox.json
MALFORMED_ENV_FILE HS_reqres_env.json

Contents of the env file:
[
{
"name": "Reqres QA",
"variables": [
{
"key": "base_url",
"value": "https:/reqres.in/api/"
}
]
}
]

I tried updating the above JSON to hoppscotch recommended format which looks like this:

{
"base_url": "https:/reqres.in/api/"
}

and now I see this error:
Running: Sandbox/Single User
GET https:/reqres.in/api/users/2 ERROR
⚠ Error running request.
⚠ Error running test-script.

Sandbox/Single User reported errors:
REQUEST_ERROR unable to get local issuer certificate
TEST_SCRIPT_ERROR Script evaluation failed: [object Object]

Test Cases: 0 failed 0 passed
Test Suites: 0 failed 0 passed
Test Scripts: 1 failed 0 passed

Requests: 1 failed 0 passed

Pre-Request Scripts: 0 failed 1 passed

Exited with code 1%

Steps to reproduce

  1. Created a Collection in hoppscotch...(attached here)
  2. Created an env file with one variable named 'baseurl'
  3. Exported the collection and env file
  4. Executed the test from hoppscotch cli on Macbook using the hopp test command
  5. Got different errors.
    2023-08-24_17-11-55

Environment

Production

Version

Self-hosted

Originally created by @nids2307 on GitHub (Aug 24, 2023). Original GitHub issue: https://github.com/hoppscotch/hoppscotch/issues/3291 ### Is there an existing issue for this? - [X] I have searched the existing issues ### Current behavior There is import/export of environment file is not available at the individual environment file level. It is only available to export all the environment files including variables from those multiple files. Macbook terminal: The exported format does not work in Hoppscotch cli and throws error: Hoppscotch % hopp test -e HS_reqres_env.json Sandbox.json MALFORMED_ENV_FILE HS_reqres_env.json Contents of the env file: [ { "name": "Reqres QA", "variables": [ { "key": "base_url", "value": "https:/reqres.in/api/" } ] } ] I tried updating the above JSON to hoppscotch recommended format which looks like this: { "base_url": "https:/reqres.in/api/" } and now I see this error: Running: Sandbox/Single User GET https:/reqres.in/api/users/2 ERROR ⚠ Error running request. ⚠ Error running test-script. Sandbox/Single User reported errors: REQUEST_ERROR unable to get local issuer certificate TEST_SCRIPT_ERROR Script evaluation failed: [object Object] Test Cases: 0 failed 0 passed Test Suites: 0 failed 0 passed Test Scripts: 1 failed 0 passed Requests: 1 failed 0 passed Pre-Request Scripts: 0 failed 1 passed Exited with code 1% ### Steps to reproduce 1. Created a Collection in hoppscotch...(attached here) 2. Created an env file with one variable named 'baseurl' 3. Exported the collection and env file 4. Executed the test from hoppscotch cli on Macbook using the hopp test command 5. Got different errors. ![2023-08-24_17-11-55](https://github.com/hoppscotch/hoppscotch/assets/57542472/8bd90c25-75af-4d17-b129-eb8f47ee0e18) ### Environment Production ### Version Self-hosted
kerem 2026-03-16 18:32:06 +03:00
Author
Owner

@nids2307 commented on GitHub (Sep 8, 2023):

Any updates on this ticket?

<!-- gh-comment-id:1711661675 --> @nids2307 commented on GitHub (Sep 8, 2023): Any updates on this ticket?
Author
Owner

@jamesgeorge007 commented on GitHub (Dec 22, 2023):

Hi, we recently added the support for supplying environments individually to the CLI. Please find more information here.

REQUEST_ERROR unable to get local issuer certificate

We don't support disabling TLS certificate validation currently. Also, can you check if it's something with the network?

<!-- gh-comment-id:1867852835 --> @jamesgeorge007 commented on GitHub (Dec 22, 2023): Hi, we recently added the support for supplying environments individually to the CLI. Please find more information [here](https://docs.hoppscotch.io/documentation/clients/cli#_1-single-environment-entry-export-format). > REQUEST_ERROR unable to get local issuer certificate We don't support disabling TLS certificate validation currently. Also, can you check if it's something with the network?
Author
Owner

@joeljstephen commented on GitHub (Apr 18, 2024):

@nids2307 I hope the suggestion helped. I will be closing this issue. If you are still facing this issue on the latest builds, please feel free to reopen this issue.

<!-- gh-comment-id:2063165669 --> @joeljstephen commented on GitHub (Apr 18, 2024): @nids2307 I hope the suggestion helped. I will be closing this issue. If you are still facing this issue on the latest builds, please feel free to reopen this issue.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/hoppscotch#1090
No description provided.