Comments (8)
Not able to reproduce so far, but I'll leave open while we await other reports.
Any particular section or app profile trigger this for you?
from server.
Just entering the Apps section throws this error.
from server.
Hi,
please apply the following patch to your installation. Then try opening the apps section again and then check your logfile for "array given to DependencyAnalyzer.getValue" and share the complete logline with us.
Index: lib/private/App/DependencyAnalyzer.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/lib/private/App/DependencyAnalyzer.php b/lib/private/App/DependencyAnalyzer.php
--- a/lib/private/App/DependencyAnalyzer.php (revision 806e390d14123f0bdf9e805bd55553339a0b5d3b)
+++ b/lib/private/App/DependencyAnalyzer.php (date 1717527159746)
@@ -31,6 +31,7 @@
namespace OC\App;
use OCP\IL10N;
+use function OCP\Log\logger;
class DependencyAnalyzer {
/** @var array */
@@ -395,6 +396,12 @@
if (isset($element['@value'])) {
return $element['@value'];
}
+ if (is_array($element)) {
+ logger('core')->error('array given to DependencyAnalyzer.getValue', [
+ 'element' => $element,
+ 'trace' => new \Exception('array given to DependencyAnalyzer.getValue')
+ ]);
+ }
return (string)$element;
}
}
from server.
{"reqId":"WWII5J4EAuEPo2n7Oyod","level":3,"time":"2024-06-05T00:07:34+00:00","remoteAddr":"192.168.64.1","user":"xxx","app":"core","method":"GET","url":"/settings/apps/list","message":"array given to DependencyAnalyzer.getValue","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/125.0.0.0 Safari/537.36","version":"29.0.1.1","data":{"app":"core","element":"{"min-version":"5.7"}","trace":"{"class":"Exception","message":"array given to DependencyAnalyzer.getValue","code":0,"file":"/usr/share/nginx/nextcloud/lib/private/App/DependencyAnalyzer.php:402","trace":"#0 /usr/share/nginx/nextcloud/lib/private/App/DependencyAnalyzer.php(215): OC\App\DependencyAnalyzer->getValue()\n#1 [internal function]: OC\App\DependencyAnalyzer->OC\App\{closure}()\n#2 /usr/share/nginx/nextcloud/lib/private/App/DependencyAnalyzer.php(214): array_map()\n#3 /usr/share/nginx/nextcloud/lib/private/App/DependencyAnalyzer.php(65): OC\App\DependencyAnalyzer->analyzeDatabases()\n#4 /usr/share/nginx/nextcloud/apps/settings/lib/Controller/AppSettingsController.php(348): OC\App\DependencyAnalyzer->analyze()\n#5 [internal function]: OCA\Settings\Controller\AppSettingsController->OCA\Settings\Controller\{closure}()\n#6 /usr/share/nginx/nextcloud/apps/settings/lib/Controller/AppSettingsController.php(319): array_map()\n#7 /usr/share/nginx/nextcloud/lib/private/AppFramework/Http/Dispatcher.php(232): OCA\Settings\Controller\AppSettingsController->listApps()\n#8 /usr/share/nginx/nextcloud/lib/private/AppFramework/Http/Dispatcher.php(138): OC\AppFramework\Http\Dispatcher->executeController()\n#9 /usr/share/nginx/nextcloud/lib/private/AppFramework/App.php(184): OC\AppFramework\Http\Dispatcher->dispatch()\n#10 /usr/share/nginx/nextcloud/lib/private/Route/Router.php(338): OC\AppFramework\App::main()\n#11 /usr/share/nginx/nextcloud/lib/base.php(1050): OC\Route\Router->match()\n#12 /usr/share/nginx/nextcloud/index.php(49): OC::handleRequest()\n#13 {main}"}"},"id":"665fac57c61b0"}
from server.
Thanks 👍
Somehow, the min-version definition for a database in info.xml seems to trigger that error.
To loop over all files and find the min-version definitions:
grep -i -r "<database min-version=" .
I think it could be the sensorloggers app:
https://github.com/search?q=%3Cdatabase+min-version%3D%225.7&type=code
The definition itself looks correct. I'm unsure why it fails here.
Maybe because it's only one database definition.
Seems like this block is missing to make it work.
However, comparing the min-version for database is not implemented anyway 🙈
Index: lib/private/App/DependencyAnalyzer.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/lib/private/App/DependencyAnalyzer.php b/lib/private/App/DependencyAnalyzer.php
--- a/lib/private/App/DependencyAnalyzer.php (revision cac6443cbbc1aadb56e0499b19588386fd0c3cce)
+++ b/lib/private/App/DependencyAnalyzer.php (date 1717578526379)
@@ -186,6 +186,9 @@
if (!is_array($supportedDatabases)) {
$supportedDatabases = [$supportedDatabases];
}
+ if (isset($supportedDatabases['@value'])) {
+ $supportedDatabases = [$supportedDatabases];
+ }
$supportedDatabases = array_map(function ($db) {
return $this->getValue($db);
}, $supportedDatabases);
from server.
{"reqId":"jd5vyyp43IHt21mElXF9","level":3,"time":"2024-06-05T13:12:46+00:00","remoteAddr":"192.168.64.1","user":"xxx","app":"core","method":"GET","url":"/settings/apps/list","message":"array given to DependencyAnalyzer.getValue","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/125.0.0.0 Safari/537.36","version":"29.0.1.1","data":{"app":"core","element":"{"min-version":"5.7"}","trace":"{"class":"Exception","message":"array given to DependencyAnalyzer.getValue","code":0,"file":"/usr/share/nginx/nextcloud/lib/private/App/DependencyAnalyzer.php:402","trace":"#0 /usr/share/nginx/nextcloud/lib/private/App/DependencyAnalyzer.php(215): OC\App\DependencyAnalyzer->getValue()\n#1 [internal function]: OC\App\DependencyAnalyzer->OC\App\{closure}()\n#2 /usr/share/nginx/nextcloud/lib/private/App/DependencyAnalyzer.php(214): array_map()\n#3 /usr/share/nginx/nextcloud/lib/private/App/DependencyAnalyzer.php(65): OC\App\DependencyAnalyzer->analyzeDatabases()\n#4 /usr/share/nginx/nextcloud/apps/settings/lib/Controller/AppSettingsController.php(348): OC\App\DependencyAnalyzer->analyze()\n#5 [internal function]: OCA\Settings\Controller\AppSettingsController->OCA\Settings\Controller\{closure}()\n#6 /usr/share/nginx/nextcloud/apps/settings/lib/Controller/AppSettingsController.php(319): array_map()\n#7 /usr/share/nginx/nextcloud/lib/private/AppFramework/Http/Dispatcher.php(232): OCA\Settings\Controller\AppSettingsController->listApps()\n#8 /usr/share/nginx/nextcloud/lib/private/AppFramework/Http/Dispatcher.php(138): OC\AppFramework\Http\Dispatcher->executeController()\n#9 /usr/share/nginx/nextcloud/lib/private/AppFramework/App.php(184): OC\AppFramework\Http\Dispatcher->dispatch()\n#10 /usr/share/nginx/nextcloud/lib/private/Route/Router.php(338): OC\AppFramework\App::main()\n#11 /usr/share/nginx/nextcloud/lib/base.php(1050): OC\Route\Router->match()\n#12 /usr/share/nginx/nextcloud/index.php(49): OC::handleRequest()\n#13 {main}"}"},"id":"666064552b50f"}
{"reqId":"Uq6X5LgJWuQVJJ8mOkzX","level":3,"time":"2024-06-05T13:12:45+00:00","remoteAddr":"192.168.64.1","user":"xxx","app":"PHP","method":"GET","url":"/settings/apps/list","message":"Array to string conversion at /usr/share/nginx/nextcloud/lib/private/App/DependencyAnalyzer.php#405","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/125.0.0.0 Safari/537.36","version":"29.0.1.1","data":{"app":"PHP"},"id":"666064552b522"}
from server.
@corsairius It should work again if you remove the sensorloggers app (if possible with occ or by deleting the folder).
from server.
Removed the sensorloggers from the disabled app list, as well as the others hanging around. Appears corrected. Thanks!
from server.
Related Issues (20)
- Copy dialogue, include defining filename in the GUI
- [Bug]: `Failed to open stream` + `Error while running background job` immediately after installation HOT 2
- Regression: automatic text color based on background does not apply to all CSS elements like previously HOT 1
- Reminder for link shares with expiration date
- [Bug]: (CalDAV) Calendar event cancellation iMip messages are sent twice, on delete and on trash empty HOT 2
- [Bug]: Wrong tooltip (hover) on file and folder names in Nextcloud Files
- Optimization of queries on very large datasets HOT 3
- [Bug]: Change Warn on excessive memory consumption in background jobs to info HOT 2
- [Bug]: Workflow for new releases HOT 1
- [Bug]: Getting Internal Server Error since updating to 28.0.5 and above HOT 4
- [Bug]: Disabling the preview does not stop the creation of the folder tree HOT 4
- [Bug]: File versions expiration does not work properly HOT 2
- [Bug]: MKCALENDAR without supported-calendar-component-set doesn't support journals by default HOT 3
- [Bug]: Create new user errors when closed out prematurely then reopened (user already exists)
- Log `updater.secret` creation and expiration
- [Bug]: Error No provider found for id files HOT 1
- Shipped apps previously released via the app store show "Last updated" date based on legacy app store entry not installed app
- [Bug]: Numerical accounts show all files/folders in "Shared" status in the web UI HOT 3
- [Bug]: isHtaccessWorking check fails on IDN domains HOT 5
- (SetupChecks) Add the actual hostname/URL/IP that triggered the warning/error
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from server.