Open pyrog opened 3 years ago
Another example with data past from a webpage: same error message.
{
"@context" : "http://schema.org",
"@type" : "FoodEstablishment",
"image": [
"https://cdn.website.dish.co/media/62/04/2322328/Au-Cha-LHeureux-couv-cha.jpg"
],
"name" : "Au Cha L'Heureux",
"address" : {
"@type": "PostalAddress",
"streetAddress": "3 Impasse du Miracle",
"addressLocality": "Chavanod",
"postalCode": "74650",
"addressCountry": "FR"
},
"email" : "",
"menu" : "https://cdn.website.dish.co/media/d5/b1/2385750/Au-Cha-LHeureux-menu-cha-lheureux.jpg",
"priceRange": "",
"geo" : {
"@context" : "http://schema.org",
"@type" : "GeoCoordinates",
"latitude" : "45.8833524",
"longitude" : "6.0622454"
},
"url" : "https://au-cha-lheureux-restaurant.eatbu.com/",
"telephone" : "+33450524233",
"servesCuisine" : "Française, Fait maison, Traditionnel",
"paymentAccepted" : "Espèces, Paiement sans contact, MasterCard, Ticket Restaurant®, VISA, Carte ticket restaurant, Carte de débit, Apple Pay",
"openingHoursSpecification" : [
{
"@type" : "OpeningHoursSpecification",
"dayOfWeek" : "http://schema.org/Monday",
"opens" : "12:00",
"closes" : "14:00"
}
,
{
"@type" : "OpeningHoursSpecification",
"dayOfWeek" : "http://schema.org/Tuesday",
"opens" : "12:00",
"closes" : "14:00"
}
,
{
"@type" : "OpeningHoursSpecification",
"dayOfWeek" : "http://schema.org/Wednesday",
"opens" : "12:00",
"closes" : "14:00"
}
,
{
"@type" : "OpeningHoursSpecification",
"dayOfWeek" : "http://schema.org/Thursday",
"opens" : "12:00",
"closes" : "14:00"
}
,
{
"@type" : "OpeningHoursSpecification",
"dayOfWeek" : "http://schema.org/Thursday",
"opens" : "18:00",
"closes" : "21:00"
}
,
{
"@type" : "OpeningHoursSpecification",
"dayOfWeek" : "http://schema.org/Friday",
"opens" : "12:00",
"closes" : "14:00"
}
,
{
"@type" : "OpeningHoursSpecification",
"dayOfWeek" : "http://schema.org/Friday",
"opens" : "18:00",
"closes" : "21:00"
}
,
{
"@type" : "OpeningHoursSpecification",
"dayOfWeek" : "http://schema.org/Saturday",
"opens" : "12:00",
"closes" : "14:00"
}
,
{
"@type" : "OpeningHoursSpecification",
"dayOfWeek" : "http://schema.org/Saturday",
"opens" : "18:00",
"closes" : "21:00"
}
,
{
"@type" : "OpeningHoursSpecification",
"dayOfWeek" : "http://schema.org/Sunday",
"opens" : "00:00",
"closes" : "00:00"
}
],
"specialOpeningHoursSpecification" : [
]
,"deliveryMethod": [
"PICKUP",
"DELIVERY" ]
}
It works with the Ruby distiller: http://rdf.greggkellogg.net/distiller?command=expand&format=jsonld&output_format=jsonld&url=https:%2F%2Fmobilizon.chapril.org%2Fevents%2Fed969ea7-5c89-460e-b87b-6411ce747965
as the error message indicated, it seems to most likely be a CORS issue.
if you fix this issue of CORS error, please post it, i'm struggling with the same
It's a server configuration issue. These are the headers returned from schema.org:
HTTP/2 200
access-control-allow-credentials: true
access-control-allow-headers: Accept
access-control-allow-methods: GET
access-control-allow-origin: *
date: Fri, 19 Feb 2021 01:39:59 GMT
expires: Fri, 19 Feb 2021 01:49:59 GMT
etag: "v7F5aA"
x-cloud-trace-context: f8ad172246c779315ef4433df90888c6
content-type: application/ld+json
server: Google Frontend
content-length: 156492
cache-control: public, max-age=600
age: 0
alt-svc: h3-29=":443"; ma=2592000,h3-T051=":443"; ma=2592000,h3-Q050=":443"; ma=2592000,h3-Q046=":443"; ma=2592000,h3-Q043=
Key is probably access-control-allow-origin: *
.
CORS was a bad idea, IMHO.
@davidlehn thoughts?
All remote documents used display the following error:
jsonld.InvalidUrl: Dereferencing a URL did not result in a valid JSON-LD object. Possible causes are an inaccessible URL perhaps due to a same-origin policy (ensure the server uses CORS if you are using client-side JavaScript), too many redirects, a non-JSON response, or more than one HTTP Link Header was provided for a remote context.
Example : https://mobilizon.chapril.org/events/ed969ea7-5c89-460e-b87b-6411ce747965
All tabs are empty, except the Visualized tab that display the graph.
![Vusalized tab](https://user-images.githubusercontent.com/2158081/102340487-e3894300-3f96-11eb-914c-44f3562ca509.png)
Tested with Safari, Chrome and Firefox