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

how to debug LOADING_REMOTE_CONTEXT_FAILED problems? #2739

Closed
VladimirAlexiev opened this issue Sep 27, 2024 · 3 comments
Closed

how to debug LOADING_REMOTE_CONTEXT_FAILED problems? #2739

VladimirAlexiev opened this issue Sep 27, 2024 · 3 comments
Labels

Comments

@VladimirAlexiev
Copy link

VladimirAlexiev commented Sep 27, 2024

Version

5.1.0

Question

EKGF/dprod#90:

Trying to convert https://github.com/EKGF/dprod/blob/main/examples/data-quality/example.json with riot causes error:

riot.bat -out=trig -syntax=jsonld example.json
There was a problem encountered loading a remote context [code=LOADING_REMOTE_CONTEXT_FAILED].

The context is https://ekgf.github.io/dprod/dprod.jsonld and:

  • it's served as content-type: application/ld+json (reading through the JSONLD spec, I can't see whether it should be json or ld+json but all examples use .jsonld for the context URL)
  • the certificate is valid
  • example.json works ok on the JSONLD Playground: https://json-ld.org/playground/

So what may be the reason for the problem?

@afs
Copy link
Member

afs commented Sep 27, 2024

Getting example.json returns an HTML document; the github display of the file.
Use the "raw", the processing is all inside Titanium JSON-LD.

Internally, there is a nested stacktrace that says:

    A keyword [@context] redefinition has been detected.

My guess is that it is because of the array but I'm not a JSON-LD expert.

@VladimirAlexiev
Copy link
Author

Thanks @afs !

The reason is context nested inside context (actually dprod.jsonld is not a context at all, it's a dumped ontology).
So the Playground is more lenient than Titanium (thus Riot). But really dprod.jsonld is to blame.

Thank for the PR you made!
I'll close this specific issue.

@afs
Copy link
Member

afs commented Sep 29, 2024

Looks like filip26/titanium-json-ld#348.

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

No branches or pull requests

2 participants