# Onebox Does Not Display - iFramely Passes

**URL:** https://meta.discourse.org/t/onebox-does-not-display-iframely-passes/116694
**Category:** Support
**Created:** [May 2, 2019, 1:49pm UTC](https://meta.discourse.org/t/onebox-does-not-display-iframely-passes/116694 "2019-05-02T13:49:51Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![Edward\_D\_Avignon](https://avatars.discourse-cdn.com/v4/letter/e/ba9def/32.png) [@Edward\_D\_Avignon](https://meta.discourse.org/u/Edward_D_Avignon)
#### Post date: [May 2, 2019, 1:49pm UTC](https://meta.discourse.org/t/onebox-does-not-display-iframely-passes/116694/1 "2019-05-02T13:49:51Z")

</div>

I have noticed very few sites I attempt to use a Onebox for are not working. I checked

> **[The Boy Scout board of review, a guide to getting started](https://onscouting.org/2016/11/03/the-boy-scout-board-of-review-everything-you-need-to-know/)**
>
> The board of review lets adults talk with the Scout about what he’s done, what he’s learned, how has it helped him and how he likes the program.

against [iframely.com](http://iframely.com) and it displays as expected. [Iframely URL Debugger - Open Graph, Twitter Cards, oEmbed](http://iframely.com/debug) does not indicate any errors.

Is there something else I can check?

---

<div class="post-metadata">

### Author: ![merefield](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/merefield/32/176214_2.png) [@merefield](https://meta.discourse.org/u/merefield)
#### Post date: [May 2, 2019, 5:35pm UTC](https://meta.discourse.org/t/onebox-does-not-display-iframely-passes/116694/2 "2019-05-02T17:35:23Z")

</div>

My guess is you are having your crawl rejected (and this is happening here on meta too).

But I have a solution, but it’s not 100% free:

> [@"Onebox Assistant", crawl for those previews reliably!](https://meta.discourse.org/t/onebox-assistant-a-plugin-to-help-onebox-do-its-job/107405):
>
> What it does Turns this kind of result: (where your server has failed to bring back the page source so cannot extract the required tags to build the onebox) Into this!: It simply provides an alternative path for onebox to get its page source with which to look for meta-data when the target server refuses your connection. It …

I just tested this on two of my sites, one equipped with the plugin, and one without, and it works on the one equipped.

My pleasure! 😉

One of the issues here is that Discourse/Onebox could be a heck of a lot more transparent about the way it handles a failure. I guess that’s a stretch feature, but it would be nice if there was more feedback to the user pasting the link (or even just the admins).

I checked my /logs on the site which failed and do not see any extra information wrt to the failed preview …

---

<div class="post-metadata">

### Author: ![Falco](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/falco/32/179432_2.png) [@Falco](https://meta.discourse.org/u/Falco)
#### Post date: [May 2, 2019, 5:40pm UTC](https://meta.discourse.org/t/onebox-does-not-display-iframely-passes/116694/3 "2019-05-02T17:40:12Z")

</div>

This is funny, that site blocks “forum” in the User Agent:

Works:

- Discourse
- Discourse Onebox
- Discourse Onebox v1.8.0.beta13

Don’t Work:

- Discourse Forum Onebox v1.8.0.beta13
- Discourse Forum Onebox
- Discourse Forum
- Forum

---

<div class="post-metadata">

### Author: ![merefield](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/merefield/32/176214_2.png) [@merefield](https://meta.discourse.org/u/merefield)
#### Post date: [May 2, 2019, 5:41pm UTC](https://meta.discourse.org/t/onebox-does-not-display-iframely-passes/116694/4 "2019-05-02T17:41:42Z")

</div>

Yes, I can reproduce that from a VPS using `curl -A "-string-"`! Can we have a setting to change the user agent? 😉

In this case that would be a lot less hassle 🙂

Oh wait, I see a file:

`discourse/config/initializers/100-onebox_options.rb`

```plaintext
require_dependency 'twitter_api'

Onebox.options = {
  twitter_client: TwitterApi,
  redirect_limit: 3,
  user_agent: "Discourse Forum Onebox v#{Discourse::VERSION::STRING}"
}

```

Take the word forum out?

I could easily add this to my plugin of course …

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [August 23, 2022, 4:33am UTC](https://meta.discourse.org/t/onebox-does-not-display-iframely-passes/116694/6 "2022-08-23T04:33:17Z")

</div>


