SolidLabResearch / LDES-in-SOLID-Semantic-Observations-Replay

1 stars 2 forks source link

Replaying the dataset (the PATCH request) doesn't work when publishing to the Node Solid Server. #30

Open argahsuknesib opened 8 months ago

argahsuknesib commented 8 months ago

Hello,

I am using the replayer to replay to the Node Solid Server and I get this error in the console.

2024-03-12T15:13:14.846Z [WEB API] info: Express is listening at http://localhost:3001
2024-03-12T15:13:15.850Z [WEB API] info: The Dataset that will be loaded: spo2.nt
2024-03-12T15:13:21.914Z [WEB API] info: Start sorting the observations in the dataset.
2024-03-12T15:13:21.933Z [WEB API] info: Finished sorting the observations in the dataset. Size: 270
2024-03-12T15:13:26.471Z [WEB API] info: We're going to replay ONE observation and its related information from the current pointer onwards: 0
2024-03-12T15:13:26.471Z [WEB API] info: That observation is: [object Object]
2024-03-12T15:13:26.474Z [WEB API] info: Retrieving metadata of LDESinLDP if it already exists.
(node:75770) Warning: Setting the NODE_TLS_REJECT_UNAUTHORIZED environment variable to '0' makes TLS connections and HTTPS requests insecure by disabling certificate verification.
(Use `node --trace-warnings ...` to show where the warning was created)
2024-03-12T15:13:26.580Z [WEB API] info: Retrieving all related information to the Observation being replayed.
2024-03-12T15:13:26.580Z [WEB API] info: Calculating the optimal size of the buckets in the pod.
2024-03-12T15:13:26.581Z [WEB API] info: The amount of Resources per bucket is: 270
2024-03-12T15:13:26.581Z [WEB API] info: Resources per UUID: 2
2024-03-12T15:13:26.581Z [WEB API] info: Naive algorithm (SINGLE): Execution for 270 resources with a bucket size of 50
2024-03-12T15:13:26.615Z [LDESinLDP] info: LDES in LDP https://localhost:8443/agg/ already exists.
1
LDP Container created: https://localhost:8443/agg/1700814430000/
2024-03-12T15:13:26.654Z [editMetadata] error: Something went wrong when trying to patch the root. This MUST NOT HAPPEN
2024-03-12T15:13:26.654Z [editMetadata] error: Body that should have been inserted: INSERT DATA { _:b0 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <https://w3id.org/tree#GreaterThanOrEqualToRelation> .
_:b0 <https://w3id.org/tree#node> <https://localhost:8443/agg/1700814430000/> .
_:b0 <https://w3id.org/tree#path> <https://saref.etsi.org/core/hasTimestamp> .
_:b0 <https://w3id.org/tree#value> "2023-11-24T08:27:10.000Z"^^<http://www.w3.org/2001/XMLSchema#dateTime> .
<https://localhost:8443/agg/> <https://w3id.org/tree#relation> _:b0 .
}
2024-03-12T15:13:26.654Z [editMetadata] error: Patch applied successfully.

/home/kush/Code/RSP/test/LDES-in-SOLID-Semantic-Observations-Replay/engine/dist/util/Util.js:56
            throw new Error("Something went wrong when trying to patch the root");
                  ^

Error: Something went wrong when trying to patch the root
    at /home/kush/Code/RSP/test/LDES-in-SOLID-Semantic-Observations-Replay/engine/dist/util/Util.js:56:19
    at Generator.next (<anonymous>)
    at fulfilled (/home/kush/Code/RSP/test/LDES-in-SOLID-Semantic-Observations-Replay/engine/dist/util/Util.js:5:58)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

Node.js v20.11.1
argahsuknesib commented 8 months ago

Apparently, the PATCH request works fine but I get the same error in the editMetadata function. Weird.

argahsuknesib commented 8 months ago

But it throws an Error for the whole replayer server to crash, which doesn't make sense. We need to investigate the editMetadata function.

argahsuknesib commented 8 months ago

This can be closed when https://github.com/woutslabbinck/SolidEventSourcing/pull/17 is merged.

argahsuknesib commented 7 months ago

the issue is merged, created a pull request here to be merged https://github.com/SolidLabResearch/LDES-in-SOLID-Semantic-Observations-Replay/pull/31. This issue can be closed after a succesful merge.