SolidOS/mashlib

SolidOS should create preferences file if missing

Closed this issue · 9 comments

When I open the profile (https://ash.runi.ilabt.imec.be/profile/card#me) of a user (after logging in) I only see the following:

Screenshot from 2019-11-14 08-26-07

In previous versions we were able to edit the profile details of the user here, no?
When checking the console I see that some data is missing and I get the same error when clicking the + button on the left.

Error: Can't find a preferences file pointer in profile <https://ash.runi.ilabt.imec.be/profile/card>

However, https://ash.runi.ilabt.imec.be/profile/ works. I can see the Turtle file. So it might be more confusion on my part as what is expected to see at both locations. But when I try to save my changes I get the following error in the browser window

Error saving back: Error: Web error: 403 (User Unauthorized) on PUT of <https://ash.runi.ilabt.imec.be/profile/card>

while the first error is also shown in the console.

After poking around, I don't think this is a problem with NSS. A GET request to retrieve the turtle is valid. I believe this should be transferred to the data browser repository.

I experience this issue too, but in a slightly different setting. I managed to get right of this issue on my setting.

I registered a "new pod name" for my new solid server (pod). Say the server address is https://SERVER/, and pod name is foo.

Therefore, when visiting https://SERVER/, it seem to show things. After logging in, clicking the "add" button, I got the error message as you do:

(via loadPrefs) Error: Can't find a preference file pointer in profile  <https://SERVER/foo/profile/card>

But, when visiting https://SERVER/foo, and do the same thing, I no longer encounter this error.

For me, https://SERVER/ is the root directory (containing all users), and https://SERVER/foo is the pod that my new user actually resides. The permission issue may be the actual error.

But, same as you, my new user also doesn't have the preference file pointer. I looked at my account on a public solid server, and found this triple (which is missing from my own solid server):

@prefix space: <http://www.w3.org/ns/pim/space#>.
:me space:preferencesFile </settings/prefs.ttl>.

Maybe the root cause is incorrect initialization of new users? (But the error messages might worth be improving.)

@renyuneyun the original issue should have been closed.
you seem to run a CSS server where the pod name is /.

But, same as you, my new user also doesn't have the preference file pointer. I looked at my account on a public solid server, and found this triple (which is missing from my own solid server):

This is not a CSS error but a mashlib expectation. This should become a solid recommendation. There are on going discussions. See https://github.com/solid/webid-profile

Actually, the recommendation will be that SolidOS (or any app depending on a preferences files) should create the preferences file if it doesn't exist. So, this is a needed feature in mashlib,

@bourgeoa Thanks for the info. When posting the comment, I did not recognize that there is a difference (in the way it works) between CSS and the public solid servers (e.g. solidcommunity.net) (SolidOS?). I thought CSS is just the core module of SolidOS.
Maybe more explanation on CSS and SolidOS page would be helpful to newcomers.

p.s. I also have some questions when using mashlib on CSS -- they are all about missing or unexpected behaviours on the web UI (i.e. mashlib?), but I think the root cause is the underlying mechanism of incorrect/incomplete initialization (i.e. CSS?). Should I ask / report them to CSS or mashlib?

@renyuneyun You should report them to solidos.

Thank you very much!

When moving to CSS this can be solved with "CSS supports this via a custom pod templates." (see this comment) and long-term SolidOS should create the file itself.