autocompleteField tests fail with latest [email protected]
solid-ui branch applyPatch includes latest [email protected] and [email protected] changes [email protected] merge PR https://github.com/linkeddata/rdflib.js/pull/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 [email protected] ?
@timbl can you have a look ?
reverting https://github.com/linkeddata/rdflib.js/commit/0aa57642416b0c2f1a4cdd7b5ed58a1448a33161 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
- 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
- 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)
- try to solve the above segmentation fault following https://github.com/facebook/jest/issues/10662 nothing worked https://github.com/SolidOS/solid-ui/commit/094a73838b7bf58d6174b60e15dfbb04febebfbe and all other examples in https://github.com/SolidOS/solid-ui/tree/rdflib
@bourgeoa I'm still looking but I believe it has to do with fetch. It's in here https://github.com/SolidOS/solid-ui/blob/f9084b4cf727fd1908e9c9b310c367c4eefa04ab/src/widgets/forms/autocomplete/publicData.ts#L312 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)