Flood-UI / flood

A web UI for rTorrent, qBittorrent and Transmission with a Node.js backend and React frontend. Migrate to v4: https://github.com/jesec/flood/wiki/Migrate-from-older-versions-of-Flood.
https://flood.js.org
GNU General Public License v3.0
1.81k stars 173 forks source link

With authentication turned off: crash when going to Settings > Authentication #883

Closed JeremyMahieu closed 3 years ago

JeremyMahieu commented 4 years ago

Type: Bug Report

Your Environment

Summary

When navigating to the Settings > Authentication, the screen blanks and two errors are generated.

main.68f82a86.js:316 TypeError: this.props.users.sort is not a function
    at a.value (main.68f82a86.js:339)
    at a.value (main.68f82a86.js:339)
    at Ni (main.68f82a86.js:316)
    at Yi (main.68f82a86.js:316)
    at ms (main.68f82a86.js:316)
    at ul (main.68f82a86.js:316)
    at sl (main.68f82a86.js:316)
    at Js (main.68f82a86.js:316)
    at main.68f82a86.js:316
    at t.unstable_runWithPriority (main.68f82a86.js:324)
main.68f82a86.js:339 Uncaught (in promise) TypeError: this.props.users.sort is not a function
    at a.value (main.68f82a86.js:339)
    at a.value (main.68f82a86.js:339)
    at Ni (main.68f82a86.js:316)
    at Yi (main.68f82a86.js:316)
    at ms (main.68f82a86.js:316)
    at ul (main.68f82a86.js:316)
    at sl (main.68f82a86.js:316)
    at Js (main.68f82a86.js:316)
    at main.68f82a86.js:316
    at t.unstable_runWithPriority (main.68f82a86.js:324)

Expected Behavior

Show the screen

Current Behavior

Crash

Steps to Reproduce

  1. Disable authentication with environment variable DISABLE_AUTH=true
  2. Go to Settings > Authentication
jesec commented 4 years ago

880 has not been merged so this issue is out of scope here.

Wonderfall’s docker image now uses my fork. The issue is that several user management API endpoints are disabled when auth is disabled and as a result authentication tab won’t work. It doesn’t gracefully handle failures so you got that blank grey screen.

This problem is mitigated in commit https://github.com/jesec/flood/commit/8d11640bdcb73a10deb9974a66876e0c5b705c59 by not displaying authentication tab when auth is disabled.

However, it still depends on build time config variables so if the Flood is not built with the option the behavior won’t change. It is fully resolved by commit https://github.com/jesec/flood/commit/4a1997013eff4db7220e65e96b986e79bc55fc72. This change is included in 3.1 release. It seems that Wonderfall’s image still uses 3.0, though. You have to bring up this issue with them.

JeremyMahieu commented 3 years ago

Closing since it's since resolved and does not apply to this fork.