Embeded URL or Bookmarks fail

Hi
I’ve got a couple of posts using embedded url such as AWS Basics

I’ve tried to add new posts with similar embedded URL but it is not allowing as a bookmark or embedded URL. Ghost and OS has been patch since original posts were created but I can not seem to find a way to resolve this.

Any help appreciated.

====

blog.myaws.rocks running ghost 4.11.0
Ghost-CLI version: 1.17.3
Ghost version: 4.11.0 (at /var/www/myaws.rocks)

Installed and configured per production install guide on ghost website.
Running on RaspberryPi Ubuntu

Ubuntu Version

Linux ubuntu 5.11.0-1015-raspi #16-Ubuntu SMP PREEMPT Wed Jul 14 11:04:58 UTC 2021 aarch64 aarch64 aarch64 GNU/Linux

ghost doctor

✔ Checking system Node.js version - found v14.17.5
✔ Checking logged in user
✔ Ensuring user is not logged in as ghost user
✔ Checking if logged in user is directory owner
✔ Checking current folder permissions
System checks failed with message: 'Linux version is not Ubuntu 16, 18, or 20'
Some features of Ghost-CLI may not work without additional configuration.
For local installs we recommend using `ghost install local` instead.
? Continue anyway? Yes
System stack check skipped
ℹ Checking system compatibility [skipped]
✔ Checking for a MySQL installation
+ sudo systemctl is-active ghost_blog-myaws-rocks
Instance is currently running
ℹ Validating config [skipped]
✔ Checking folder permissions
✔ Checking file permissions
✔ Checking content folder ownership
✔ Checking memory availability
✔ Checking binary dependencies
✔ Checking free space
✔ Checking systemd unit file
✔ Checking systemd node version - found v14.17.5

Using Chrome on Windows 10.

With a new post.

Click + sign
add bookmark
paste www.bbc.co.uk
error is “No provider found for supplied URL.”

OR
Click + sign
add other / embed
paste www.bbc.co.uk
error is “There was an error when parsing the URL.”

Chrome Console displays the same error for both option.

0: {message: "Validation error, cannot read oembed.", context: "No provider found for supplied URL.",…}
code: null
context: "No provider found for supplied URL."
details: null
help: null
id: "867553a0-fe10-11eb-b2a0-e3959abb0a8d"
message: "Validation error, cannot read oembed."
property: null
type: "ValidationError"

