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

Unable to create Cookbook #2

Closed
uvdsl opened this issue Nov 22, 2022 · 3 comments
Closed

Unable to create Cookbook #2

uvdsl opened this issue Nov 22, 2022 · 3 comments

Comments

@uvdsl
Copy link

uvdsl commented Nov 22, 2022

Hi,
I thought I play a little with this gem of an app - but I ran into the following problem...

Using NSS (solidweb.org), I logged in and tried to create a cookbook.
(Using CSS, I could not even login because there is no typeIndex by default, which I assume the app relies on... different issue, I guess...)

Upon creating a cookbook, I get a 500 Server Error:
Dev tools network tab shows a GET request with 404 response to /cookbook/, makes sense, does not exist yet.
Then, a PATCH request to /cookbook/ resulting in the 500. I do not know if NSS changed behaviour for PATCH on non-existent resources.

Thought, I'd let you know. :)

@NoelDeMartin
Copy link
Owner

Hey, thanks for opening an issue!

(Using CSS, I could not even login because there is no typeIndex by default, which I assume the app relies on... different issue, I guess...)

If the type index doesn't exist, the app should create it, so maybe there's another problem. What version of CSS are you using? Last time I tested was using 3.0.0, so maybe something changed since.

Upon creating a cookbook, I get a 500 Server Error:
Dev tools network tab shows a GET request with 404 response to /cookbook/, makes sense, does not exist yet.
Then, a PATCH request to /cookbook/ resulting in the 500. I do not know if NSS changed behaviour for PATCH on non-existent resources.

I think this has to do with a problem I reported a while ago in NSS nodeSolidServer/node-solid-server#1703

I didn't think about updating this app, but maybe I should have, thanks for the reminder 😅.

In any case, at this point I'm focusing on finishing my latest app. Once it's ready, I'm planning on updating all my apps with many improvements I've learned about making Solid Apps. But I'll leave this issue open until I do.

@uvdsl
Copy link
Author

uvdsl commented Nov 23, 2022

Last time I tested was using 3.0.0, so maybe something changed since.

I think I am at 5.0.0.

In any case, at this point I'm focusing on finishing my latest app.

Ah cool! Looking forward to it! :)

No worries, I was just tinkering around seeing what apps still work and what could be re-used.

@NoelDeMartin
Copy link
Owner

NoelDeMartin commented Nov 25, 2022

I have looked into this to see why it didn't work with CSS, and it had something to do with a change I made a while ago to one of the dependencies.

In a nutshell, before that update I assumed that user profiles were always writable. But ESS recently made profiles read-only, so now it's necessary to read the foaf:isPrimaryTopicOf triple* in order to find a writable profile. And since I was making unauthenticated requests to read the profile in this app, I didn't find any.

On that point, I did see the following error which gave me a clue. Didn't you get it as well?

Error: Can't create type index without a writable profile document

In any case, it should be fixed now :). Since I updated the libraries as well, this should also fix the problem with NSS so I'm closing this issue. Feel free to reopen in case something's still wrong.

* It seems this may not be as simple as it sounds.

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