Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

https://mydomain.org/apps/solid/@validuser gives HTTP 405 error #50

Closed
samuk opened this issue Sep 24, 2021 · 3 comments
Closed

https://mydomain.org/apps/solid/@validuser gives HTTP 405 error #50

samuk opened this issue Sep 24, 2021 · 3 comments

Comments

@samuk
Copy link

samuk commented Sep 24, 2021

Steps to reproduce.

On a Cloudron instance of Nextcloud

Install and enable the Solid app from Nextcloud app store.

Visit https://mydomain.org/apps/solid/@validuser

Error log below

Sep 24 17:51:23 [Fri Sep 24 16:51:23.101959 2021] [php7:notice] [pid 323] [client 172.18.0.1:59960] {"reqId":"MOzAKYOp9gcX4YSkytpk","level":3,"time":"2021-09-24T16:51:23+00:00","remoteAddr":"82.132.xxx.xxx","user":"user","app":"PHP","method":"GET","url":"/apps/solid/@user/","message":"require_once(/app/data/apps/solid/lib/Controller/../../vendor/autoload.php): failed to open stream: No such file or directory at /app/data/apps/solid/lib/Controller/PageController.php#24","userAgent":"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.107 Safari/537.36","version":"22.1.1.2","exception":{"Exception":"Error","Message":"require_once(/app/data/apps/solid/lib/Controller/../../vendor/autoload.php): failed to open stream: No such file or directory at /app/data/apps/solid/lib/Controller/PageController.php#24","Code":0,"Trace":[{"file":"/app/data/apps/solid/lib/Controller/PageController.php","line":24,"function":"onError","class":"OC\\\\Log\\\\ErrorHandler","type":"::"},{"file":"/app/data/apps/solid/lib/Controller/PageController.php","line":24,"function":"require_once"},{"function":"__construct","class":"OCA\\\\Solid\\\\Controller\\\\PageController","type":"->"},{"file":"/app/code/lib/private/AppFramework/Utility/SimpleContainer.php","line":106,"function":"newInstanceArgs","class":"ReflectionClass","type":"->"},{"file":"/app/code/lib/private/AppFramework/Utility/SimpleContainer.php","line":114,"function":"buildClass","class":"OC\\\\AppFramework\\\\Utility\\\\SimpleContainer","type":"->"},{"file":"/app/code/lib/private/AppFramework/Utility/SimpleContainer.php","line":131,"function":"resolve","class":"OC\\\\AppFramework\\\\Utility\\\\SimpleContainer","type":"->"},{"file":"/app/code/lib/private/AppFramework/DependencyInjection/DIContainer.php","line":460,"function":"query","class":"OC\\\\AppFramework\\\\Utility\\\\SimpleContainer","type":"->"},{"file":"/app/code/lib/private/AppFramework/DependencyInjection/DIContainer.php","line":432,"function":"queryNoFallback","class":"OC\\\\AppFramework\\\\DependencyInjection\\\\DIContainer","type":"->"},{"file":"/app/code/lib/private/AppFramework/App.php","line":143,"function":"query","class":"OC\\\\AppFramework\\\\DependencyInjection\\\\DIContainer","type":"->"},{"file":"/app/code/lib/private/Route/Router.php","line":301,"function":"main","class":"OC\\\\AppFramework\\\\App","type":"::"},{"file":"/app/code/lib/base.php","line":1000,"function":"match","class":"OC\\\\Route\\\\Router","type":"->"},{"file":"/app/code/index.php","line":36,"function":"handleRequest","class":"OC","type":"::"}],"File":"/app/code/lib/private/Log/ErrorHandler.php","Line":92,"CustomMessage":"--"}}
Sep 24 17:51:23 [Fri Sep 24 16:51:23.102015 2021] [php7:error] [pid 323] [client 172.18.0.1:59960] PHP Fatal error: require_once(): Failed opening required '/app/data/apps/solid/lib/Controller/../../vendor/autoload.php' (include_path='/app/code/3rdparty/pear/archive_tar:/app/code/3rdparty/pear/console_getopt:/app/code/3rdparty/pear/pear-core-minimal/src:/app/code/3rdparty/pear/pear_exception:/app/code/apps') in /app/data/apps/solid/lib/Controller/PageController.php on line 24
Sep 24 17:51:23 [Fri Sep 24 16:51:23.102133 2021] [php7:notice] [pid 323] [client 172.18.0.1:59960] {"reqId":"MOzAKYOp9gcX4YSkytpk","level":3,"time":"2021-09-24T16:51:23+00:00","remoteAddr":"82.132.xxx.xxx","user":"user","app":"PHP","method":"GET","url":"/apps/solid/@user/","message":"require_once(): Failed opening required '/app/data/apps/solid/lib/Controller/../../vendor/autoload.php' (include_path='/app/code/3rdparty/pear/archive_tar:/app/code/3rdparty/pear/console_getopt:/app/code/3rdparty/pear/pear-core-minimal/src:/app/code/3rdparty/pear/pear_exception:/app/code/apps') at /app/data/apps/solid/lib/Controller/PageController.php#24","userAgent":"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.107 Safari/537.36","version":"22.1.1.2"}
Sep 24 17:51:23 82.132.xxx.xxx - - [24/Sep/2021:16:51:23 +0000] "GET /apps/solid/@user/ HTTP/1.1" 500 - "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.107 Safari/537.36"
Sep 24 17:51:24 82.132.xxx.xxx - - [24/Sep/2021:16:51:24 +0000] "GET /apps/photos/service-worker.js HTTP/1.1" 200 4828 "https:/mydomain/apps/photos/service-worker.js" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.107 Safari/537.36"
Sep 24 17:51:30 - - - [24/Sep/2021:16:51:30 +0000] "GET /index.php/login HTTP/1.1" 200 3715 "-" "Mozilla (CloudronHealth)"
Sep 24 17:51:30 [Fri Sep 24 16:51:30.413447 2021] [php7:notice] [pid 323] [client 172.18.0.1:60062] {"reqId":"5ejhUZwDrqXrSy3zBOcx","level":3,"time":"2021-09-24T16:51:30+00:00","remoteAddr":"82.132.xxx.xxx","user":"user","app":"PHP","method":"GET","url":"/apps/solid/@frank/","message":"require_once(/app/data/apps/solid/lib/Controller/../../vendor/autoload.php): failed to open stream: No such file or directory at /app/data/apps/solid/lib/Controller/PageController.php#24","userAgent":"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.107 Safari/537.36","version":"22.1.1.2","exception":{"Exception":"Error","Message":"require_once(/app/data/apps/solid/lib/Controller/../../vendor/autoload.php): failed to open stream: No such file or directory at /app/data/apps/solid/lib/Controller/PageController.php#24","Code":0,"Trace":[{"file":"/app/data/apps/solid/lib/Controller/PageController.php","line":24,"function":"onError","class":"OC\\\\Log\\\\ErrorHandler","type":"::"},{"file":"/app/data/apps/solid/lib/Controller/PageController.php","line":24,"function":"require_once"},{"function":"__construct","class":"OCA\\\\Solid\\\\Controller\\\\PageController","type":"->"},{"file":"/app/code/lib/private/AppFramework/Utility/SimpleContainer.php","line":106,"function":"newInstanceArgs","class":"ReflectionClass","type":"->"},{"file":"/app/code/lib/private/AppFramework/Utility/SimpleContainer.php","line":114,"function":"buildClass","class":"OC\\\\AppFramework\\\\Utility\\\\SimpleContainer","type":"->"},{"file":"/app/code/lib/private/AppFramework/Utility/SimpleContainer.php","line":131,"function":"resolve","class":"OC\\\\AppFramework\\\\Utility\\\\SimpleContainer","type":"->"},{"file":"/app/code/lib/private/AppFramework/DependencyInjection/DIContainer.php","line":460,"function":"query","class":"OC\\\\AppFramework\\\\Utility\\\\SimpleContainer","type":"->"},{"file":"/app/code/lib/private/AppFramework/DependencyInjection/DIContainer.php","line":432,"function":"queryNoFallback","class":"OC\\\\AppFramework\\\\DependencyInjection\\\\DIContainer","type":"->"},{"file":"/app/code/lib/private/AppFramework/App.php","line":143,"function":"query","class":"OC\\\\AppFramework\\\\DependencyInjection\\\\DIContainer","type":"->"},{"file":"/app/code/lib/private/Route/Router.php","line":301,"function":"main","class":"OC\\\\AppFramework\\\\App","type":"::"},{"file":"/app/code/lib/base.php","line":1000,"function":"match","class":"OC\\\\Route\\\\Router","type":"->"},{"file":"/app/code/index.php","line":36,"function":"handleRequest","class":"OC","type":"::"}],"File":"/app/code/lib/private/Log/ErrorHandler.php","Line":92,"CustomMessage":"--"}}
Sep 24 17:51:30 [Fri Sep 24 16:51:30.413507 2021] [php7:error] [pid 323] [client 172.18.0.1:60062] PHP Fatal error: require_once(): Failed opening required '/app/data/apps/solid/lib/Controller/../../vendor/autoload.php' (include_path='/app/code/3rdparty/pear/archive_tar:/app/code/3rdparty/pear/console_getopt:/app/code/3rdparty/pear/pear-core-minimal/src:/app/code/3rdparty/pear/pear_exception:/app/code/apps') in /app/data/apps/solid/lib/Controller/PageController.php on line 24
Sep 24 17:51:30 [Fri Sep 24 16:51:30.413630 2021] [php7:notice] [pid 323] [client 172.18.0.1:60062] {"reqId":"5ejhUZwDrqXrSy3zBOcx","level":3,"time":"2021-09-24T16:51:30+00:00","remoteAddr":"82.132.xxx.xxx","user":"user","app":"PHP","method":"GET","url":"/apps/solid/@frank/","message":"require_once(): Failed opening required '/app/data/apps/solid/lib/Controller/../../vendor/autoload.php' (include_path='/app/code/3rdparty/pear/archive_tar:/app/code/3rdparty/pear/console_getopt:/app/code/3rdparty/pear/pear-core-minimal/src:/app/code/3rdparty/pear/pear_exception:/app/code/apps') at /app/data/apps/solid/lib/Controller/PageController.php#24","userAgent":"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.107 Safari/537.36","version":"22.1.1.2"}
Sep 24 17:51:30 82.132.xxx.xxx - - [24/Sep/2021:16:51:30 +0000] "GET /apps/solid/@frank/ HTTP/1.1" 500 - "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.107 Safari/537.36"
@Potherca
Copy link
Member

