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

Bug with prefixes #15

Open
LudovicoGranata opened this issue Sep 9, 2022 · 5 comments
Open

Bug with prefixes #15

LudovicoGranata opened this issue Sep 9, 2022 · 5 comments
Labels
priority: high (2) High-priority issue that should be resolved as soon as possible type: bug Something isn't working

Comments

@LudovicoGranata
Copy link
Contributor

Sending the following query works and return a result:

{ "prefixList": [ { "abbreviation": "desmo", "completeURI": "https://desmo.vaimee.it/" }, { "abbreviation": "qudt", "completeURI": "http://qudt.org/schema/qudt/" }, { "abbreviation": "xsd", "completeURI": "http://www.w3.org/2001/XMLSchema/" }, { "abbreviation": "monas", "completeURI": "https://pod.dasibreaker.vaimee.it/monas/" } ], "property": { "identifier": "value", "unit": "qudt:DEG_C", "datatype": 1 }, "staticFilter": "$[?(@['type']=='Sensor')]" }

while the following query, that has been modify only by removing the not useful prefixes does not work

{ "prefixList": [ { "abbreviation": "qudt", "completeURI": "http://qudt.org/schema/qudt/" } ], "property": { "identifier": "value", "unit": "qudt:DEG_C", "datatype": 1 }, "staticFilter": "$[?(@['type']=='Sensor')]" }

@LudovicoGranata LudovicoGranata added the type: bug Something isn't working label Sep 9, 2022
@FerrariAndrea FerrariAndrea added the priority: high (2) High-priority issue that should be resolved as soon as possible label Sep 10, 2022
@FerrariAndrea
Copy link
Contributor

FerrariAndrea commented Sep 10, 2022

Thx, If you have other queries error pls report them here.

There are some bugs on the QueryParser (and in others components) in the current version, that I'm fixing in the last PR #13. (maybe is the same bug-source)

Can you post here the output of your error? What do you mean by "does not work"? Are you using the DApp on the Iexec workerpool or in your local machine?

@LudovicoGranata
Copy link
Contributor Author

I cannot give you any other detail on the error because it does not give me any, it just doesn't give any response. I am using the DApp on the Iexec workerpool.

@FerrariAndrea
Copy link
Contributor

FerrariAndrea commented Sep 10, 2022

oks, so we should have the log on the online Logger, I will check if I find something here

Edit:
Find something:

[Fri Sep 09 2022 17:03:26 GMT+0000 (Coordinated Universal Time)][Worker]: QUERY is: {\"prefixList\":[{\"abbreviation\":\"desmo\",\"completeURI\":\"https://desmo.vaimee.it/\"},{\"abbreviation\":\"qudt\",\"completeURI\":\"http://qudt.org/schema/qudt/\"}],\"property\":{\"identifier\":\"value\",\"unit\":\"qudt:DEG_C\",\"datatype\":1},\"staticFilter\":\"$[?(@['type']=='Sensor')]\"}"

[Fri Sep 09 2022 17:03:27 GMT+0000 (Coordinated Universal Time)][DirectoriCollector]: request_path: https://desmold-zion-1.vaimee.it/search/jsonpath?query=%24%5B%3F(%40%5B'type'%5D%3D%3D'Sensor')%5D

[Fri Sep 09 2022 17:03:27 GMT+0000 (Coordinated Universal Time)][DirectoriCollector] !ERROR!: DirectoriesCollector error on Directory index:0 Error: AxiosError: Request failed with status code 400

We have 400 errors on Zion some times, but your report seem to be that one:

"##################################################",
"DApp init log at: Fri Sep 09 2022 16:13:37 GMT+0000 (Coordinated Universal Time)",
"##################################################",
"[Fri Sep 09 2022 16:13:37 GMT+0000 (Coordinated Universal Time)][APP]: DApp started!",
"[Fri Sep 09 2022 16:13:37 GMT+0000 (Coordinated Universal Time)][APP]: [\"/usr/local/bin/ts-node\",\"/app/app.ts\",\"0x0000000000000000000000000000000000000000000000000000000000000023\",\"{__!_prefixList__!_:[],__!_property__!_:{__!_identifier__!_:__!_value__!_,__!_unit__!_:__!_qudt:DEG_C__!_,__!_datatype__!_:1},__!_staticFilter__!_:__!_$[?(@[--#-type--#-]==--#-Sensor--#-)]__!_}\"]",
"[Fri Sep 09 2022 16:13:37 GMT+0000 (Coordinated Universal Time)][Worker]: QUERY is: {\"prefixList\":[],\"property\":{\"identifier\":\"value\",\"unit\":\"qudt:DEG_C\",\"datatype\":1},\"staticFilter\":\"$[?(@['type']=='Sensor')]\"}",
"[Fri Sep 09 2022 16:13:37 GMT+0000 (Coordinated Universal Time)][DesmoSDKWrapper]: Resolve requestID to retrieve TDDs. RequestiD: 0x0000000000000000000000000000000000000000000000000000000000000023",
"[Fri Sep 09 2022 16:13:38 GMT+0000 (Coordinated Universal Time)][DesmoSDKWrapper]: DEBUG: sanityzzeMap: [\"https://desmold-zion-1.vaimee.it\",\"https://desmold-zion-2.vaimee.it\",\"https://desmold-zion-3.vaimee.it\",\"https://desmold-zion-4.vaimee.it\"]",
"[Fri Sep 09 2022 16:13:38 GMT+0000 (Coordinated Universal Time)][Worker]: Parsing query ...",
"[Fri Sep 09 2022 16:13:38 GMT+0000 (Coordinated Universal Time)][Worker] !ERROR!: Query not valid!"

So the problem is in the QueryParser, I will try the same query on the branch of PR #7 that have some fix already on the QueryParser

@FerrariAndrea
Copy link
Contributor

Let's wait for the merge of PR #7 , because in that branch it seems to work:

[Sat Sep 10 2022 19:54:58 GMT+0200 (Ora legale dell’Europa centrale)][APP]: DApp started!
[Sat Sep 10 2022 19:54:58 GMT+0200 (Ora legale dell’Europa centrale)][APP]: ["C:\\Program Files\\0_Programmazione\\nodejs\\node.exe","D:\\VAIMEE\\DESMOLD\\desmo-dapp\\DApp\\build\\src\\app.js","0x0000000000000000000000000000000000000000000000000000000000000023","{ \"prefixList\": [ { \"abbreviation\": \"qudt\", \"completeURI\": \"http://qudt.org/schema/qudt/\" } ], \"property\": { \"identifier\": \"value\", \"unit\": \"qudt:DEG_C\", \"datatype\": 1 }, \"staticFilter\": \"$[?(@[type]==Sensor)]\" }"]
[Sat Sep 10 2022 19:54:58 GMT+0200 (Ora legale dell’Europa centrale)][Worker]: QUERY is: { "prefixList": [ { "abbreviation": "qudt", "completeURI": "http://qudt.org/schema/qudt/" } ], "property": { "identifier": "value", "unit": "qudt:DEG_C", "datatype": 1 }, "staticFilter": "$[?(@[type]==Sensor)]" }
[Sat Sep 10 2022 19:54:58 GMT+0200 (Ora legale dell’Europa centrale)][DesmoSDKWrapper]: Resolve requestID to retrieve TDDs. RequestiD: 0x0000000000000000000000000000000000000000000000000000000000000023
[Sat Sep 10 2022 19:54:59 GMT+0200 (Ora legale dell’Europa centrale)][DesmoSDKWrapper]: DEBUG: sanityzzeMap: ["https://desmold-zion-1.vaimee.it","https://desmold-zion-2.vaimee.it","https://desmold-zion-3.vaimee.it","https://desmold-zion-4.vaimee.it"]
[Sat Sep 10 2022 19:54:59 GMT+0200 (Ora legale dell’Europa centrale)][Worker]: Parsing query ...
[Sat Sep 10 2022 19:54:59 GMT+0200 (Ora legale dell’Europa centrale)][Worker]: Collect Directories and TDs ...
[Sat Sep 10 2022 19:54:59 GMT+0200 (Ora legale dell’Europa centrale)][DirectoriCollector]: request_path: https://desmold-zion-1.vaimee.it/search/jsonpath?query=%24%5B%3F(%40%5Btype%5D%3D%3DSensor)%5D
[Sat Sep 10 2022 19:54:59 GMT+0200 (Ora legale dell’Europa centrale)][DirectoriCollector] !ERROR!: DirectoriesCollector error on Directory index:0 Error: Request failed with status code 400
[Sat Sep 10 2022 19:54:59 GMT+0200 (Ora legale dell’Europa centrale)][DirectoriCollector]: request_path: https://desmold-zion-2.vaimee.it/search/jsonpath?query=%24%5B%3F(%40%5Btype%5D%3D%3DSensor)%5D
[Sat Sep 10 2022 19:54:59 GMT+0200 (Ora legale dell’Europa centrale)][DirectoriCollector] !ERROR!: DirectoriesCollector error on Directory index:1 Error: Request failed with status code 400
[Sat Sep 10 2022 19:54:59 GMT+0200 (Ora legale dell’Europa centrale)][DirectoriCollector]: request_path: https://desmold-zion-3.vaimee.it/search/jsonpath?query=%24%5B%3F(%40%5Btype%5D%3D%3DSensor)%5D
[Sat Sep 10 2022 19:54:59 GMT+0200 (Ora legale dell’Europa centrale)][DirectoriCollector] !ERROR!: DirectoriesCollector error on Directory index:2 Error: Request failed with status code 400
[Sat Sep 10 2022 19:54:59 GMT+0200 (Ora legale dell’Europa centrale)][DirectoriCollector]: request_path: https://desmold-zion-4.vaimee.it/search/jsonpath?query=%24%5B%3F(%40%5Btype%5D%3D%3DSensor)%5D
[Sat Sep 10 2022 19:54:59 GMT+0200 (Ora legale dell’Europa centrale)][DirectoriCollector] !ERROR!: DirectoriesCollector error on Directory index:3 Error: Request failed with status code 400
[Sat Sep 10 2022 19:54:59 GMT+0200 (Ora legale dell’Europa centrale)][DirectoriCollector]: Pre punished source: 4/4
[Sat Sep 10 2022 19:54:59 GMT+0200 (Ora legale dell’Europa centrale)][Worker]: Collect values ...
[Sat Sep 10 2022 19:54:59 GMT+0200 (Ora legale dell’Europa centrale)][Worker]: ###INFO###: Using NumberSourceValues.
[Sat Sep 10 2022 19:54:59 GMT+0200 (Ora legale dell’Europa centrale)][Worker]: ###: 4
[Sat Sep 10 2022 19:54:59 GMT+0200 (Ora legale dell’Europa centrale)][DataCollector]: collect started!
[Sat Sep 10 2022 19:54:59 GMT+0200 (Ora legale dell’Europa centrale)][DataCollector]: Source[0] ask, ERROR: This is a VoidSource, will not return values with ask method.
[Sat Sep 10 2022 19:54:59 GMT+0200 (Ora legale dell’Europa centrale)][DataCollector]: Source[1] ask, ERROR: This is a VoidSource, will not return values with ask method.
[Sat Sep 10 2022 19:54:59 GMT+0200 (Ora legale dell’Europa centrale)][DataCollector]: Source[2] ask, ERROR: This is a VoidSource, will not return values with ask method.
[Sat Sep 10 2022 19:54:59 GMT+0200 (Ora legale dell’Europa centrale)][DataCollector]: Source[3] ask, ERROR: This is a VoidSource, will not return values with ask method.
[Sat Sep 10 2022 19:54:59 GMT+0200 (Ora legale dell’Europa centrale)][DataCollector]: Source[0] ask, received not valid value.
[Sat Sep 10 2022 19:54:59 GMT+0200 (Ora legale dell’Europa centrale)][DataCollector]: Source[1] ask, received not valid value.
[Sat Sep 10 2022 19:54:59 GMT+0200 (Ora legale dell’Europa centrale)][DataCollector]: Source[2] ask, received not valid value.
[Sat Sep 10 2022 19:54:59 GMT+0200 (Ora legale dell’Europa centrale)][DataCollector]: Source[3] ask, received not valid value.
[Sat Sep 10 2022 19:55:00 GMT+0200 (Ora legale dell’Europa centrale)][ConsensusForNumber]: Using consensus alghoritm for NUMBER
[Sat Sep 10 2022 19:55:00 GMT+0200 (Ora legale dell’Europa centrale)][ConsensusForNumber] !ERROR!: Impossible to reach consensus code[01]: no sources.
[Sat Sep 10 2022 19:55:00 GMT+0200 (Ora legale dell’Europa centrale)][Worker] !ERROR!: Impossible to reach consensus code[01]: no sources.

P.S. I don't understand why the 4 Zion are not reachable

@relu91
Copy link
Contributor

relu91 commented Sep 12, 2022

P.S. I don't understand why the 4 Zion are not reachable

I would bet is something related to vaimee/zion#11

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority: high (2) High-priority issue that should be resolved as soon as possible type: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants