-
DescriptionThe default URL Homepage uses results in a "Not Found" page. {
"meta": {
"rc": "ok"
},
"data": [
{
"subsystem": "wlan",
"num_user": 4,
"num_guest": 0,
"num_iot": 0,
"tx_bytes-r": 144,
"rx_bytes-r": 179,
"status": "warning",
"num_ap": 1,
"num_adopted": 2,
"num_disabled": 0,
"num_disconnected": 1,
"num_pending": 0
},
{
"subsystem": "wan",
"num_gw": 1,
"num_adopted": 1,
"num_disconnected": 0,
"num_pending": 0,
"status": "ok",
"wan_ip": "REDACTED",
"gateways": [],
"netmask": "255.255.255.0",
"nameservers": [
"REDACTED",
"REDACTED"
],
"num_sta": 20,
"tx_bytes-r": 2215,
"rx_bytes-r": 3253,
"gw_mac": "REDACTED",
"gw_name": "REDACTED",
"gw_system-stats": {
"cpu": "18.0",
"mem": "68.0",
"uptime": "792683"
},
"gw_version": "3.2.5.13810",
"isp_name": "REDACTED",
"isp_organization": "REDACTED",
"uptime_stats": {
"WAN": {
"alerting_monitors": [
{
"availability": 100.0,
"latency_average": 1,
"target": "1.1.1.1",
"type": "icmp"
},
{
"availability": 100.0,
"latency_average": 100,
"target": "1.1.1.1",
"type": "dns"
},
{
"availability": 100.0,
"latency_average": 100,
"target": "8.8.8.8",
"type": "dns"
}
],
"availability": 99.65279999375343,
"latency_average": 2,
"monitors": [
{
"availability": 100.0,
"latency_average": 1,
"target": "www.microsoft.com",
"type": "icmp"
},
{
"availability": 100.0,
"latency_average": 21,
"target": "google.com",
"type": "icmp"
},
{
"availability": 100.0,
"latency_average": 1,
"target": "1.1.1.1",
"type": "icmp"
}
],
"time_period": 86400,
"uptime": 792630
}
}
},
{
"subsystem": "www",
"status": "ok",
"tx_bytes-r": 2215,
"rx_bytes-r": 3253,
"latency": 1,
"uptime": 160238,
"drops": 2,
"xput_up": 33.398,
"xput_down": 909.11,
"speedtest_status": "Success",
"speedtest_lastrun": 1698862833,
"speedtest_ping": 3,
"gw_mac": "REDACTED"
},
{
"subsystem": "lan",
"lan_ip": null,
"status": "ok",
"num_user": 16,
"num_guest": 0,
"num_iot": 0,
"tx_bytes-r": 2017,
"rx_bytes-r": 2062,
"num_sw": 2,
"num_adopted": 2,
"num_disconnected": 0,
"num_pending": 0
},
{
"subsystem": "vpn",
"status": "ok",
"remote_user_enabled": true,
"remote_user_num_active": 0,
"remote_user_num_inactive": 0,
"remote_user_rx_bytes": 1494212,
"remote_user_tx_bytes": 23008128,
"remote_user_rx_packets": 9672,
"remote_user_tx_packets": 23511,
"site_to_site_enabled": false
}
]
} Steps to reproduceCreate a local only user on the latest Ubiquiti console homepage versionLatest Installation methodDocker ConfigurationN/A Container LogsN/A Browser LogsN/A TroubleshootingChecked the API URLs from my Ubiquiti console. OtherNo response Before submitting, I have made sure to
|
Beta Was this translation helpful? Give feedback.
Replies: 15 comments 10 replies
-
I have read the previous issues, read the documentation, completely recreated the homepage container. The issue persists. [2023-11-03T08:13:29.049Z] error: HTTP 401 logging in to Unifi. Data: {"error":{"code":401,"message":"Unauthorized"}} - UDM SE:
icon: ubiquiti.png
widget:
type: unifi
url: https://172.16.2.1
username: Homepage
password: redacted |
Beta Was this translation helpful? Give feedback.
-
UDMP/UDM SE should return an |
Beta Was this translation helpful? Give feedback.
-
user@homepage:~$ curl -i -v -k https://172.16.2.1
* Trying 172.16.2.1:443...
* Connected to 172.16.2.1 (172.16.2.1) port 443 (#0)
* ALPN, offering h2
* ALPN, offering http/1.1
* TLSv1.0 (OUT), TLS header, Certificate Status (22):
* TLSv1.3 (OUT), TLS handshake, Client hello (1):
* TLSv1.2 (IN), TLS header, Certificate Status (22):
* TLSv1.3 (IN), TLS handshake, Server hello (2):
* TLSv1.2 (IN), TLS header, Finished (20):
* TLSv1.2 (IN), TLS header, Supplemental data (23):
* TLSv1.3 (IN), TLS handshake, Encrypted Extensions (8):
* TLSv1.2 (IN), TLS header, Supplemental data (23):
* TLSv1.3 (IN), TLS handshake, Certificate (11):
* TLSv1.2 (IN), TLS header, Supplemental data (23):
* TLSv1.3 (IN), TLS handshake, CERT verify (15):
* TLSv1.2 (IN), TLS header, Supplemental data (23):
* TLSv1.3 (IN), TLS handshake, Finished (20):
* TLSv1.2 (OUT), TLS header, Finished (20):
* TLSv1.3 (OUT), TLS change cipher, Change cipher spec (1):
* TLSv1.2 (OUT), TLS header, Supplemental data (23):
* TLSv1.3 (OUT), TLS handshake, Finished (20):
* SSL connection using TLSv1.3 / TLS_AES_256_GCM_SHA384
* ALPN, server accepted to use h2
* Server certificate:
* subject: CN=unifi.local
* start date: Mar 26 08:13:34 2022 GMT
* expire date: Jun 28 08:13:34 2024 GMT
* issuer: CN=unifi.local
* SSL certificate verify result: self-signed certificate (18), continuing anyway.
* Using HTTP2, server supports multiplexing
* Connection state changed (HTTP/2 confirmed)
* Copying HTTP/2 data in stream buffer to connection buffer after upgrade: len=0
* TLSv1.2 (OUT), TLS header, Supplemental data (23):
* TLSv1.2 (OUT), TLS header, Supplemental data (23):
* TLSv1.2 (OUT), TLS header, Supplemental data (23):
* Using Stream ID: 1 (easy handle 0x560da85cbe90)
* TLSv1.2 (OUT), TLS header, Supplemental data (23):
> GET / HTTP/2
> Host: 172.16.2.1
> user-agent: curl/7.81.0
> accept: */*
>
* TLSv1.2 (IN), TLS header, Supplemental data (23):
* TLSv1.3 (IN), TLS handshake, Newsession Ticket (4):
* TLSv1.2 (IN), TLS header, Supplemental data (23):
* TLSv1.3 (IN), TLS handshake, Newsession Ticket (4):
* old SSL session ID is stale, removing
* TLSv1.2 (IN), TLS header, Supplemental data (23):
* Connection state changed (MAX_CONCURRENT_STREAMS == 128)!
* TLSv1.2 (OUT), TLS header, Supplemental data (23):
* TLSv1.2 (IN), TLS header, Supplemental data (23):
* TLSv1.2 (IN), TLS header, Supplemental data (23):
< HTTP/2 200
HTTP/2 200
< server: nginx
server: nginx
< date: Fri, 03 Nov 2023 09:11:45 GMT
date: Fri, 03 Nov 2023 09:11:45 GMT
< content-type: text/html
content-type: text/html
< content-length: 826
content-length: 826
< last-modified: Tue, 24 Oct 2023 12:20:43 GMT
last-modified: Tue, 24 Oct 2023 12:20:43 GMT
< etag: "6537b69b-33a"
etag: "6537b69b-33a"
< expires: Fri, 03 Nov 2023 09:11:44 GMT
expires: Fri, 03 Nov 2023 09:11:44 GMT
< cache-control: no-cache
cache-control: no-cache
< access-control-allow-credentials: false
access-control-allow-credentials: false
< access-control-expose-headers: Content-Disposition, Content-Range, Filename, Location, Range, Upload-Length, Upload-Offset, X-Connection-Type, X-Csrf-Token, X-File-Id, X-Token-Expire-Time, X-Updated-Csrf-Token
access-control-expose-headers: Content-Disposition, Content-Range, Filename, Location, Range, Upload-Length, Upload-Offset, X-Connection-Type, X-Csrf-Token, X-File-Id, X-Token-Expire-Time, X-Updated-Csrf-Token
< referrer-policy: no-referrer
referrer-policy: no-referrer
< strict-transport-security: max-age=15552000; includeSubDomains
strict-transport-security: max-age=15552000; includeSubDomains
< x-content-type-options: nosniff
x-content-type-options: nosniff
< x-dns-prefetch-control: off
x-dns-prefetch-control: off
< x-frame-options: SAMEORIGIN
x-frame-options: SAMEORIGIN
< x-xss-protection: 1; mode=block
x-xss-protection: 1; mode=block
< accept-ranges: bytes
accept-ranges: bytes
<
* Connection #0 to host 172.16.2.1 left intact
<!doctype html><html lang="en"><head><meta charset="utf-8"><link rel="icon" href="/favicon.ico?v3" sizes="any"><link rel="icon" href="/favicon.svg?v3" type="image/svg+xml"><link rel="apple-touch-icon" href="/apple-touch-icon.png?v3"><title>UniFi OS</title><meta name="viewport" content="width=device-width,initial-scale=1"><script>window.UNIFI_OS_MANIFEST = {"model":{"id":"UDMPROSE","shortName":"UDM SE","longName":"UniFi Dream Machine SE"},"images":{"small":"/assets/images/small.png?udmprose-2.0.0","medium":"/assets/images/medium.png?udmprose-2.0.0","large":"/assets/images/large.png?udmprose-2.0.0","huge":"/assets/images/huge.png?udmprose-2.0.0"}}</script><script defer="defer" src="/main.e8aacf3d73c3fd2b5bbf.js"></script><link href="/main.0e9197a3.css" rel="stylesheet"></head><body><div id="root"></div></body></html> |
Beta Was this translation helpful? Give feedback.
-
So thats a UDMSE and what version of the OS / network is that running? |
Beta Was this translation helpful? Give feedback.
-
This is happening on the latest release, OS 3.2.5, network 7.5.187 https://community.ui.com/releases/UniFi-OS-Dream-Machine-SE-3-2-5/c2cb12bc-1090-4546-94e5-823d005e33bc |
Beta Was this translation helpful? Give feedback.
-
Edit: After looking at the source, I can see there are checks for if it's a pro device: const udmpPrefix = "/proxy/network"; I believe I have found the root cause, any "pro" controller needs to have "/proxy/network/" before "api" in the URI https://ubntwiki.com/products/software/unifi-controller/api#udm_pro_api |
Beta Was this translation helpful? Give feedback.
-
If anyone else stumbles upon this, I ended up creating a customapi widget using a token I got from web inspector. services.yaml - Statistics:
- UDM SE:
icon: ubiquiti.png
widget:
type: customapi
url: https://172.16.2.1/proxy/network/api/s/default/stat/health
headers:
Cookie: 'TOKEN=abc123'
mappings:
- field:
data:
1: wan_ip
label: WAN
format: text
- field:
data:
1:
gw_system-stats: uptime
label: Uptime
format: number
suffix: Hours
scale: 0.000277778
- field:
data:
1:
gw_system-stats: cpu
label: CPU
format: number
suffix: '%'
- field:
data:
1:
gw_system-stats: mem
label: RAM
format: number
suffix: '%' |
Beta Was this translation helpful? Give feedback.
-
Yes, this is exactly the point I was making above, homepage "detects" whether the controller is Pro (or SE, they have always been the same in this regard) by checking for the presence of the homepage/src/widgets/unifi/proxy.js Lines 83 to 86 in 5512d05 So I'm running Network 7.5.187 but OS v3.1.16, works fine. 3.2.5 seems like early access release? The thing is we dont know:
So tldr, I'm going to keep an eye out for this, an alternative would be to add a way to manually override this which might be the longterm solution if the unifi API is going to have breaking changes like this, or there may be an alternative way to sniff udmp vs controller Will update this thread if / when have more to say. |
Beta Was this translation helpful? Give feedback.
-
I have the exact same issue. I have Network 8.0.2 and UnifiOS 3.2.5. I think UnifiOS 3.2.5 broke Unifi widget. If I use this URL : https://192.168.1.1/proxy/network/api/stat/sites instead of https://192.168.1.1/api/stat/sites I receive a JSON answer. |
Beta Was this translation helpful? Give feedback.
-
Would you also mind posting the output of curl -i -v -k https://192.168.1.1 |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
Thanks. So the question remains whether the final UnifiOS will have this change but in general I think installing Unifi pre-release software is very risky so I'm not going to do it. That 3.2.5 release was in fact pulled because it borked people's internet: https://community.ui.com/releases/UniFi-OS-Dream-Machine-SE-3-2-5/c2cb12bc-1090-4546-94e5-823d005e33bc#comment/10fa67a1-668e-473e-b1c7-766d73a18252 Then there is the fun complication that the Unifi controller image is going to be deprecated: https://info.linuxserver.io/issues/2023-09-06-unifi-controller/ Basically will look at alternative means of auto-detection and / or manual specifying in the config, maybe both |
Beta Was this translation helpful? Give feedback.
-
If either of you would like to pull the |
Beta Was this translation helpful? Give feedback.
-
Having an issue with my CloudKey Gen 2. I am running UnifiOS 3.2.7, and no matter how much I try, all I can get out of it is 401 Unauthorized. Network version is 8.0.24. Currently using Homepage version 0.8.3 as that is what TrueCharts has.
If I perform that 'curl' command, I get:
|
Beta Was this translation helpful? Give feedback.
-
I'm facing the following issue:
Recreating the homepage container did not help. Any idea? UniFi Dream Router
|
Beta Was this translation helpful? Give feedback.
If either of you would like to pull the
main
image and give that a try, let me know. Thanks