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

sparqljson-parse.js locked to version 2.1.0? #137

Closed gvanderh closed 2 years ago

gvanderh commented 2 years ago

When a query returns a lot of results fast (+3000 in our local use case) from a (non-Comunica) SPARQL end-point, the following random behaviour is witnessed:

Another error message sometimes observed in the UI (on a correct query) - presumingly unrelated to the issue above though - is the following: "# Unexpected "!" at position 0 in state STOP"

rubensworks commented 2 years ago

What version are you using? This should have been fixed in https://github.com/comunica/comunica/issues/1052

gvanderh commented 2 years ago

I'm using the latest jQuery-Widget.js directly from github (with fresh npm install), invoking bin/generate.js to generate the static web folder. Comunica 2.4.2 in the back-end.

As opposed to the referenced fixed issue, all works fine when 1) the query is passed directly to the query engine and 2) when using curl to ask the query through the Comunica end-point. When using the UI instead of curl, out of the long list of received results (content-type: application/sparql-results+json), only a random number shows up in the UI TOGETHER WITH the "# No valid SPARQL results were found." error.

rubensworks commented 2 years ago

Could you check in your node_modules folder in the jquery widget which version of sparqljson-parse.js is installed? It should be 2.1.1 to have the fix.

gvanderh commented 2 years ago

It is 2.1.0. And "@comunica/web-client-generator" 1.6.0. (that is after git pull, rm -rf node_modules / package-lock.json, npm install)

rubensworks commented 2 years ago

I assume you're using npm to install? I've seen this in the past as well that npm doesn't select the latest patch versions of packages. Could you try installing with yarn instead?

gvanderh commented 2 years ago

Also ended up with 2.1.0 after a yarn install. However, when manually upgrading to 2.1.1 the issue indeed disappears!

rubensworks commented 2 years ago

Hmm, so something must be locking sparqljson-parse.js to version 2.1.0. If you know where (one of the packages within the dependency chain), you're welcome to submit a PR to fix it :)

gvanderh commented 2 years ago

The dependency chain is fine, I traced the issue to yarn.lock. In that file (which is on git), sparqljson-parse 2.1.0 is referenced. Removing it fixed the "npm install".

rubensworks commented 2 years ago

Ah ok, thanks for the clarification.

Feel free to submit a PR with a lockfile reset and re-install with yarn.