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

Crashes with a null cookie #11

Open
CxRes opened this issue Dec 2, 2020 · 4 comments
Open

Crashes with a null cookie #11

CxRes opened this issue Dec 2, 2020 · 4 comments

Comments

@CxRes
Copy link

CxRes commented Dec 2, 2020

When I try to use solid-node-client in a nwjs environment, inside SolidNodeClient.prototype._getAuthFetcher, the cookie is set to null and then the program crashes since getAuthFetcher() expects a cookie to have length property. This might be a bug in solid-auth-fetcher and/or this call should exist in try catch block (in case authentication fails, though I am not sure why it would fail!).

Strangely, it works fine when I run the same code in Node LTS! I am not sure what trips the code up, I would appreciate any suggestions where to look...

@CxRes
Copy link
Author

CxRes commented Dec 2, 2020

This actually seems identical to #10. (Should have read more carefully)

@CxRes
Copy link
Author

CxRes commented Dec 3, 2020

Some more info... I get the following response from the fetch inside getNodeSolidServerCookie...

Response {type: "opaqueredirect", url: "https://inrupt.net/login/password", redirected: false, status: 0, ok: false, …}
body: null
bodyUsed: false
headers: Headers {}
ok: false
redirected: false
status: 0
statusText: ""
type: "opaqueredirect"
url: "https://inrupt.net/login/password"
__proto__: Response

@jeff-zucker
Copy link
Member

I've added some error-trapping for the login process - solid-contrib/solid-auth-fetcher#16 but since I've not seen anything like what you got above, I don't even know how to test for it. Is this coming from a specialized environment or straight from the command line?

@CxRes
Copy link
Author

CxRes commented Dec 3, 2020

Yes, as mentioned above this is happening in an nwjs environment. However, I cannot identify anything environment specific that would prevent fetch from doing its thing. But #10 seems to occur in node.

I have special characters in the password which like #10 might be tripping me up. But strangely it worked fine for me in a node environment ( :head-scratching: )

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