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

autocompleteField tests fail with latest rdflib@2.2.26 #528

Open
bourgeoa opened this issue Feb 14, 2023 · 2 comments
Open

autocompleteField tests fail with latest rdflib@2.2.26 #528

bourgeoa opened this issue Feb 14, 2023 · 2 comments
Assignees

Comments

@bourgeoa
Copy link
Contributor

bourgeoa commented Feb 14, 2023

solid-ui branch applyPatch includes latest rdflib@2.2.26 and solid-logic@3.0.0 changes
rdflib@2.2.26 merge PR linkeddata/rdflib.js#574

This rdflib PR introduce errors in the autocompleteField tests in solid-UI

I tested the full stack with watch on NSS localhost
I think the autocompleteField is used in updating profile.
I did not find any issue running NSS localhost to update the profile card with things coming from wikidata.

Is the issue on solid-ui tests or on latest rdflib@2.2.26 ?

@timbl can you have a look ?

@bourgeoa
Copy link
Contributor Author

bourgeoa commented Mar 1, 2023

reverting linkeddata/rdflib.js@0aa5764 did not resolve the issue.
The issue was in reverting jsonld v8 an ES module back to v5 and commonjs
jsonld is used in rdflib jsonldParser.js

All 3 solutions where tried to keep latest jsonld@8 ES module

  1. run jest with experimental ECMA script module https://jestjs.io/docs/ecmascript-modules#differences-between-esm-and-commonjs --> errors in the autocompleteField tests in solid-UI
  2. use dynamic import of jsonld@8 in rdflib jsonldParser.js with or without jest experimental ECMA script
    --> segmentation fault on github actions (locally test passed without any issue)
  3. try to solve the above segmentation fault following Segmentation fault (core dumped) on Github Actions running Node.js 12.x jestjs/jest#10662
    nothing worked 094a738 and all other examples in https://github.com/SolidOS/solid-ui/tree/rdflib

@SharonStrats
Copy link
Contributor

SharonStrats commented Apr 10, 2023

@bourgeoa I'm still looking but I believe it has to do with fetch. It's in here

export async function queryPublicDataByName (
somewhere with the store.fetcher... I do remember something about the fetch, I will have to look at it more tomorrow. Maybe we need to mock it or send a different fetch in.

console.error errorMessageBlock: Error: Error querying db of organizations: Error: Fetch error for GET of <https://query.wikidata.org/sparql?query=SELECT+%3Fsubject+%3Fname%0A++++++++WHERE+%7B%0A++++++++++%3Fklass+wdt%3AP279*+%3Chttp%3A%2F%2Fwww.wikidata.org%2Fentity%2FQ6881511%3E+.%0A++++++++++%3Fsubject+wdt%3AP31+%3Fklass+.%0A++++++++++%3Fsubject+rdfs%3Alabel+%3Fname.%0A++++++++++FILTER+regex%28%3Fname%2C+%22mass%22%2C+%22i%22%29%0A++++++++%7D+LIMIT+200+>:TypeError: window.fetch is not a function at: Error: Error querying db of organizations: Error: Fetch error for GET of <https://query.wikidata.org/sparql?query=SELECT+%3Fsubject+%3Fname%0A++++++++WHERE+%7B%0A++++++++++%3Fklass+wdt%3AP279*+%3Chttp%3A%2F%2Fwww.wikidata.org%2Fentity%2FQ6881511%3E+.%0A++++++++++%3Fsubject+wdt%3AP31+%3Fklass+.%0A++++++++++%3Fsubject+rdfs%3Alabel+%3Fname.%0A++++++++++FILTER+regex%28%3Fname%2C+%22mass%22%2C+%22i%22%29%0A++++++++%7D+LIMIT+200+>:TypeError: window.fetch is not a function at complain (/Users/sharon/2023Development/solid-ui/src/widgets/forms/autocomplete/autocompletePicker.ts:62:17) at _callee5$ (/Users/sharon/2023Development/solid-ui/src/widgets/forms/autocomplete/autocompletePicker.ts:147:7) at tryCatch (/Users/sharon/2023Development/solid-ui/node_modules/@babel/runtime/helpers/regeneratorRuntime.js:44:17) at Generator.<anonymous> (/Users/sharon/2023Development/solid-ui/node_modules/@babel/runtime/helpers/regeneratorRuntime.js:125:22) at Generator.throw (/Users/sharon/2023Development/solid-ui/node_modules/@babel/runtime/helpers/regeneratorRuntime.js:69:21) at asyncGeneratorStep (/Users/sharon/2023Development/solid-ui/node_modules/@babel/runtime/helpers/asyncToGenerator.js:3:24) at _throw (/Users/sharon/2023Development/solid-ui/node_modules/@babel/runtime/helpers/asyncToGenerator.js:25:9) Error: Error querying db of organizations: Error: Fetch error for GET of <https://query.wikidata.org/sparql?query=SELECT+%3Fsubject+%3Fname%0A++++++++WHERE+%7B%0A++++++++++%3Fklass+wdt%3AP279*+%3Chttp%3A%2F%2Fwww.wikidata.org%2Fentity%2FQ6881511%3E+.%0A++++++++++%3Fsubject+wdt%3AP31+%3Fklass+.%0A++++++++++%3Fsubject+rdfs%3Alabel+%3Fname.%0A++++++++++FILTER+regex%28%3Fname%2C+%22mass%22%2C+%22i%22%29%0A++++++++%7D+LIMIT+200+>:TypeError: window.fetch is not a function at complain (/Users/sharon/2023Development/solid-ui/src/widgets/forms/autocomplete/autocompletePicker.ts:62:17) at _callee5$ (/Users/sharon/2023Development/solid-ui/src/widgets/forms/autocomplete/autocompletePicker.ts:147:7) at tryCatch (/Users/sharon/2023Development/solid-ui/node_modules/@babel/runtime/helpers/regeneratorRuntime.js:44:17) at Generator.<anonymous> (/Users/sharon/2023Development/solid-ui/node_modules/@babel/runtime/helpers/regeneratorRuntime.js:125:22) at Generator.throw (/Users/sharon/2023Development/solid-ui/node_modules/@babel/runtime/helpers/regeneratorRuntime.js:69:21) at asyncGeneratorStep (/Users/sharon/2023Development/solid-ui/node_modules/@babel/runtime/helpers/asyncToGenerator.js:3:24) at _throw (/Users/sharon/2023Development/solid-ui/node_modules/@babel/runtime/helpers/asyncToGenerator.js:25:9)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

No branches or pull requests

2 participants