Open NoelDeMartin opened 3 years ago
First of all, allow me to offer you a very big "thank you"!
We've been discussing compatibility with other apps and real-world workings, especially since no new features need to be added to this Standalone PHP version, so coming iterations are all about getting things to work properly across the board.
This is awesome work. We've been scrambling to get things done over the last couple of months and there are still a lot of loose ends we need to tie up. Your contribution here is a great help for that!
I've been tinkering with the server to make my apps compatible, and I wasn't able to make it work out of the box but I'll share what I got working. I know many of the things I'll mention are known bugs or missing features, we can reference them or open new issues, and close this one afterwards.
I tested the server using this app: noeldemartin/ramen. You can use it in your local environment if you want to reproduce the problems I'll mention.
So here's what I did.
First I launched PSS by cloning this repo and running the following command:
Inside the docker container shell, I installed
composer
andgit
and then I runcomposer install
andcomposer serve-dev
(keep in mind that I had some modifications that I've added in this PR).Once this was up and running, I started encountering some problems that I hot-fixed along the way. None of them are actual fixes, more like hard-coding things to work in my environment. That's why I won't open a PR with that, but I'll explain what those are:
pdsinterop/solid-auth
. First this failed because the $alg variable was "ES256" (instead of "RS256"), and then here I got an exception saying "This JWK cannot be converted to PEM format".pdsinterop/solid-crud
. In this line, I got an exception saying "Connection to 'ws://localhost/' failed: Server sent invalid upgrade"..meta
document.<>
and there's a FIXME mentioning that it isn't supported.http://localhost:8008/storage/container/document#it
but after writing the contents of the document manually they are returned ashttps://localhost/storage/container/container#it
instead. Notice that it's using https:// and doesn't include the port, I'm not sure if this is something I didn't configure correctly or a bug, but I was using the server with http:// and the port from the browser.And that's how far I got, after doing some of the fixes I mentioned my app is able to log in and read the documents :D. Containers and files are created, but I had to make some manual fixes as I've mentioned.
If you don't want or can't run my app, here's a summary of what it's doing (with simplified requests):
Logs in using @inrupt/solid-authn-client-browser.
Reads the profile to get
pim:storage
andsolid:privateTypeIndex
.Finds a container of
schema:Recipe
declared in the type index and a recipe with "ramen" in the title.If the container does not exist, users can create it triggering a request similar to this:
And then the type index is updated like this:
If the recipe does not exist, users can create it triggering a request similar to this:
I hope this is helpful! And thanks for working on this, it's great to see a php Solid server :).
As I mentioned, once these problems are tracked elsewhere I think we can close this one. There's also some things I may be doing wrong on my part, let me know if something doesn't look right.