Art-of-WiFi / UniFi-API-browser

Tool to browse data exposed by Ubiquiti's UniFi Controller API
MIT License
1.12k stars 151 forks source link

doesnt return any data just spins #116

Closed jsox79 closed 1 week ago

jsox79 commented 1 week ago

finds hostifi cloud controller just fine, sees sites, but i cannot load any info. everything i pick just spins. im using the default admin user with full privileges. any ideas? running on a vm with ubuntu server 24 lamp with php8 php-curl port forwarded 9083 to 443 thanks in advance

malle-pietje commented 1 week ago

What do the web server error log and browser console say?

jsox79 commented 1 week ago

the webpage says nothing it just spins the apache error log is below

Content-Type[Sun Nov 24 05:37:17.236491 2024] [php:notice] [pid 1736] [client 152.117.98.3:23939] DEBUG: 162 sites collected, referer: http://xxxxx/UniFi-API-browser/ [Sun Nov 24 05:37:34.134154 2024] [php:notice] [pid 1734] [client 152.117.98.3:23689] fetching results for collection: list network configuration , referer: http://xxxxx/UniFi-API-browser/ [Sun Nov 24 05:37:34.245973 2024] [php:error] [pid 1734] [client 152.117.98.3:23689] PHP Fatal error: Uncaught TypeError: property_exists(): Argument #1 ($object_or_class) must be of type object|string, array given in /var/www/html/UniFi-API-browser/ajax/fetch_collection.php:171\nStack trace:\n#0 /var/www/html/UniFi-API-browser/ajax/fetch_collection.php(171): property_exists()\n#1 {main}\n thrown in /var/www/html/UniFi-API-browser/ajax/fetch_collection.php on line 171, referer: http://xxxxx/UniFi-API-browser/ [Sun Nov 24 05:37:55.053173 2024] [php:notice] [pid 1735] [client 152.117.98.3:23869] fetching results for collection: list network configuration , referer: http://xxxxx/UniFi-API-browser/ [Sun Nov 24 05:37:55.176095 2024] [php:error] [pid 1735] [client 152.117.98.3:23869] PHP Fatal error: Uncaught TypeError: property_exists(): Argument #1 ($object_or_class) must be of type object|string, array given in /var/www/html/UniFi-API-browser/ajax/fetch_collection.php:171\nStack trace:\n#0 /var/www/html/UniFi-API-browser/ajax/fetch_collection.php(171): property_exists()\n#1 {main}\n thrown in /var/www/html/UniFi-API-browser/ajax/fetch_collection.php on line 171, referer: http://xxxxx/UniFi-API-browser/ [Sun Nov 24 05:37:55.176652 2024] [php:notice] [pid 1743] [client 152.117.98.3:23632] fetching results for collection: list network configuration , referer:http://xxxxx/UniFi-API-browser/ [Sun Nov 24 05:37:55.290905 2024] [php:error] [pid 1743] [client 152.117.98.3:23632] PHP Fatal error: Uncaught TypeError: property_exists(): Argument #1 ($object_or_class) must be of type object|string, array given in /var/www/html/UniFi-API-browser/ajax/fetch_collection.php:171\nStack trace:\n#0 /var/www/html/UniFi-API-browser/ajax/fetch_collection.php(171): property_exists()\n#1 {main}\n thrown in /var/www/html/UniFi-API-browser/ajax/fetch_collection.php on line 171, referer: http://xxxxx/UniFi-API-browser/ [Sun Nov 24 05:37:56.954702 2024] [php:notice] [pid 1743] [client 152.117.98.3:23632] fetching results for collection: list network configuration , referer: http://xxxxx/UniFi-API-browser/ [Sun Nov 24 05:37:57.067189 2024] [php:error] [pid 1743] [client 152.117.98.3:23632] PHP Fatal error: Uncaught TypeError: property_exists(): Argument #1 ($object_or_class) must be of type object|string, array given in /var/www/html/UniFi-API-browser/ajax/fetch_collection.php:171\nStack trace:\n#0 /var/www/html/UniFi-API-browser/ajax/fetch_collection.php(171): property_exists()\n#1 {main}\n thrown in /var/www/html/UniFi-API-browser/ajax/fetch_collection.php on line 171, referer: http://xxxxx/UniFi-API-browser/ [Sun Nov 24 05:37:57.067397 2024] [php:notice] [pid 1735] [client 152.117.98.3:23869] fetching results for collection: list network configuration , referer: http://xxxxx/UniFi-API-browser/ [Sun Nov 24 05:37:57.415287 2024] [php:error] [pid 1735] [client 152.117.98.3:23869] PHP Fatal error: Uncaught TypeError: property_exists(): Argument #1 ($object_or_class) must be of type object|string, array given in /var/www/html/UniFi-API-browser/ajax/fetch_collection.php:171\nStack trace:\n#0 /var/www/html/UniFi-API-browser/ajax/fetch_collection.php(171): property_exists()\n#1 {main}\n thrown in /var/www/html/UniFi-API-browser/ajax/fetch_collection.php on line 171, referer: http://xxxxx/UniFi-API-browser/ [Sun Nov 24 05:37:59.086161 2024] [php:notice] [pid 1735] [client 152.117.98.3:23869] fetching results for collection: list network configuration , referer: http://xxxxx/UniFi-API-browser/ [Sun Nov 24 05:37:59.192117 2024] [php:error] [pid 1735] [client 152.117.98.3:23869] PHP Fatal error: Uncaught TypeError: property_exists(): Argument #1 ($object_or_class) must be of type object|string, array given in /var/www/html/UniFi-API-browser/ajax/fetch_collection.php:171\nStack trace:\n#0 /var/www/html/UniFi-API-browser/ajax/fetch_collection.php(171): property_exists()\n#1 {main}\n thrown in /var/www/html/UniFi-API-browser/ajax/fetch_collection.php on line 171, referer: http://xxxxx/UniFi-API-browser/ [Sun Nov 24 05:37:59.192306 2024] [php:notice] [pid 1743] [client 152.117.98.3:23632] fetching results for collection: list network configuration , referer: http://xxxxx/UniFi-API-browser/ [Sun Nov 24 05:37:59.317005 2024] [php:error] [pid 1743] [client 152.117.98.3:23632] PHP Fatal error: Uncaught TypeError: property_exists(): Argument #1 ($object_or_class) must be of type object|string, array given in /var/www/html/UniFi-API-browser/ajax/fetch_collection.php:171\nStack trace:\n#0 /var/www/html/UniFi-API-browser/ajax/fetch_collection.php(171): property_exists()\n#1 {main}\n thrown in /var/www/html/UniFi-API-browser/ajax/fetch_collection.php on line 171, referer: http://xxxxx/UniFi-API-browser/

malle-pietje commented 1 week ago

Hmm, looks very odd. Can you share a sanitized screenshot of the About modal?

malle-pietje commented 1 week ago

Figured out this was caused by the fact we still develop this package on PHP 7.4 for backwards compatibility but haven't yet tested it on PHP 8+. There was a minor bug due to that which has now been fixed in: https://github.com/Art-of-WiFi/UniFi-API-browser/releases/tag/v2.0.32

Thanks for reporting!

malle-pietje commented 1 week ago

Actually, 2.0.32 introduced a bug when handling results from API v2 endpoints. This now fixed with: https://github.com/Art-of-WiFi/UniFi-API-browser/releases/tag/v2.0.33