Closed mr-bryn closed 7 months ago
Hello :wave:
Thank you for taking the time to open this issue with recognize. I know it's frustrating when software causes problems. You have made the right choice to come here and open an issue to make sure your problem gets looked at and if possible solved. I try to answer all issues and if possible fix all bugs here, but it sometimes takes a while until I get to it. Until then, please be patient. Note also that GitHub is a place where people meet to make software better together. Nobody here is under any obligation to help you, solve your problems or deliver on any expectations or demands you may have, but if enough people come together we can collaborate to make this software better. For everyone. Thus, if you can, you could also look at other issues to see whether you can help other people with your knowledge and experience. If you have coding experience it would also be awesome if you could step up to dive into the code and try to fix the odd bug yourself. Everyone will be thankful for extra helping hands! One last word: If you feel, at any point, like you need to vent, this is not the place for it; you can go to the forum, to twitter or somewhere else. But this is a technical issue tracker, so please make sure to focus on the tech and keep your opinions to yourself. (Also see our Code of Conduct. Really.)
I look forward to working with you on this issue Cheers :blue_heart:
A possible solution is to use php's in-built function php_uname()
return new JSONResponse(['platform' => php_uname('m')]);
returns the correct value under the snap package for me
A possible solution is to use php's in-built function php_uname()
Cool! Would you be amenable to make a PR that adds this as a fallback?
Which version of recognize are you using?
5.0.3
Enabled Modes
Object recognition, Face recognition
TensorFlow mode
Normal mode, WASM mode
Downstream App
Photos App
Which Nextcloud version do you have installed?
Nextcloud 27.1.7
Which Operating system do you have installed?
Debian 11
Which database are you running Nextcloud on?
MySQL 8
Which Docker container are you using to run Nextcloud? (if applicable)
N/A
How much RAM does your server have?
16GB
What processor Architecture does your CPU have?
x86_64
Describe the Bug
Request to "index.php/apps/recognize/admin/platform" incorrectly returns a null value, despite running on a supported x86_64 platform.
The platform() checking function on line 157 of recognize/lib/Controller/AdminController.php receives a non-0 return code when attempting to execute "lscpu --json".
The command instead returns "sh: 1: lscpu: Permission denied".
Executing the platform() function outside of the snap environment, on the same system, successfully returns the correct platform value "x86_64"
Expected Behavior
The platform() function correctly returns the platform when operating within the snap envrionment
To Reproduce
Install the Nextcloud snap package (build 40887) from the latest/stable channel.
Install recognize.
Turn on dev tools and go to the recognize admin page.
Observe the request to /index.php/apps/recognize/admin/platform contains the response "platform: null".
By altering line 165 of AdminController.php to
return new JSONResponse(['platform' => $output]);
the true command return value can be observed.Debug log
No response