dkg-engine icon indicating copy to clipboard operation
dkg-engine copied to clipboard

Malformed blazegraph INSERT query

Open botnumberseven opened this issue 7 months ago • 5 comments

Issue description

In blaze logs I can see it fails to insert a specific KC due to the malformed query, looks like some char needs to be escaped. UAL - did:dkg:otp:2043/0x8f678eb0e57ee8a109b295710e23076fa3a443fe/3620785

ERROR: BigdataRDFServlet.java:216: cause=java.util.concurrent.ExecutionException: org.openrdf.query.MalformedQueryException: Lexical error at line 19, column 145. Encountered: "U" (85), after : ""@ChatDKG, how can we train AI Agents to reason with transparency? \", query=SPARQL-UPDATE: updateStr= PREFIX schema: http://schema.org/ INSERT DATA { ...

log - malformed_query_insert.txt

Specifications

  • Node version: 8.0.11+hotfix.1
  • Platform: Ubuntu
  • Node wallet:
  • Node libp2p identity:

botnumberseven avatar Jun 11 '25 14:06 botnumberseven

Looks like 8.1 has the same/similar issue.

malformed_insert_8.1.txt

Image

botnumberseven avatar Jun 25 '25 21:06 botnumberseven

Hey @botnumberseven thanks for reporting, we will investigate

Mihajlo-Pavlovic avatar Jun 26 '25 10:06 Mihajlo-Pavlovic

Hey @botnumberseven,

I'd like to ask a few questions so I can better understand the issue you are facing; - What version of dkg.js are you using? - What version of ot-node are you using? - Where was this insert triggered from? Do you maybe have a JSON-LD you can provide us?

We do have emoji support, so it's weird the query broke due to an emoji character.

usebeforefree avatar Jul 08 '25 12:07 usebeforefree

@marko03kostic It's not my asset, so I don't know how it was published. But considering the data of the asset "@ChatDKG, how can we train AI Agents to reason with transparency?", I'd assume that came from twitter bot. I was running whatever the latest version of otnode by the date of reporting. My node updates pretty fast.

Btw, I don't think it's my node issue. https://dkg.origintrail.io/explore?ual=did:dkg:otp:2043/0x8f678eB0E57ee8A109B295710E23076fA3a443fe/3620785 this is the asset in question from the original issue, as I can see explorer also fails to show it. I'd assume none of the nodes inserted it. I also can not GET it with dkg.py (DKG_CLIENT_ERROR | Unable to find assertion on the network!)

And I've seen a lot of these issues in my blazegraph, and all of them were from twitter bot.

botnumberseven avatar Jul 08 '25 17:07 botnumberseven

here is another example from today

another_example.txt

botnumberseven avatar Jul 10 '25 15:07 botnumberseven