You are not logged in. Click here to log in.

codebeamer Application Lifecycle Management (ALM)

Search In Project

Search inClear

Tags:  swagger
IMPORTANT! The information on this page is unverified and unsupported. Always double-check the accuracy of the solutions provided. Evaluate and test the impact on any environments

Swagger - Swagger REST API returns "TypeError: NetworkError when attempting to fetch resource."

Description

Users attempting to send REST API calls through Swagger V3 may receive the error "TypeError: NetworkError when attempting to fetch resource" from the server:

Observed on

  • codebeamer 21.09-LTS (EMMA)
  • Docker

Solution

1. Navigate to the Swagger's dashboard: $scheme//$domain:$port/$context/api/v3/swagger/editor.spr (for example: http://localhost:8080/cb/api/v3/swagger/editor.spr).

2. On the top-left, check the URL appearing in the Servers drop-down list. It should match with the URL where the Swagger console is reached.



3. If these do not match, as in the below screenshot:


4. Log in to codebeamer with System Admin credentials

5. Go to System Admin tab ► Outgoing Email Connection.

6. At the bottom, ensure that the values present in the Server Name/Scheme/Port are the ones matching the URL from Step 1. :


7. Once adjusted, save the changes and refresh the Swagger Dashboard page at /api/v3/swagger/editor.spr: the value in the Servers drop-down list should now be correct and the server should no longer return NetworkError.


The above solution covers the simplest use-case, typically observed on Docker environments. NetworkError can be the result of several other server architectures (proxy, DNS, alias, OpenId configs, etc...). In case any other assistance is needed, reach out to the Support Team.

Additional Information


For any other Support options, questions, or inputs, visit: https://intland.com/technical-support/