Open graph debugger - URL returned a bad HTTP response code (500)
1

Hi there!

I have an issue with generating open graph previews for my website on Facebook only. The same applies to the FB Open graph debugger.

Let's take as an example a random website URL like https://projectluna.pl/pl-pl/product/ognista-milosc.

The scraper supposedly encounters 500. When I check the View in the graph API explorer or Scrape via API in the URLs section it looks (I think) okay.

The app is hosted on Vercel and if I check the function logs I do not see any errors at all.

Moreover, If I check any other open graph debugger it produces correct results!

I have no idea how to debug this further, any help would be appreciated.

Scraper result:

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
<html>
<head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head>
<body>

A server error has occurred INTERNAL_SERVER_ERROR

</body> </html>

Curl result:

curl -Iv -A "facebookplatform/1.0 (+http://developers.facebook.com)" https://projectluna.pl/pl-pl/product/ognista-milosc                                                              ─╯
*   Trying 76.76.21.21:443...
* Connected to projectluna.pl (76.76.21.21) port 443
* ALPN: curl offers h2,http/1.1
* (304) (OUT), TLS handshake, Client hello (1):
*  CAfile: /etc/ssl/cert.pem
*  CApath: none
* (304) (IN), TLS handshake, Server hello (2):
* (304) (IN), TLS handshake, Unknown (8):
* (304) (IN), TLS handshake, Certificate (11):
* (304) (IN), TLS handshake, CERT verify (15):
* (304) (IN), TLS handshake, Finished (20):
* (304) (OUT), TLS handshake, Finished (20):
* SSL connection using TLSv1.3 / AEAD-CHACHA20-POLY1305-SHA256
* ALPN: server accepted h2
* Server certificate:
*  subject: CN=projectluna.pl
*  start date: Mar 11 16:31:57 2024 GMT
*  expire date: Jun  9 16:31:56 2024 GMT
*  subjectAltName: host "projectluna.pl" matched cert's "projectluna.pl"
*  issuer: C=US; O=Let's Encrypt; CN=R3
*  SSL certificate verify ok.
* using HTTP/2
* [HTTP/2] [1] OPENED stream for https://projectluna.pl/pl-pl/product/ognista-milosc
* [HTTP/2] [1] [:method: HEAD]
* [HTTP/2] [1] [:scheme: https]
* [HTTP/2] [1] [:authority: projectluna.pl]
* [HTTP/2] [1] [:path: /pl-pl/product/ognista-milosc]
* [HTTP/2] [1] [user-agent: facebookplatform/1.0 (+http://developers.facebook.com)]
* [HTTP/2] [1] [accept: */*]
> HEAD /pl-pl/product/ognista-milosc HTTP/2
> Host: projectluna.pl
> User-Agent: facebookplatform/1.0 (+http://developers.facebook.com)
> Accept: */*
>
< HTTP/2 200
HTTP/2 200
< accept-ranges: bytes
accept-ranges: bytes
< access-control-allow-origin: *
access-control-allow-origin: *
< age: 0
age: 0
< cache-control: public, max-age=0, must-revalidate
cache-control: public, max-age=0, must-revalidate
< content-disposition: inline
content-disposition: inline
< content-type: text/html; charset=utf-8
content-type: text/html; charset=utf-8
< date: Sat, 30 Mar 2024 23:27:41 GMT
date: Sat, 30 Mar 2024 23:27:41 GMT
< link: </_next/static/media/26ba500767313ba6-s.p.woff2>; rel=preload; as="font"; crossorigin=""; type="font/woff2", </_next/static/media/98b1fe6b2a341c49-s.p.ttf>; rel=preload; as="font"; crossorigin=""; type="font/ttf", </_next/static/css/06883eced5749687.css>; rel=preload; as="style", </_next/static/css/5a3f569a7f92e994.css>; rel=preload; as="style"
link: </_next/static/media/26ba500767313ba6-s.p.woff2>; rel=preload; as="font"; crossorigin=""; type="font/woff2", </_next/static/media/98b1fe6b2a341c49-s.p.ttf>; rel=preload; as="font"; crossorigin=""; type="font/ttf", </_next/static/css/06883eced5749687.css>; rel=preload; as="style", </_next/static/css/5a3f569a7f92e994.css>; rel=preload; as="style"
< server: Vercel
server: Vercel
< set-cookie: NEXT_LOCALE=pl-pl; Path=/; Expires=Sun, 30 Mar 2025 23:27:40 GMT; Max-Age=31536000; SameSite=lax
set-cookie: NEXT_LOCALE=pl-pl; Path=/; Expires=Sun, 30 Mar 2025 23:27:40 GMT; Max-Age=31536000; SameSite=lax
< strict-transport-security: max-age=63072000
strict-transport-security: max-age=63072000
< vary: RSC, Next-Router-State-Tree, Next-Router-Prefetch
vary: RSC, Next-Router-State-Tree, Next-Router-Prefetch
< x-frame-options: SAMEORIGIN
x-frame-options: SAMEORIGIN
< x-matched-path: /pl-pl/product/ognista-milosc
x-matched-path: /pl-pl/product/ognista-milosc
< x-robots-tag: index, follow
x-robots-tag: index, follow
< x-vercel-cache: PRERENDER
x-vercel-cache: PRERENDER
< x-vercel-id: arn1::lrjr4-1711841260589-ac4250e4fe5f
x-vercel-id: arn1::lrjr4-1711841260589-ac4250e4fe5f

<
* Connection #0 to host projectluna.pl left intact
Piotr
Asked about a month ago