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

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

Open
bourgeoa opened this issue Dec 7, 2020 · 11 comments
Open

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

bourgeoa opened this issue Dec 7, 2020 · 11 comments

Comments

@bourgeoa
Copy link
Contributor

bourgeoa commented Dec 7, 2020

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 nodeSolidServer/node-solid-server#1536

@bourgeoa bourgeoa transferred this issue from SolidOS/solid-panes Dec 8, 2020
@bourgeoa bourgeoa transferred this issue from SolidOS/contacts-pane Dec 8, 2020
bourgeoa added a commit to SolidOS/chat-pane that referenced this issue Dec 8, 2020
The port has no meaning in this context and will allow compatibility with Windows where colon are forbidden in file/folder names.
It has not impact on `solidcommunity.net` nor `inrupt.net`, or any of podProvider that do not use a specific port. 
see issue SolidOS/solid-panes#262
@bourgeoa
Copy link
Contributor Author

bourgeoa commented Dec 8, 2020

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
Copy link
Contributor

angelo-v commented Dec 8, 2020

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
Copy link
Contributor Author

bourgeoa commented Dec 8, 2020

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
Copy link

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
Copy link
Contributor

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
Copy link
Contributor

angelo-v commented Dec 10, 2020

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
Copy link
Contributor Author

@angelo-v

How hard is it to fix NSS

From what I have seen while googling

  • a frequent proposed solution it to replace windows invalid characters that remain in a path name by _ (which have drawbacks, you may replace or delete something you don'want).
  • Or accept to fail with the usual 500. Which report to the user and app not to use fixed parameters ultimately being a file or folder name containing invalid Windows file characters.
    This seem to be the most widely used solution.
    The same apply to file an folder name length limited to 281 char I think (less frequent problem)

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
Copy link
Contributor

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
Copy link
Contributor Author

bourgeoa commented Dec 10, 2020

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
Copy link
Contributor

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
Copy link

highlevellogic commented Dec 13, 2020

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".)

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

4 participants