isting post which has links embed that display as expected (

Are you encountering the same error when trying to embed all URLs or only www.bbc.co.uk?

When trying to embed any URL.
They all return the same error, even ones that posted ok before.

And you’ve tried embedding a wide range of URLs from a variety of different websites?

Also, I’m seeing a 502 Bad Gateway (nginx) error when trying to visit your blog.

So, last night didn’t go well.
While trying to look through what might have gone wrong i noticed some updates had come from ubuntu 21 not 20.04.
Trying to downgrade just killed everything so i’ve rebuilt today on an AWS Ubuntu Image

Debug Information:
OS: Ubuntu, v20.04.2 LTS
Node Version: v14.17.5
Ghost Version: 4.11.0
Ghost-CLI Version: 1.17.3
Environment: production

Ubuntu uname >>

Linux ip-172-26-3-149 5.8.0-1041-aws #43~20.04.1-Ubuntu SMP Thu Jul 15 11:07:29 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux

Ghost Doctor >>

✔ Checking system Node.js version - found v14.17.5
✔ Checking logged in user
✔ Ensuring user is not logged in as ghost user
✔ Checking if logged in user is directory owner
✔ Checking current folder permissions
✔ Checking system compatibility
✔ Checking for a MySQL installation
+ sudo systemctl is-active ghost_blog-myaws-rocks
✔ Validating config
✔ Checking folder permissions
✔ Checking file permissions
✔ Checking content folder ownership
✔ Checking memory availability
✔ Checking binary dependencies
✔ Checking free space
✔ Checking systemd unit file
✔ Checking systemd node version - found v14.17.5

Same errors appear on both bookmark and embeded url.
this is what appears in the error log

{"name":"Log","hostname":"ip-172-26-3-149","pid":2155,"level":50,"req":{"meta":{"requestId":"4226d784-16f6-4afc-b9da-0a2eb61b3b33","userId":"611a7094467eb0b19e91046d"},"url":"/oembed/?url=https%3A%2F%2Fwww.bbc.com&type=embed","method":"GET","originalUrl":"/ghost/api/canary/admin/oembed/?url=https%3A%2F%2Fwww.bbc.com&type=embed","params":{},"headers":{"x-forwarded-for":"195.224.146.6","x-forwarded-proto":"https","x-real-ip":"195.224.146.6","host":"blog.myaws.rocks","connection":"close","sec-ch-ua":"\"Chromium\";v=\"92\", \" Not A;Brand\";v=\"99\", \"Google Chrome\";v=\"92\"","sec-ch-ua-mobile":"?0","app-pragma":"no-cache","user-agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.131 Safari/537.36","content-type":"application/json; charset=UTF-8","accept":"application/json, text/javascript, */*; q=0.01","x-requested-with":"XMLHttpRequest","x-ghost-version":"4.11","sec-fetch-site":"same-origin","sec-fetch-mode":"cors","sec-fetch-dest":"empty","referer":"https://blog.myaws.rocks/ghost/","accept-encoding":"gzip, deflate, br","accept-language":"en-US,en;q=0.9","cookie":"**REDACTED**"},"query":{"url":"https://www.bbc.com","type":"embed"}},"res":{"_headers":{"x-powered-by":"Express","cache-control":"no-cache, private, no-store, must-revalidate, max-stale=0, post-check=0, pre-check=0","content-type":"application/json; charset=utf-8","content-length":"256","etag":"W/\"100-TfbzJHeXlLQPZBdYe1aLAICxjlE\"","vary":"Accept-Encoding"},"statusCode":422,"responseTime":"210ms"},"err":{"id":"1e84c940-fed5-11eb-a796-ef7c6a5c567c","domain":"https://blog.myaws.rocks","code":null,"name":"ValidationError","statusCode":422,"level":"normal","message":"No provider found for supplied URL.","context":"\"https://www.bbc.com\"","stack":"ValidationError: No provider found for supplied URL.\n    at OEmbed.unknownProvider (/var/www/blog/versions/4.11.0/core/server/services/oembed.js:61:31)\n    at /var/www/blog/versions/4.11.0/core/server/api/canary/oembed.js:32:35\n    at processTicksAndRejections (internal/process/task_queues.js:95:5)"},"msg":"No provider found for supplied URL.","time":"2021-08-16T21:01:25.849Z","v":0}

I’ve tried several URLs both “root domain” and sub pages.

Do you have a firewall or some other network setup that could be preventing outgoing connections from your server?

ufw shows as inactive.
While trying to see if connections were blocked I notice that curl from command line without protocol or when specifying http:// it does a redirect so you have to put https://
When doing this on the bookmark it now works correctly and adds the snippet.

However the embedded url does not work still and returns following:

{errors: [{message: "Validation error, cannot read oembed.",…}]}
errors: [{message: "Validation error, cannot read oembed.",…}]
0: {message: "Validation error, cannot read oembed.",…}
code: null
context: "No provider found for supplied URL. https://ubuntuforums.org/archive/index.php/t-1938464.html"
details: null
help: null
id: "39d601b0-ff38-11eb-a796-ef7c6a5c567c"
message: "Validation error, cannot read oembed."
property: null
type: "ValidationError"

Are you just pasting the URL or are you specifically creating an embed card? The error is stating that the URL is not embeddable, it either doesn’t provide an oembed resource or it’s serving invalid oembed data.

If you paste the URL on an empty line it will check to see if it’s embeddable and fall back to a bookmark card.

That seems to work just pasting on a line but again with full https:// rather than just domain.

Is there a way to tell once pasted which it used or to system they both end up the same.
Wondering what difference between would be when designing posts.

Embeds are defined by the site you’re embedding so would have specific functionality such as playable YouTube videos, Twitter-styled tweets, or Spotify playlists.

Bookmark cards all have the same Ghost-defined layout with the page title, description, and an image if the site makes one available.

The majority of sites will resolve to a bookmark card, embeds are typically special-purpose for interactive media embeds.

If you’re looking to email the post it’s worth being mindful that embeds typically won’t render well in emails because email doesn’t support javascript or anything interactive. There’s special handling for YouTube and Vimeo to show a thumbnail.

Thanks so much for your support Kevin.
Apart from a possible error on my original install it seems know how it handles things is half the challenge.