Closed aakerbeere closed 1 year ago
Hi! Lets see if we can get you up and running...
For Solid NC to work, the OpenID .well-known
file needs to be present under https://myDomain/.well-known/openid-configuration
.
When this plugin was created, Nextcloud (NC20) did not have a mechanism to add files underneath https://myDomain/.well-known/
. All URLs had to be underneath the App space. This means the file is present at https://myDomain/index.php/apps/solid/openid
(or https://myDomain/apps/solid/openid
) instead of where it should be.
It could be possible to redirect from /.well-known/openid-configuration
to /index.php/apps/solid/openid
(for instance in the Apache config or a .htaccess
file) but it proved difficult to add CORS headers to the redirect. Hence the advice to copy the JSON content from /index.php/apps/solid/openid
to /.well-known/openid-configuration
.
Reading the INSTALL.md, I think some rewording is needed to make that more clear.
In newer versions of Nextcloud it is (finally!) possible to add well-known file. We plan to implement this (see #46) but we need to finish #59 first, so for now the copy/paste is the best we can offer 😞
To get things started, is there JSON content at https://myDomain/index.php/apps/solid/openid ?
Thank you @Potherca
Sorry for being late. I appreciate your assistance.
When doing "https://myDomain/apps/solid/openid" a blank page opens.
No apology needed! I know everyone has their own timeline to consider.
If https://myDomain/apps/solid/openid
shows a blank page, it is most likely there is an error somewhere underwater.
It might show up in your error logs.
What Nextcloud and PHP version are you using?
22.2.3.0 7.4.27
Ah, good! Then we can, at least, be assured it isn't one of the PHP8 related issues. NC22 has not been explicitly tested yet (this was planned together with PHP8 support) but things should work the same as NC21, which has been tested.
Remote debugging is somewhat cumbersome, so please bear with me. First, lets validate some assumptions:
vendor
directory besides the composer.lock
file? (I.e. in the same directory on disk as where the composer.json
and composer.lock
are)/index.php/apps/solid/openid
(without trailing slash) and /index.php/apps/solid/openid/
(with trailing slash), as well as with and without the index.php
prefix?nextcloud/data/nextcloud.log
)Thank you @Potherca
vendor
directory:
:~ $ ls /var/www/nextcloud/apps/solid/
appinfo build composer.json composer.lock css img js lib LICENSE Makefile phpunit.integration.xml phpunit.xml
README.md templates tests
https://<myDomain>/index.php/apps/solid/openid
: empty page
https://<myDomain>/index.php/apps/solid/openid/
: empty page
https://<myDomain>/apps/solid/openid
: empty page
https://<myDomain/apps/solid/openid/
: empty page:/var/www/nextcloud/data# grep -E 'error' nextcloud.log | grep -E 'php'
i get plenty of output such asMaybe this not to be of much interest to you and there is some better expression for grep to find what you want.
Hmmm... Looking at the INSTALL.md
instructions, I see that composer install
is only mentioned when installing the app from source. But without the vendor
directory nothing works, as all the third-party dependencies live there. We had the same issue in #50.
We really need to work on those install instructions 😞 Or maybe add the vendor
package to the repo or deploy package.
For now, is it possible for you to run composer install --no-dev --prefer-dist
in the /var/www/nextcloud/apps/solid/
directory?
(Or composer.phar install --no-dev --prefer-dist
, depending on your setup).
I'll think on a better regex in case we need one further along.
Not possible:
root@<host>:/var/www/nextcloud/apps/solid# composer install --no-dev --prefer-dist
-bash: composer: Kommando nicht gefunden.
root@<host>:/var/www/nextcloud/apps/solid# composer.phar install --no-dev --prefer-dist
-bash: composer.phar: Kommando nicht gefunden.
Thank you for trying! I've been looking into things from our end, and it looks like during the last release, the step to add the vendor
directory was missing. ðŸ˜
I've opened issues to fix the package release (#64), add the vendor directory (#65), and to warn other users while this issue is not resolved (#66).
For a new release I will need to work together with another member of our team, which will be monday at the soonest. Looking at my current projects and deadlines, automation will probably take another week or so.
Regarding your issue, this gives us three options:
composer
and run the vendor install step (the workaround described in #66)vendor
included)Whichever you choose, thank you again for reporting this and bearing with us. This project is still very young, and we appreciate any interst (and feedback!) it receives.
Thank you @Potherca You are very welcome.
I know the project is young. When i started reading about the solid project, i wanted to have my own instance for privacy concerns. But i was somehow feared my knowledge not to be sufficient to get it up and running. So i started by having my own cloud. Now getting my own solid instance through NC-app would make me very happy.
I went through #66:
:/var/www/nextcloud/apps/solid $ sudo php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
:/var/www/nextcloud/apps/solid $ php -r "if (hash_file('sha384', 'composer-setup.php') === '906a84df04cea2aa72f40b5f787e49f22d4c2f19492ac310e8cba5b96ac8b64115ac402c8cd292b8a03482574915d1a8') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"
Installer verified
:/var/www/nextcloud/apps/solid $ sudo php composer-setup.php
All settings correct for using Composer
Downloading...
Composer (version 2.2.3) successfully installed to: /var/www/nextcloud/apps/solid/composer.phar
Use it: php composer.phar
:/var/www/nextcloud/apps/solid $ sudo php -r "unlink('composer-setup.php');"
I ran "composer install" as root despite the warning. Dependencies have been installed, but some warnings came up at the beginning and at the end:
:/var/www/nextcloud/apps/solid $ sudo php composer.phar install
Do not run Composer as root/super user! See https://getcomposer.org/root for details
Continue as root/super user [yes]? yes
Installing dependencies from lock file (including require-dev)
Verifying lock file contents can be installed on current platform.
Warning: The lock file is not up to date with the latest changes in composer.json. You may be getting outdated dependencies. It is recommended that you run `composer update` or `composer update <package name>`.
Package operations: 54 installs, 0 updates, 0 removals
- Downloading arc/base (2.1.1)
...
- Installing phpunit/phpunit (5.7.27): Extracting archive
Package phpunit/php-token-stream is abandoned, you should avoid using it. No replacement was suggested.
Package phpunit/phpunit-mock-objects is abandoned, you should avoid using it. No replacement was suggested.
Generating autoload files
13 packages you are using are looking for funding.
Use the `composer fund` command to find out more!
regards
My apologies for the delay, I was taken ill this week. 😥
The warnings about abandoned packages can be ignored. They are development dependencies which are not used by the main code. I'm working on updating the composer dependencies in a separate branch. From what I can see you shouldn't be too far behind with those dependencies so for now the warning about the lock file not being up to date can also be ignored.
At this point things at the .well-known/openid-configuration
should start working, or we should start seeing errors in the Nextcloud logs (or the Apache logs if things are really bad).
You could also start seeing behaviour (i.e. errors) as described in #62. I'm hoping to merge and release fixes for this the coming week.
Thank you @potherca
No apology needed. Take your time to recover.
Actually i get output when doing "https://<myDomain>/apps/solid/openid"
but also find log entries when starting solid:
[PHP] Error: in_array() expects parameter 2 to be array, string given at /var/www/nextcloud/apps/solid/lib/Controller/AppController.php#55
[PHP] Error: Invalid argument supplied for foreach() at /var/www/nextcloud/apps/solid/lib/Controller/AppController.php#37
[PHP] Error: Undefined variable: userClients at /var/www/nextcloud/apps/solid/lib/Controller/AppController.php#37
No errors in apache error.log so far.
With https://<myDomain>/.well-known/openid-configuration
i get "not supported"
@Potherca
Tell me if i can contribute something. No changes since my last post.
Things have been moving forward again lately!
Since release v0.5.0
the vendor
directory has been part of the release, which solves this specific issue. (Hence me closing this issue)
Once #107 has been resolved, installing things should be smooth again (so you might want to wait for v0.7.1
to be released).
After installing from NC app store and activating solid app i can find "/var/www/nextcloud/apps/solid/composer.json". Are you talking about this when considering something like "take and put JSON from ... to" and do you mean "copy the file". When doing "https://myDomain/.well-known/openid-configuration" i get "message: openid-configuration not supported".
Some hints would be great.
Regards markus