SolidOS / solid-panes

A set of core solid-compatible apps based on solid-ui
MIT License
100 stars 42 forks source link

chat with me in contact pane not created on windows #262

Open bourgeoa opened 3 years ago

bourgeoa commented 3 years ago

Trying NSS on a windows pod https://bourgeoa.solid.hll.nu:7443 . Tested the chat with me from OS solid The function returns a PUT error 500

FAILED to save new chat channel at: https://bourgeoa.solid.hll.nu:7443/IndividualChats/bourgeoa.solid.hll.nu:7443/index.ttl : Web error: 500 (Internal Server Error) on PUT of https://bourgeoa.solid.hll.nu:7443/IndividualChats/bourgeoa.solid.hll.nu:7443/index.ttl

This is due to the colon : in the folderPath. Is the port needed ?

see issue https://github.com/solid/node-solid-server/issues/1536

bourgeoa commented 3 years ago

Sorry I made an error transferring. The problem lies in profile.view.ts on L90 and L103 when calling getChat().

A solution could rely in solid/chat-pane/create.js by replacing host with hostname then the port is not included.

function determineChatContainer (invitee, podRoot) {
  // Create chat
  // See https://gitter.im/solid/chat-app?at=5f3c800f855be416a23ae74a
  const chatContainerStr = new URL(`IndividualChats/${new URL(invitee.value).host}/`, podRoot.value).toString()
  return new NamedNode(chatContainerStr)
}
angelo-v commented 3 years ago

The colon is a valid character from client / URI perspective. Why should solid-panes care on which operating system some server is running and whether it creates a file from it or not? This is purely an NSS issue.

bourgeoa commented 3 years ago

I suppose you have a valid point in theory. In Practice it is nice and easier if solid OS proposes an URI that is accepted by all OS. An other solution is surely possible. That was allready done in the server creation where the folders podName's do not include the server port.

highlevellogic commented 3 years ago

The colon is a valid character from client / URI perspective. Why should solid-panes care on which operating system some server is running and whether it creates a file from it or not? This is purely an NSS issue.

It's not allowed as a character in Windows file io.

jeff-zucker commented 3 years ago

My $0.02 : neither the spec nor the libraries should have to know or care about what the backend is or what storage rules it enforces. This is more work for NSS (and solid-rest), but it seems the right way to go.

angelo-v commented 3 years ago

The question is, whether we want to do NSS "a favour". That depends on 2 things imho:

  1. How hard is it to fix NSS
  2. What is the consequence of implementing a workaround in solid panes
bourgeoa commented 3 years ago

@angelo-v

How hard is it to fix NSS

From what I have seen while googling

What is the consequence of implementing a workaround in solid panes

As I see it :

  1. No impact at all on all existing providers solidcommunity.net, inrupt.net, ... they all use port 443 which means that host and hostname have the same value. Any other personal podProvider running with an extension will see that as implementing an other work around see point 2

  2. An other work around (to replace host with an other name) will impact new pods and existing pods where chat with me is not activated. Old one keeping the existing URI that is saved in preferences.

angelo-v commented 3 years ago

We have https://solidcommunity.net and https://solidcommunity.net:8443, so for those we could have a collision. I do not think it is relevant, since the latter is a test server, so we could do NSS that favour. Anyway, NSS needs to fix it's behaviour. There might be other places and apps where URI paths with colon are generated. There is nothing wrong with that.

bourgeoa commented 3 years ago

We have https://solidcommunity.net and https://solidcommunity.net:8443, so for those we could have a collision.

I do not understand how https://mypod.solidcommunity.net/IndividualChats/mypod.solicommunity.net and https://mypod.solidcommunity.net:8443/IndividualChats/mypod.solidcommunity.net can collide.

Or is there a list of chats in which you are a participant. But then it is like having homonyms.

angelo-v commented 3 years ago

When I start a chat with https://mypod.solidcommunity.net:8443/profile/card#me and another one with https://mypod.solidcommunity.net/profile/card#me, both chats will be created at https://angelo.veltens.org/IndividualChats/mypod.solidcommunity.net (if we strip the port)

This is the collission I mean.

highlevellogic commented 3 years ago

Individual pod directories are currently named without a port. My account on https://solid.hll.nu:7443 is named rogerfgay.solid.hll.nu. So I still don't get the problem. (I'm actually running on Windows so chat doesn't work and I haven't been able to see the details running.)

Another option is to encode the file/directory names. My view is not going there unless it's necessary. (As per my above comment, I can't see that it's necessary ... "can't see".)