Rocket.chat: [BUG] 0.68.0 Rest API users.list return empty result

Created on 29 Jul 2018  路  4Comments  路  Source: RocketChat/Rocket.Chat

Description:

The users.list API return an empty result since RC 0.67.0 (again in 0.68.0).

Steps to reproduce:

CURL on the /api/v1/users.list endpoint with an authennticated user

Expected behavior:

Return user list

Actual behavior:

Return empty list :

Httpful\Response {#1108
  +body: {#1109
    +"users": []
    +"count": 0
    +"offset": 0
    +"total": 0
    +"success": true
  }
  +raw_body: "{"users":[],"count":0,"offset":0,"total":0,"success":true}"
  +headers: Httpful\Response\Headers {#1123
    -headers: array:11 [
      "server" => "nginx"
      "date" => "Sun, 29 Jul 2018 16:51:09 GMT"
      "content-type" => "application/json"
      "transfer-encoding" => "chunked"
      "connection" => "keep-alive"
      "vary" => "Accept-Encoding"
      "access-control-allow-origin" => "*"
      "x-instance-id" => "*************"
      "cache-control" => "no-store"
      "pragma" => "no-cache"
      "strict-transport-security" => "max-age=31536000"
    ]
  }
  +raw_headers: """
    HTTP/1.1 200 OK\r\n
    Server: nginx\r\n
    Date: Sun, 29 Jul 2018 16:51:09 GMT\r\n
    Content-Type: application/json\r\n
    Transfer-Encoding: chunked\r\n
    Connection: keep-alive\r\n
    Vary: Accept-Encoding\r\n
    Access-Control-Allow-Origin: *\r\n
    X-Instance-ID: **************\r\n
    Cache-Control: no-store\r\n
    Pragma: no-cache\r\n
    Vary: Accept-Encoding\r\n
    Strict-Transport-Security: max-age=31536000
    """
  +request: Httpful\Request {#1121
    +uri: "https://***********/api/v1/users.list"
    +method: "GET"
    +headers: array:3 [
      "X-Auth-Token" => "**********************************"
      "X-User-Id" => "****************"
      "Content-Length" => 0
    ]
    +raw_headers: """
      GET /api/v1/users.list HTTP/1.1\r\n
      Host: r*************\r\n
      Expect:\r\n
      User-Agent: Httpful/0.2.20 (cURL/7.52.1 PHP/7.2.8-1+0~20180725124257.2+stretch~1.gbp571e56 (Linux))\r\n
      Content-Type: application/json\r\n
      Accept: */*; q=0.5, text/plain; q=0.8, text/html;level=3;q=0.9, application/json\r\n
      X-Auth-Token: ************************\r\n
      X-User-Id: ******************\r\n
      Content-Length: 0\r\n
      """
    +strict_ssl: false
    +content_type: "application/json"
    +expected_type: "application/json"
    +additional_curl_opts: []
    +auto_parse: true
    +serialize_payload_method: 2
    +username: null
    +password: null
    +serialized_payload: null
    +payload: null
    +parse_callback: null
    +error_callback: null
    +send_callback: null
    +follow_redirects: false
    +max_redirects: 25
    +payload_serializers: []
    +_ch: Closed resource @812
    +_debug: null
  }
  +code: 200
  +content_type: "application/json"
  +parent_type: "application/json"
  +charset: "utf-8"
  +meta_data: array:26 [
    "url" => "https://rc.*******************/api/v1/users.list"
    "content_type" => "application/json"
    "http_code" => 200
    "header_size" => 355
    "request_size" => 384
    "filetime" => -1
    "ssl_verify_result" => 0
    "redirect_count" => 0
    "total_time" => 0.02388
    "namelookup_time" => 1.8E-5
    "connect_time" => 0.000356
    "pretransfer_time" => 0.011102
    "size_upload" => 0.0
    "size_download" => 58.0
    "speed_download" => 2428.0
    "speed_upload" => 0.0
    "download_content_length" => -1.0
    "upload_content_length" => -1.0
    "starttransfer_time" => 0.023849
    "redirect_time" => 0.0
    "redirect_url" => ""
    "primary_ip" => "**********"
    "certinfo" => []
    "primary_port" => 443
    "local_ip" => "**********"
    "local_port" => 55654
  ]
  +is_mime_vendor_specific: false
  +is_mime_personal: false
  -parsers: null
}

Server Setup Information:

  • Version of Rocket.Chat Server: 0.68.0
  • Operating System: Debian 9
  • Deployment Method: tar
  • Number of Running Instances: 1
  • DB Replicaset Oplog: 1
  • NodeJS Version: v8.11.3
  • MongoDB Version: na
api rest bug

Most helpful comment

Hello @stephane- , I made a PR that fixes the problem, it will be released in the next version.
For now, until the version is released you can use a filter like http://localhost:3000/api/v1/users.list?query={}.

All 4 comments

Yes, I have the same issue when use the Rest API users.list return empty result.

Anyone know how to fix this issue?

Hello @stephane- , I made a PR that fixes the problem, it will be released in the next version.
For now, until the version is released you can use a filter like http://localhost:3000/api/v1/users.list?query={}.

Thank you !

Was this page helpful?
0 / 5 - 0 ratings

Related issues

karlprieb picture karlprieb  路  3Comments

engelgabriel picture engelgabriel  路  3Comments

mddvul22 picture mddvul22  路  3Comments

royalaid picture royalaid  路  3Comments

zeigerpuppy picture zeigerpuppy  路  3Comments