kuzzleio / kuzzle-admin-console

A SPA to administrate your Kuzzle: index and collection management, document creation, realtime subscription and permissions management
http://console.kuzzle.io
Apache License 2.0
61 stars 25 forks source link

Empty security/user state bug #867

Open berthieresteban opened 3 years ago

berthieresteban commented 3 years ago

Expected Behavior

In a kuzzle without any users, AC should display the card no user is defined

Current Behavior

First AC display that card, but click again on users and AC will show search bar, infinite loader and console error: TypeError: Cannot read property 'key' of undefined But having a wrong filter setted in url or localStorage and the AC display the loader instead of an error state

Possible Solution

Actually no idea

Steps to Reproduce

  1. Run Kuzzle
  2. Go to AC on security page
  3. click on Users in left panel

Context (Environment)

Kuzzle version: 2 (image: image: kuzzleio/kuzzle:2) Admin Console Version: next

berthieresteban commented 3 years ago

[EDIT]: I had a bad entry in my localStorage for users filters: name="12/03/2020 15:56", id="16546084680"
Delete it resolve the bug (but I can't paste the localstorage line here....) Url was: http://next-console.kuzzle.io/#/security/users?name=13%2F10%2F2020%2012%3A23&id=1605266606206 Since I deleted it I can't reproduce this bug

xbill82 commented 3 years ago

A good way to reproduce the bug would be to reconstitute the LocalStorage state that set the filters. From that point, the page must be made resilient to invalid filters coming from the LocalStorage or the URL.