Skip to content

some requests end up loading indefinitely #59

@0tii

Description

@0tii

Summary

Some requests can not be loaded and will forever stay in this state:

Image

This is seemingly affecting only the requests that have post-request scripts, as all my requests load but the login one which has a post request script.

Details

Bruno Version: 5.0.1
VSCode Version: 1.118.1

Caution

This is also affecting the Bruno desktop application! The request in question here does NOT show up in the Desktop app of Bruno at all!

Image

File Content

Bruno file content of the request in question:

meta {
  name: login
  type: http
  seq: 1
}

post {
  url: {{BACKEND_URL}}/auth/login
  body: json
  auth: none
}

body:json {
  {
    "email":"*******",
    "password": "*******",
    "rememberMe": true
  }
}

vars:pre-request {
  BACKEND_URL: *********
}

script:post-response {
  const body = typeof res.body === "string" ? JSON.parse(res.body) : res.body;
    const token = body?.accessToken;
    const rToken = body?.refreshToken;
  
    if (!token || !rToken) {
      throw new Error("No accessToken in response body");
    }
  
    bru.setVar("ACCESS_TOKEN", token);
    bru.setEnvVar("ACCESS_TOKEN", token);
    bru.setVar("REFRESH_TOKEN", rToken);
    bru.setEnvVar("REFRESH_TOKEN", rToken);
}
​

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions