[GH-ISSUE #320] UI: devices view fails when the example device has been deleted and no other non vpn only devices are present #149

Closed
opened 2026-03-04 01:35:10 +03:00 by kerem · 5 comments
Owner

Originally created by @lts-rad on GitHub (May 8, 2024).
Original GitHub issue: https://github.com/spr-networks/super/issues/320

Originally created by @lts-rad on GitHub (May 8, 2024). Original GitHub issue: https://github.com/spr-networks/super/issues/320
kerem 2026-03-04 01:35:10 +03:00
Author
Owner

@lts-rad commented on GitHub (May 8, 2024):

page redirects to validate. no otp code hsa been set

image
<!-- gh-comment-id:2101085866 --> @lts-rad commented on GitHub (May 8, 2024): page redirects to validate. no otp code hsa been set <img width="652" alt="image" src="https://github.com/spr-networks/super/assets/37549748/92c6d961-1ea4-41c3-92c4-5b971cfd752b">
Author
Owner

@lts-rad commented on GitHub (May 8, 2024):

user reports this is not just virtual mode.

looking into it, the only request that is failing is the ouis lookup which 404s. then the UI incorrectly handles the 404 to validate the otp code

<!-- gh-comment-id:2101099559 --> @lts-rad commented on GitHub (May 8, 2024): user reports this is not just virtual mode. looking into it, the only request that is failing is the ouis lookup which 404s. then the UI incorrectly handles the 404 to validate the otp code
Author
Owner

@lts-rad commented on GitHub (May 8, 2024):

bug does not appear to reproduce with this change

        if (macs && macs.length > 0) {
          // set device oui if avail
          deviceAPI
            .ouis(macs)
            .then((ouis) => {
              let devs = devices.map((d) => {
                let oui = ouis.find((o) => o.MAC == d.MAC)
                d.oui = oui ? oui.Vendor : ''
                return d
              })

              setList(devs.sort(sortDevices))
            })
            .catch((err) => {})
        }

but we need a more extensive fix

<!-- gh-comment-id:2101118875 --> @lts-rad commented on GitHub (May 8, 2024): bug does not appear to reproduce with this change ``` if (macs && macs.length > 0) { // set device oui if avail deviceAPI .ouis(macs) .then((ouis) => { let devs = devices.map((d) => { let oui = ouis.find((o) => o.MAC == d.MAC) d.oui = oui ? oui.Vendor : '' return d }) setList(devs.sort(sortDevices)) }) .catch((err) => {}) } ``` but we need a more extensive fix
Author
Owner

@lts-rad commented on GitHub (May 8, 2024):

the issue is the empty lookup triggers the redirect http://127.0.0.1:8009/plugins/lookup/ouis/ which incorrectly assumes otp failure

<!-- gh-comment-id:2101120936 --> @lts-rad commented on GitHub (May 8, 2024): the issue is the empty lookup triggers the redirect http://127.0.0.1:8009/plugins/lookup/ouis/ which incorrectly assumes otp failure
Author
Owner

@lts-rad commented on GitHub (May 9, 2024):

this is fixed correctly by 18f7882c8e

<!-- gh-comment-id:2103294062 --> @lts-rad commented on GitHub (May 9, 2024): this is fixed correctly by 18f7882c8e8972aa8ba35680c47d012f71a5b4ac
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/super#149
No description provided.