Hi @samuk, thank you for taking the time to report this!

Based on the error logs:

require_once(/app/data/apps/solid/lib/Controller/../../vendor/autoload.php): failed to open stream: No such file or directory

it looks like the required PHP dependencies have not been installed by Composer.

(📝 Note to our team: This also happened while resolving #43 (comment) )

Could you try running Composer (composer install --no-dev --prefer-dist) in the nextcloud/apps/solid directory? I think on Cloudron that lives somewhere under /app/data/ ?

As instructed by the Cloudron documentation, you might need to bump the memory limit of the LAMP app to 1GB:

image

@samuk
Copy link
Author

samuk commented Sep 28, 2021

Nice that fixed it. Thanks.

root@2f4834e2-2f85-40ad-b8be-5b9eb3e114fc:/app/code/apps/solid# composer install --no-dev --prefer-dist
Cannot create cache directory /root/.composer/cache/repo/https---repo.packagist.org/, or directory is not writable. Proceeding without cache
Cannot create cache directory /root/.composer/cache/files/, or directory is not writable. Proceeding without cache
Loading composer repositories with package information
Warning from https://repo.packagist.org: Support for Composer 1 is deprecated and some packages will not be available. You should upgrade to Composer 2. See https://blog.packagist.com/deprecating-composer-1-support/
Updating dependencies
Package operations: 28 installs, 0 updates, 0 removals
  - Installing easyrdf/easyrdf (0.9.1): Downloading (100%)         
  - Installing spomky-labs/base64url (v2.0.4): Downloading (100%)         
  - Installing fgrosse/phpasn1 (v2.3.0): Downloading (100%)         
  - Installing brick/math (0.9.3): Downloading (100%)         
  - Installing web-token/jwt-core (v2.2.11): Downloading (100%)         
  - Installing paragonie/random_compat (v9.99.100): Downloading (100%)         
  - Installing defuse/php-encryption (v2.3.1): Downloading (100%)         
  - Installing psr/http-message (1.0.1): Downloading (100%)         
  - Installing lcobucci/jwt (3.4.5): Downloading (100%)         
  - Installing league/event (2.2.0): Downloading (100%)         
  - Installing league/oauth2-server (8.3.2): Downloading (100%)         
  - Installing pdsinterop/solid-auth (dev-main a306949): Downloading (100%)         
  - Installing ml/iri (1.1.4): Downloading (100%)         
  - Installing ml/json-ld (1.2.0): Downloading (100%)         
  - Installing league/flysystem (1.0.70): Downloading (100%)         
  - Installing pdsinterop/flysystem-rdf (dev-main 54eb365): Downloading (100%)         
  - Installing psr/log (1.1.4): Downloading (100%)         
  - Installing textalk/websocket (1.5.5): Downloading (100%)         
  - Installing psr/http-factory (1.0.1): Downloading (100%)         
  - Installing psr/cache (1.0.1): Downloading (100%)         
  - Installing league/flysystem-cached-adapter (1.1.0): Downloading (100%)         
  - Installing arc/base (2.1.1): Downloading (100%)         
  - Installing arc/web (2.1): Downloading (100%)         
  - Installing mjrider/flysystem-factory (v0.5.1): Downloading (100%)         
  - Installing laminas/laminas-zendframework-bridge (1.1.1): Downloading (100%)         
  - Installing laminas/laminas-diactoros (2.4.1): Downloading (100%)         
  - Installing pdsinterop/solid-crud (dev-main 578ab2d): Downloading (100%)         
  - Installing pdsinterop/flysystem-nextcloud (dev-main 5f76302): Downloading (100%)         
Writing lock file
Generating autoload files
8 packages you are using are looking for funding.
Use the `composer fund` command to find out more!

@samuk samuk closed this as completed Sep 28, 2021
@Potherca
Copy link
Member

Cool! Glad I could help. If you run into any other trouble, let us know!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants