-
Notifications
You must be signed in to change notification settings - Fork 11
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
Could not extract app solid #43
Comments
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? |
Hi |
At the core of the problem lies the more strict checks (in Nextcloud code) regarding symlinks in our code, specifically: 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... @ylebre Do you have any thoughts that run in opposing directions? |
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.
But when I try clicking on the icon in my dashboard I get the following error. 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"
} |
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. |
Hi @ylebre , How is it going? Do you have an update on this? Thanks! |
Yes, just merged #45 which should fix the issue with Nextcloud 21. If you have time to confirm, that would be much appreciated! |
I pull the trigger to soon, sorry... It sends me to a blank page and I get the below error on the server:
|
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? |
Not sure what you mean with symlinks. We do not have ../vendor/autoload.php |
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:
|
That worked. It has created a https://cloud.pr8.io/apps/solid/@ch1ch0gz/profile/card#me which I can access to. We have run those commands but we are doing it standalone. |
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! |
Hi, Thanks for your fast response. 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! |
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? |
Please use https://pr8.io/ We thought that too but nothing under /var/www/nextcloud/apps/solid When I go to https://cloud.pr8.io/apps/solid/@ch1ch0gz/storage/ I get /var/log/nextcloud.log gives the below. Is there any information or test we can perform that could help to resolve this issue? 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"} |
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. |
Perfect. Just sent you this morning a mail to [email protected] |
Ok - after the screen session I'm pretty sure that this is the cause of the issue: We'll try to run it the server using nginx to see if that reproduces the problem! |
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:
Cheers! |
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). |
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
Looking forward to hearing from you.
Thanks,
Angel
The text was updated successfully, but these errors were encountered: