comunica / jQuery-Widget.js

🖼 A jQuery widget to query heterogeneous interfaces using Comunica SPARQL
http://query.linkeddatafragments.org/
MIT License
18 stars 35 forks source link

chore: update @rubensworks/solid-client-authn-browser #119

Closed jeswr closed 2 years ago

jeswr commented 2 years ago

Tested and working as expected locally @rubensworks

rubensworks commented 2 years ago

@jeswr I just tested this via the deployed version on http://query.linkeddatafragments.org/, but it doesn't appear to be working here AFAICS. Are you sure it was working for you locally?

If I click the login button (test both on https://solidcommunity.net/ and https://broker.pod.inrupt.com/), I can follow the login sequence, but after returning to the app, I'm not logged in.

jeswr commented 2 years ago

I was definitely able to execute SELECT * WHERE { ?s ?p ?o } against the file https://pod.inrupt.com/jeswrtest11/private/data.ttl (which uses https://broker.pod.inrupt.com/) when testing.

It appears that on the deployed site if I go through the normal flow then I get the error # headersAuthenticator is not initialized yet; but if I do it from a private window then it works fine ...

rubensworks commented 2 years ago

It appears that on the deployed site if I go through the normal flow then I get the error # headersAuthenticator is not initialized yet; but if I do it from a private window then it works fine ...

What browser are you using? Tested on both Firefox and Chrome here. I don't get any errors in the console, just nothing happens...

jeswr commented 2 years ago

I'm getting this in Firefox - I should note that the message comes up in the Query results section of the webpage rather than in the console.

It seems that it also works in a non-private window, as long as you hit 'execute query' after the execution log shows

Requesting https://pod.inrupt.com/jeswrtest11/private/data.ttl {"headers":{"accept":"application/n-quads,application/trig;q=0.95,application/ld+json;q=0.9,application/n-triples;q=0.8,*/*;q=0.1","user-agent":"Comunica/actor-http-fetch (Browser-Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Firefox/102.0)"},"method":"GET","actor":"urn:comunica:default:http/actors#fetch"}
Identified as file source: https://pod.inrupt.com/jeswrtest11/private/data.ttl {"actor":"urn:comunica:default:rdf-resolve-hypermedia/actors#none"}

So it would seem there is a race condition at play

rubensworks commented 2 years ago

Indeed, I also get headersAuthenticator is not initialized yet when executing a query after attempting to log in. (Firefox, non-private window)

In the case where it works for you, do you correctly see the "Logged in as " line shown, next to the "Solid authentication" label? Because that would indicate that logging in worked correctly. (it does not show this on my end, no matter what I try)

In the case where it works for you, have you tried clearing browser cache to make sure you're using the new version?

jeswr commented 2 years ago

In the case where it works for you, do you correctly see the "Logged in as " line shown, next to the "Solid authentication" label? Because that would indicate that logging in worked correctly. (it does not show this on my end, no matter what I try)

Yep - this is what I see

image

In the case where it works for you, have you tried clearing browser cache to make sure you're using the new version?

Yep - just completely cleared all caches, closed firefox, re-opened and opened the webage and then did a hard reload of the webpage. Still works in the private browser case

rubensworks commented 2 years ago

Aah, the problem was on my end, I was testing on http instead of https. It's working fine on https. (we should probably add a warning for that at some point) Apologies for the noise...

jeswr commented 2 years ago

Aha all good - glad it works!