ASF-ui icon indicating copy to clipboard operation
ASF-ui copied to clipboard

If set default page is invalid, thousands of XHR requests are made

Open pointydev opened this issue 3 years ago • 2 comments

Description

Related to #1455. If the default page set in Local Storage is set to an invalid value (such as an old installation), navigating to an invalid page causes thousands of XHR requests to be made.

Steps to reproduce

  1. (To emulate an old installation, run localStorage["asf-ui:settings:default-view"] = "\"home\"" in console)
  2. Navigate to any invalid ASF-ui page, such as the root: http://localhost:1242
  3. Observe network activity

Expected behavior

The invalid value is replaced by the default value and network activity is normal.

Current behavior

The invalid value remains, the user is not automatically redirected to a working page, and ~10000 requests to the IPC API can be made in around a minute, even if the user navigates to a working page from there.

Screenshots

Additional information

This behaviour does not present itself on the IPC password screen, only once logged in. Even though this can be easily remedied by manually changing the setting, it may not be apparent to all users, leading to excess resource consumption.

Thanks, Elliott

pointydev avatar Aug 03 '21 19:08 pointydev

Finally a way to reproduce the issue. 🎉

Abrynos avatar Aug 03 '21 19:08 Abrynos

Clarification: We discussed the "thousands of requests" on our discord server previously, but never found a way to reliably reproduce it. Only consensus was that it happend after updating.

Abrynos avatar Aug 03 '21 19:08 Abrynos