Skip to content

Could not extract app solid #43

Closed
Closed

Description

@ch1ch0gz

Hi,

I have my own instance of nextcloud and I am trying to install the solid plugin via nextcloud.
It throws the following error "Could not extract app solid: Out-of-path file extraction {/tmp/oc_tmp_yc3XAx-folder/solid/vendor/bin/generate-defuse-key --> ../defuse/php-encryption/bin/generate-defuse-key}"

Test case:
-Open nextcloud
-Go to Apps

  • Look for Solid and click download and enable.

image

Looking forward to hearing from you.

Thanks,
Angel

Activity

  1. Potherca commented on Apr 7, 2021

    @Potherca
    Member

    Thank you for trying out Solid-Nextcloud and for bringing this to our attention!

    We'll try to reproduce this issue so we can come up with a fix. Could you tell me which version of Nextcloud you are running?

  2. ch1ch0gz commented on Apr 7, 2021

    @ch1ch0gz
    Author

    Hi
    I am running Nextcloud 21.0.0.

  3. Potherca commented on Apr 7, 2021

    @Potherca
    Member

    At the core of the problem lies the more strict checks (in Nextcloud code) regarding symlinks in our code, specifically:
    solid/vendor/bin/generate-defuse-key --> ../defuse/php-encryption/bin/generate-defuse-key

    This seems to be related to changes in Nextcloud (see nextcloud/server#24995 and nextcloud/news#1086 (comment)) apparently there is a fix in the upstream code (see pear/Archive_Tar#35 and nextcloud/server#25335) but that does not seem to have landed in NC21 (yet).

    Other libraries do seem to have workarounds (see nextcloud/news#1086), so we might be able to resolve this without having to wait for updates to Nextcloud.

    The offending file is part of a package that our code does not use directly, so it might suffice to simply remove the symlink from the packaged code...

    dependency-wheel

    @ylebre Do you have any thoughts that run in opposing directions?

  4. ch1ch0gz commented on Apr 7, 2021

    @ch1ch0gz
    Author

    Hi,

    Thanks for the answer but I could not find any generate-defuse-key file in my server.

    I tried again and have managed to install the plug in Solid 0.0.2 in nextcloud.
    I ran the following:

    But when I try clicking on the icon in my dashboard I get the following error.

    image

    image

    I enabled the logs in nextcloud. What the logs threw is below. Is there anything you want me to try or any specific logs you want me to generate?

    Thanks!

    Log output
    {
    	"reqId": "rcoSAFkQYZLHqGgO5kqu",
    	"level": 3,
    	"time": "2021-04-07T13:51:15+00:00",
    	"remoteAddr": "86.145.232.247",
    	"user": "ch1ch0gz",
    	"app": "index",
    	"method": "GET",
    	"url": "/apps/solid/",
    	"message": {
    		"Exception": "OCP\\AppFramework\\QueryException",
    		"Message": "Could not resolve config! Class config does not exist",
    		"Code": 0,
    		"Trace": [{
    			"file": "/var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php",
    			"line": 126,
    			"function": "resolve",
    			"class": "OC\\AppFramework\\Utility\\SimpleContainer",
    			"type": "->",
    			"args": ["config"]
    		}, {
    			"file": "/var/www/nextcloud/lib/private/ServerContainer.php",
    			"line": 162,
    			"function": "query",
    			"class": "OC\\AppFramework\\Utility\\SimpleContainer",
    			"type": "->",
    			"args": ["config", true]
    		}, {
    			"file": "/var/www/nextcloud/lib/private/AppFramework/DependencyInjection/DIContainer.php",
    			"line": 434,
    			"function": "query",
    			"class": "OC\\ServerContainer",
    			"type": "->",
    			"args": ["config", true]
    		}, {
    			"file": "/var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php",
    			"line": 96,
    			"function": "query",
    			"class": "OC\\AppFramework\\DependencyInjection\\DIContainer",
    			"type": "->",
    			"args": ["config"]
    		}, {
    			"function": "OC\\AppFramework\\Utility\\{closure}",
    			"class": "OC\\AppFramework\\Utility\\SimpleContainer",
    			"type": "->",
    			"args": ["*** sensitive parameters replaced ***"]
    		}, {
    			"file": "/var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php",
    			"line": 101,
    			"function": "array_map",
    			"args": [{
    					"__class__": "Closure"
    				},
    				[{
    					"name": "AppName",
    					"__class__": "ReflectionParameter"
    				}, {
    					"name": "request",
    					"__class__": "ReflectionParameter"
    				}, "*** sensitive parameter replaced ***", {
    					"name": "userManager",
    					"__class__": "ReflectionParameter"
    				}, {
    					"name": "contactsManager",
    					"__class__": "ReflectionParameter"
    				}, "And 2 more entries, set log level to debug to see all entries"]
    			]
    		}, {
    			"file": "/var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php",
    			"line": 109,
    			"function": "buildClass",
    			"class": "OC\\AppFramework\\Utility\\SimpleContainer",
    			"type": "->",
    			"args": [{
    				"name": "OCA\\Solid\\Controller\\AppController",
    				"__class__": "ReflectionClass"
    			}]
    		}, {
    			"file": "/var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php",
    			"line": 126,
    			"function": "resolve",
    			"class": "OC\\AppFramework\\Utility\\SimpleContainer",
    			"type": "->",
    			"args": ["OCA\\Solid\\Controller\\AppController"]
    		}, {
    			"file": "/var/www/nextcloud/lib/private/AppFramework/DependencyInjection/DIContainer.php",
    			"line": 459,
    			"function": "query",
    			"class": "OC\\AppFramework\\Utility\\SimpleContainer",
    			"type": "->",
    			"args": ["OCA\\Solid\\Controller\\AppController"]
    		}, {
    			"file": "/var/www/nextcloud/lib/private/AppFramework/DependencyInjection/DIContainer.php",
    			"line": 431,
    			"function": "queryNoFallback",
    			"class": "OC\\AppFramework\\DependencyInjection\\DIContainer",
    			"type": "->",
    			"args": ["OCA\\Solid\\Controller\\AppController"]
    		}, {
    			"file": "/var/www/nextcloud/lib/private/AppFramework/App.php",
    			"line": 144,
    			"function": "query",
    			"class": "OC\\AppFramework\\DependencyInjection\\DIContainer",
    			"type": "->",
    			"args": ["OCA\\Solid\\Controller\\AppController"]
    		}, {
    			"file": "/var/www/nextcloud/lib/private/Route/Router.php",
    			"line": 302,
    			"function": "main",
    			"class": "OC\\AppFramework\\App",
    			"type": "::",
    			"args": ["OCA\\Solid\\Controller\\AppController", "appLauncher", {
    				"__class__": "OC\\AppFramework\\DependencyInjection\\DIContainer"
    			}, {
    				"_route": "solid.app.appLauncher"
    			}]
    		}, {
    			"file": "/var/www/nextcloud/lib/base.php",
    			"line": 993,
    			"function": "match",
    			"class": "OC\\Route\\Router",
    			"type": "->",
    			"args": ["/apps/solid/"]
    		}, {
    			"file": "/var/www/nextcloud/index.php",
    			"line": 37,
    			"function": "handleRequest",
    			"class": "OC",
    			"type": "::",
    			"args": []
    		}],
    		"File": "/var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php",
    		"Line": 115,
    		"CustomMessage": "--"
    	},
    	"userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.192 Safari/537.36",
    	"version": "21.0.0.18"
    }
  5. ylebre commented on Apr 7, 2021

    @ylebre
    Member

    I'm able to reproduce the issue, so we can investigate further to see what is going wrong. So far I know that this broke in the update from Nextcloud 20 to 21, and the issue is somewhere in the dependancy injection for the ServerConfig in the constructor of our controllers.

  6. ch1ch0gz commented on Apr 20, 2021

    @ch1ch0gz
    Author

    Hi @ylebre ,

    How is it going? Do you have an update on this?

    Thanks!

  7. ylebre commented on Apr 20, 2021

    @ylebre
    Member

    Yes, just merged #45 which should fix the issue with Nextcloud 21. If you have time to confirm, that would be much appreciated!

  8. ch1ch0gz commented on Apr 20, 2021

    @ch1ch0gz
    Author

    Worked!
    image

    Thanks very much, we will continue testing it as we are interested in the combo (solid-nextcloud).

  9. ch1ch0gz commented on Apr 20, 2021

    @ch1ch0gz
    Author

    I pull the trigger to soon, sorry...

    When clicking on Profile
    image

    It sends me to a blank page and I get the below error on the server:

    Details
    {"reqId":"l7cQiJ0NXf7POduGep3j","level":3,"time":"2021-04-20T18:25:08+00:00","remoteAddr":"90.167.31.54","user":"jorge","app":"PHP","method":"GET","url":"/apps/solid/@jorge/","message":{"Exception":"Error","Message":"require_once(/var/www/nextcloud/apps/solid/lib/Controller/../../vendor/autoload.php): failed to open stream: No such file or directory at /var/www/nextcloud/apps/solid/lib/Controller/PageController.php#24","Code":0,"Trace":[{"file":"/var/www/nextcloud/apps/solid/lib/Controller/PageController.php","line":24,"function":"onError","class":"OC\\Log\\ErrorHandler","type":"::","args":[2,"require_once(/var/www/nextcloud/apps/solid/lib/Controller/../../vendor/autoload.php): failed to open stream: No such file or directory","/var/www/nextcloud/apps/solid/lib/Controller/PageController.php",24,{"AppName":"solid","request":{"__class__":"OC\\AppFramework\\Http\\Request"},"config":{"__class__":"OC\\AllConfig"},"userManager":{"__class__":"OC\\User\\Manager"},"urlGenerator":{"__class__":"OC\\URLGenerator"},"0":"And 1 more entries, set log level to debug to see all entries"}]},{"file":"/var/www/nextcloud/apps/solid/lib/Controller/PageController.php","line":24,"function":"require_once"},{"function":"__construct","class":"OCA\\Solid\\Controller\\PageController","type":"->","args":["solid",{"__class__":"OC\\AppFramework\\Http\\Request"},{"__class__":"OC\\AllConfig"},{"__class__":"OC\\User\\Manager"},{"__class__":"OC\\URLGenerator"},"jorge"]},{"file":"/var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php","line":101,"function":"newInstanceArgs","class":"ReflectionClass","type":"->","args":[["solid",{"__class__":"OC\\AppFramework\\Http\\Request"},{"__class__":"OC\\AllConfig"},{"__class__":"OC\\User\\Manager"},{"__class__":"OC\\URLGenerator"},"And 1 more entries, set log level to debug to see all entries"]]},{"file":"/var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php","line":109,"function":"buildClass","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->","args":[{"name":"OCA\\Solid\\Controller\\PageController","__class__":"ReflectionClass"}]},{"file":"/var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php","line":126,"function":"resolve","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->","args":["OCA\\Solid\\Controller\\PageController"]},{"file":"/var/www/nextcloud/lib/private/AppFramework/DependencyInjection/DIContainer.php","line":459,"function":"query","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->","args":["OCA\\Solid\\Controller\\PageController"]},{"file":"/var/www/nextcloud/lib/private/AppFramework/DependencyInjection/DIContainer.php","line":431,"function":"queryNoFallback","class":"OC\\AppFramework\\DependencyInjection\\DIContainer","type":"->","args":["OCA\\Solid\\Controller\\PageController"]},{"file":"/var/www/nextcloud/lib/private/AppFramework/App.php","line":144,"function":"query","class":"OC\\AppFramework\\DependencyInjection\\DIContainer","type":"->","args":["OCA\\Solid\\Controller\\PageController"]},{"file":"/var/www/nextcloud/lib/private/Route/Router.php","line":302,"function":"main","class":"OC\\AppFramework\\App","type":"::","args":["OCA\\Solid\\Controller\\PageController","profile",{"__class__":"OC\\AppFramework\\DependencyInjection\\DIContainer"},{"userId":"jorge","_route":"solid.page.profile"}]},{"file":"/var/www/nextcloud/lib/base.php","line":993,"function":"match","class":"OC\\Route\\Router","type":"->","args":["/apps/solid/@jorge/"]},{"file":"/var/www/nextcloud/index.php","line":37,"function":"handleRequest","class":"OC","type":"::","args":[]}],"File":"/var/www/nextcloud/lib/private/Log/ErrorHandler.php","Line":92,"CustomMessage":"--"},"userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:87.0) Gecko/20100101 Firefox/87.0","version":"21.0.0.18"}                                               
    {"reqId":"l7cQiJ0NXf7POduGep3j","level":3,"time":"2021-04-20T18:25:08+00:00","remoteAddr":"90.167.31.54","user":"jorge","app":"PHP","method":"GET","url":"/apps/solid/@jorge/","message":"require_once(): Failed opening required '/var/www/nextcloud/apps/solid/lib/Controller/../../vendor/autoload.php' (include_path='/var/www/nextcloud/apps/mail/vendor/pear-pear.horde.org/Horde_Crypt_Blowfish:/var/www/nextcloud/apps/mail/vendor/pear-pear.horde.org/Horde_Date:/var/www/nextcloud/apps/mail/vendor/pear-pear.horde.org/Horde_Exception:/var/www/nextcloud/apps/mail/vendor/pear-pear.horde.org/Horde_Idna:/var/www/nextcloud/apps/mail/vendor/pear-pear.horde.org/Horde_Imap_Client:/var/www/nextcloud/apps/mail/vendor/pear-pear.horde.org/Horde_ListHeaders:/var/www/nextcloud/apps/mail/vendor/pear-pear.horde.org/Horde_Mail:/var/www/nextcloud/apps/mail/vendor/pear-pear.horde.org/Horde_ManageSieve:/var/www/nextcloud/apps/mail/vendor/pear-pear.horde.org/Horde_Mime:/var/www/nextcloud/apps/mail/vendor/pear-pear.horde.org/Horde_Nls:/var/www/nextcloud/apps/mail/vendor/pear-pear.horde.org/Horde_Secret:/var/www/nextcloud/apps/mail/vendor/pear-pear.horde.org/Horde_Smtp:/var/www/nextcloud/apps/mail/vendor/pear-pear.horde.org at /var/www/nextcloud/apps/solid/lib/Controller/PageController.php#24","userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:87.0) Gecko/20100101 Firefox/87.0","version":"21.0.0.18"}
    
  10. ylebre commented on Apr 20, 2021

    @ylebre
    Member

    Well there is progress at least :) I'll see if I can reproduce this one in the weekend. Just to check, does your setup use symlinks by any chance, that might prevent it finding the autoloader. @Potherca any suggestions what the cause might be?

  11. ch1ch0gz commented on Apr 20, 2021

    @ch1ch0gz
    Author

    Not sure what you mean with symlinks. We do not have ../vendor/autoload.php
    Can we generate it or link it automatically from another autoload.php?

  12. ylebre commented on Apr 20, 2021

    @ylebre
    Member

    Ah, if the autoload is missing completely you should be able to generate it with composer install. Here is the snippet from the Dockerfile that does that part:

    # Run composer:
    WORKDIR /usr/src/nextcloud/apps/solid
    RUN ls
    RUN php /install/composer.phar require lcobucci/jwt:3.3.3
    RUN php /install/composer.phar update
    RUN php /install/composer.phar install --no-dev --prefer-dist
    
  13. ch1ch0gz commented on Apr 20, 2021

    @ch1ch0gz
    Author

    That worked. It has created a https://cloud.pr8.io/apps/solid/@ch1ch0gz/profile/card#me which I can access to.
    Unfortunately I am not able to log on in any app .
    For instance I tried to log in on the Focus app but I got an error. I do not seem to have an actual pod just the WebID.

    We have run those commands but we are doing it standalone.

    image

  14. ylebre commented on Apr 21, 2021

    @ylebre
    Member

    Good to hear you have it working this far!

    The apps listed are mostly broken. The boring explanation is that they are using an older token version that we don't support (we started the project after the spec was changed). We considered adding support for the legacy tokens, but decided against that because they were phased out for a valid reason, so we opted to go with the new spec knowing that older apps would not work.

    We are waiting for new or updated apps that support the new dpop tokens to add to the launcher. Any tips or suggestions on those are appreciated!

  15. ch1ch0gz commented on Apr 21, 2021

    @ch1ch0gz
    Author

    Hi,

    Thanks for your fast response.
    I think the problem is that the CSS has not initialized. A webId has been created and the profile/card#me too, but not the actual pod or at least I cannot see it anywhere.

    image

    We were testing it against our own app (pr8.io). We are not aware of any dpop tokens? We have not used them in our development. We have tested our app against newly created Pods from different providers (inrupt, solidcommunity and our own hosted pod) and works fine. Btw we use nginx

    We were hoping this plug would create a pod in nextcloud that we could use to connect to apps based on solid as well as utilise all existing capabilities of nextcloud.

    Is there anything else I can provide you with or test to try make this work?

    Cheers!

  16. ylebre commented on Apr 23, 2021

    @ylebre
    Member

    Ah - the storage pod will be inside Nextcloud as part of the 'normal' filesystem in there. It should create a 'solid' directory where everything will live. The storage itself would be reachable from the web under https://your.nextcloud/apps/solid/@{user}/storage/

    if I visit pr8.io i'm getting a dashboard with stats of some kind - maybe you can provide some more details about the app itself so we can try to get it to store something in our own nextcloud instance?

  17. ch1ch0gz commented on Apr 23, 2021

    @ch1ch0gz
    Author

    Please use https://pr8.io/

    We thought that too but nothing under /var/www/nextcloud/apps/solid

    image

    When I go to https://cloud.pr8.io/apps/solid/@ch1ch0gz/storage/ I get

    image

    /var/log/nextcloud.log gives the below. Is there any information or test we can perform that could help to resolve this issue?
    Happy as well to do a quick Zoom session so you could have a look at our set up.

    Many thanks!

    {"reqId":"pXX3RnqVanr0pUZe5Tvw","level":3,"time":"2021-04-23T17:50:30+00:00","remoteAddr":"81.155.95.65","user":"ch1ch0gz","app":"index","method":"GET","url":"/apps/solid/@ch1ch0gz/storage/undefined/img/notifications.svg","message":{"Exception":"Exception","Message":"explode() expects parameter 2 to be string, null given","Code":0,"Trace":[{"file":"/var/www/nextcloud/lib/private/AppFramework/App.php","line":157,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[{"config":{"userManager":{"__class__":"OC\\User\\Manager"},"urlGenerator":{"__class__":"OC\\URLGenerator"},"__class__":"OCA\\Solid\\ServerConfig"},"rootFolder":{"__class__":"OC\\Files\\Node\\LazyRoot"},"rawRequest":{"__class__":"Laminas\\Diactoros\\ServerRequest"},"response":{"__class__":"Laminas\\Diactoros\\Response"},"userFolder":{"__class__":"OC\\Files\\Node\\Folder"},"solidFolder":{"__class__":"OC\\Files\\Node\\Folder"},"filesystem":{"__class__":"League\\Flysystem\\Filesystem"},"resourceServer":{"basePath":"/apps/solid/@ch1ch0gz/storage","__class__":"Pdsinterop\\Solid\\Resources\\Server"},"WAC":{"__class__":"Pdsinterop\\Solid\\Auth\\WAC"},"DPop":{"__class__":"Pdsinterop\\Solid\\Auth\\Utils\\DPop"},"__class__":"OCA\\Solid\\Controller\\StorageController"},"handleGet"]},{"file":"/var/www/nextcloud/lib/private/Route/Router.php","line":302,"function":"main","class":"OC\\AppFramework\\App","type":"::","args":["OCA\\Solid\\Controller\\StorageController","handleGet",{"__class__":"OC\\AppFramework\\DependencyInjection\\DIContainer"},{"userId":"ch1ch0gz","path":"/undefined/img/notifications.svg","_route":"solid.storage.handleGet"}]},{"file":"/var/www/nextcloud/lib/base.php","line":993,"function":"match","class":"OC\\Route\\Router","type":"->","args":["/apps/solid/@ch1ch0gz/storage/undefined/img/notifications.svg"]},{"file":"/var/www/nextcloud/index.php","line":37,"function":"handleRequest","class":"OC","type":"::","args":[]}],"File":"/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","Line":159,"Previous":{"Exception":"TypeError","Message":"explode() expects parameter 2 to be string, null given","Code":0,"Trace":[{"file":"/var/www/nextcloud/apps/solid/vendor/pdsinterop/solid-auth/src/Utils/DPop.php","line":14,"function":"explode","args":[" ",null]},{"file":"/var/www/nextcloud/apps/solid/lib/Controller/StorageController.php","line":294,"function":"getWebId","class":"Pdsinterop\\Solid\\Auth\\Utils\\DPop","type":"->","args":[{"__class__":"Laminas\\Diactoros\\ServerRequest"}]},{"file":"/var/www/nextcloud/apps/solid/lib/Controller/StorageController.php","line":322,"function":"handleRequest","class":"OCA\\Solid\\Controller\\StorageController","type":"->","args":["ch1ch0gz","/undefined/img/notifications.svg"]},{"file":"/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":218,"function":"handleGet","class":"OCA\\Solid\\Controller\\StorageController","type":"->","args":["ch1ch0gz","/undefined/img/notifications.svg"]},{"file":"/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":127,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[{"config":{"userManager":{"__class__":"OC\\User\\Manager"},"urlGenerator":{"__class__":"OC\\URLGenerator"},"__class__":"OCA\\Solid\\ServerConfig"},"rootFolder":{"__class__":"OC\\Files\\Node\\LazyRoot"},"rawRequest":{"__class__":"Laminas\\Diactoros\\ServerRequest"},"response":{"__class__":"Laminas\\Diactoros\\Response"},"userFolder":{"__class__":"OC\\Files\\Node\\Folder"},"solidFolder":{"__class__":"OC\\Files\\Node\\Folder"},"filesystem":{"__class__":"League\\Flysystem\\Filesystem"},"resourceServer":{"basePath":"/apps/solid/@ch1ch0gz/storage","__class__":"Pdsinterop\\Solid\\Resources\\Server"},"WAC":{"__class__":"Pdsinterop\\Solid\\Auth\\WAC"},"DPop":{"__class__":"Pdsinterop\\Solid\\Auth\\Utils\\DPop"},"__class__":"OCA\\Solid\\Controller\\StorageController"},"handleGet"]},{"file":"/var/www/nextcloud/lib/private/AppFramework/App.php","line":157,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[{"config":{"userManager":{"__class__":"OC\\User\\Manager"},"urlGenerator":{"__class__":"OC\\URLGenerator"},"__class__":"OCA\\Solid\\ServerConfig"},"rootFolder":{"__class__":"OC\\Files\\Node\\LazyRoot"},"rawRequest":{"__class__":"Laminas\\Diactoros\\ServerRequest"},"response":{"__class__":"Laminas\\Diactoros\\Response"},"userFolder":{"__class__":"OC\\Files\\Node\\Folder"},"solidFolder":{"__class__":"OC\\Files\\Node\\Folder"},"filesystem":{"__class__":"League\\Flysystem\\Filesystem"},"resourceServer":{"basePath":"/apps/solid/@ch1ch0gz/storage","__class__":"Pdsinterop\\Solid\\Resources\\Server"},"WAC":{"__class__":"Pdsinterop\\Solid\\Auth\\WAC"},"DPop":{"__class__":"Pdsinterop\\Solid\\Auth\\Utils\\DPop"},"__class__":"OCA\\Solid\\Controller\\StorageController"},"handleGet"]},{"file":"/var/www/nextcloud/lib/private/Route/Router.php","line":302,"function":"main","class":"OC\\AppFramework\\App","type":"::","args":["OCA\\Solid\\Controller\\StorageController","handleGet",{"__class__":"OC\\AppFramework\\DependencyInjection\\DIContainer"},{"userId":"ch1ch0gz","path":"/undefined/img/notifications.svg","_route":"solid.storage.handleGet"}]},{"file":"/var/www/nextcloud/lib/base.php","line":993,"function":"match","class":"OC\\Route\\Router","type":"->","args":["/apps/solid/@ch1ch0gz/storage/undefined/img/notifications.svg"]},{"file":"/var/www/nextcloud/index.php","line":37,"function":"handleRequest","class":"OC","type":"::","args":[]}],"File":"/var/www/nextcloud/apps/solid/vendor/pdsinterop/solid-auth/src/Utils/DPop.php","Line":14},"CustomMessage":"--"},"userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.128 Safari/537.36","version":"21.0.0.18"}
  18. ylebre commented on Apr 24, 2021

    @ylebre
    Member

    I think a shared screen session somewhere would be helpful to push things along a bit further. It would also be helpful to give you some answers on a couple of questions. My schedule is a bit swamped at the moment, but perhaps we can find a moment somewhere on a monday or wednesday somewhere in the couple of next weeks?

    I installed a 'fresh' nextcloud (version 21) locally using the main branch from git, but I'm not currently able to reproduce the behaviour you are seeing. I could log with it to https://pr8.io, though after that things stop working. I saw in the http logs that the app is using the Bearer token (instead of dpop) which Solid-Nextcloud does not support at this time.

  19. ch1ch0gz commented on Apr 26, 2021

    @ch1ch0gz
    Author

    Perfect. Just sent you this morning a mail to yvo@muze.nl
    BTW, we just moved our application to dpop.

  20. JorgeMartinezPizarro commented on Apr 28, 2021

    @JorgeMartinezPizarro

    Thanks for your help @ylebre ! We already changed the tokens and did some adjustments to stick to the latest spec. I also think a shared screen session could be great. As @ch1ch0gz pointed, it seems that we are just not starting the solid server within out nextcloud instance.

  21. ylebre commented on Apr 29, 2021

    @ylebre
    Member

    Ok - after the screen session I'm pretty sure that this is the cause of the issue:
    pdsinterop/php-solid-auth#17

    We'll try to run it the server using nginx to see if that reproduces the problem!

  22. ch1ch0gz commented on May 4, 2021

    @ch1ch0gz
    Author

    Hi @ylebre,

    We have managed to log in in our app with nginx using the webid created by your plugin in nexcloud. Unfortunately PUTs, PATCHs and GET resources fail on our end. We will be opening a separate issue for this.

    In order to make it work with NGINX:

    • We have added the below to nextcloud.conf

      location = /.well-known/openid-configuration {
        add_header Access-Control-Allow-Origin "*";
        return 302 $scheme://$host:$server_port/apps/solid/openid;
      }
      
    • We also have added with brute force the following to site.conf

      #add_header Access-Control-Allow-Origin https://pr8.io;
      add_header Access-Control-Allow-Origin $http_origin;
      #add_header Access-Control-Allow-Origin http://localhost:3000;
      add_header Access-Control-Allow-Credentials true;
      add_header Access-Control-Allow-Headers "*, allow, authorization, content-type, dpop, slug, link, accept, map";
      add_header Access-Control-Allow-Methods "GET, PUT, POST, OPTIONS, DELETE, PATCH";
      add_header Accept-Patch "application/sparql-update";
      add_header Access-Control-Expose-Headers "Authorization, User, Location, Link, Vary, Last-Modified, ETag, Accept-Patch, Accept-Post, Updates-Via, Allow, WAC-Allow, Content-Length, WWW-Authenticate, MS-Author-Via";
      proxy_pass_request_headers on;
      proxy_no_cache $cookie_nocache $arg_nocache$arg_comment;
      proxy_no_cache $http_pragma $http_authorization;
      proxy_cache_bypass $cookie_nocache $arg_nocache $arg_comment;
      proxy_cache_bypass $http_pragma $http_authorization;
      proxy_set_header HTTP_AUTHORIZATION $http_authorization
      

    Cheers!

  23. Potherca commented on Oct 19, 2022

    @Potherca
    Member

    I am closing this issue, as the original problem has been resolved. For updates on NGINX please follow pdsinterop/php-solid-auth#17

    Once #107 has been resolved, the installation should be more smooth than it is now (so you might want to wait for v0.7.1 to be released).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions