[GH-ISSUE #4675] [bug]: Network Error when fetching environment #1738

Open
opened 2026-03-16 21:34:33 +03:00 by kerem · 2 comments
Owner

Originally created by @sean-at-heady on GitHub (Jan 14, 2025).
Original GitHub issue: https://github.com/hoppscotch/hoppscotch/issues/4675

Is there an existing issue for this?

  • I have searched the existing issues

Current behavior

Affected platforms

  • Cloud desktop app and website

Expected Behavior
Environments should load for all users of the organization.

Actual Behavior
The Environment Window has a message "There seems to be a network error. Please try again.
image

Curl Request with redacted auth keys

curl 'https://api.hoppscotch.io/graphql' -X POST -H 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:134.0) Gecko/20100101 Firefox/134.0' -H 'Accept: application/graphql-response+json, application/graphql+json, application/json, text/event-stream, multipart/mixed' -H 'Accept-Language: en-US,en;q=0.5' -H 'Accept-Encoding: gzip, deflate, br, zstd' -H 'Content-Type: application/json' -H 'Referer: https://hoppscotch.io/' -H 'sentry-trace: 38b445c1a4a1479c97386d404815e50b-83ac2a7828ff41db-1' -H 'baggage: sentry-environment=production,sentry-release=f96b8f1f3ffc80ba5671db8cca5d5d95a54ab0e4,sentry-public_key=c4459977deac4f8a827036844059ba0a,sentry-trace_id=38b445c1a4a1479c97386d404815e50b,sentry-sample_rate=0.8,sentry-transaction=index,sentry-sampled=true' -H 'Origin: https://hoppscotch.io' -H 'Sec-GPC: 1' -H 'Sec-Fetch-Dest: empty' -H 'Sec-Fetch-Mode: cors' -H 'Sec-Fetch-Site: same-site' -H 'authorization: Bearer redacted' -H 'Connection: keep-alive' -H 'Priority: u=4' -H 'TE: trailers' --data-raw '{"operationName":"GetTeamEnvironments","query":"query GetTeamEnvironments($teamID: ID!) {\n  team(teamID: $teamID) {\n    teamEnvironments {\n      id\n      name\n      variables\n      teamID\n    }\n  }\n}","variables":{"teamID":"clj6s76qy374090hqfzkxg45bg"}}'

Appears that the GraphQl endpoint is failing for some reason.

Steps to reproduce

This seems to be specific to our environment but we are unsure why.

  1. Login to organization
  2. Select Environment

Environment

Production

Version

Cloud

Originally created by @sean-at-heady on GitHub (Jan 14, 2025). Original GitHub issue: https://github.com/hoppscotch/hoppscotch/issues/4675 ### Is there an existing issue for this? - [X] I have searched the existing issues ### Current behavior **Affected platforms** - Cloud desktop app and website **Expected Behavior** Environments should load for all users of the organization. **Actual Behavior** The Environment Window has a message "There seems to be a network error. Please try again. <img width="371" alt="image" src="https://github.com/user-attachments/assets/caa41d7e-d5a9-415b-9831-077cda611417" /> Curl Request with redacted auth keys ``` curl 'https://api.hoppscotch.io/graphql' -X POST -H 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:134.0) Gecko/20100101 Firefox/134.0' -H 'Accept: application/graphql-response+json, application/graphql+json, application/json, text/event-stream, multipart/mixed' -H 'Accept-Language: en-US,en;q=0.5' -H 'Accept-Encoding: gzip, deflate, br, zstd' -H 'Content-Type: application/json' -H 'Referer: https://hoppscotch.io/' -H 'sentry-trace: 38b445c1a4a1479c97386d404815e50b-83ac2a7828ff41db-1' -H 'baggage: sentry-environment=production,sentry-release=f96b8f1f3ffc80ba5671db8cca5d5d95a54ab0e4,sentry-public_key=c4459977deac4f8a827036844059ba0a,sentry-trace_id=38b445c1a4a1479c97386d404815e50b,sentry-sample_rate=0.8,sentry-transaction=index,sentry-sampled=true' -H 'Origin: https://hoppscotch.io' -H 'Sec-GPC: 1' -H 'Sec-Fetch-Dest: empty' -H 'Sec-Fetch-Mode: cors' -H 'Sec-Fetch-Site: same-site' -H 'authorization: Bearer redacted' -H 'Connection: keep-alive' -H 'Priority: u=4' -H 'TE: trailers' --data-raw '{"operationName":"GetTeamEnvironments","query":"query GetTeamEnvironments($teamID: ID!) {\n team(teamID: $teamID) {\n teamEnvironments {\n id\n name\n variables\n teamID\n }\n }\n}","variables":{"teamID":"clj6s76qy374090hqfzkxg45bg"}}' ``` Appears that the GraphQl endpoint is failing for some reason. ### Steps to reproduce This seems to be specific to our environment but we are unsure why. 1. Login to organization 2. Select Environment ### Environment Production ### Version Cloud
Author
Owner

@sean-at-heady commented on GitHub (Jan 24, 2025):

This appears to be related to a CORS issue with missing access control header on the get Env endpoint.

access-control-allow-origin
    https://hoppscotch.io/

Graph QL endpoint with header that succeeds
Image

Graph QL Get Team Env without header that fails

Image

<!-- gh-comment-id:2613125518 --> @sean-at-heady commented on GitHub (Jan 24, 2025): This appears to be related to a CORS issue with missing access control header on the get Env endpoint. ``` access-control-allow-origin https://hoppscotch.io/ ``` Graph QL endpoint with header that succeeds ![Image](https://github.com/user-attachments/assets/17b8e40c-e7e4-4856-8df2-b0115a906e19) Graph QL Get Team Env without header that fails ![Image](https://github.com/user-attachments/assets/b594c8f5-4d51-469e-ac9e-eae2fca63362)
Author
Owner

@sean-at-heady commented on GitHub (Feb 3, 2025):

Verified this is still occurring on Version 25.1.0-0 (20250131.114049)

<!-- gh-comment-id:2631510659 --> @sean-at-heady commented on GitHub (Feb 3, 2025): Verified this is still occurring on `Version 25.1.0-0 (20250131.114049)`
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#1738
No description provided.