Onebox와 Amazon이 작동하지 않음 (제 환경에서)

다음과 같은 오류가 지속적으로 발생합니다: “Sorry, we were unable to generate a preview for this web page because the following oEmbed / OpenGraph tag could not be found: description.”

확인한 사항:

  • 테스트한 모든 링크에 meta name=description 태그가 있습니다.
  • 해당 링크는 meta.discourse에서 유효한 onebox를 생성합니다.

따라서 문제는 Amazon 페이지의 문제가 아닙니다.

시도한 조치:

  • 시스템이 최신 상태인지 확인했습니다 (3.4.0.beta4-dev).
  • 모든 플러그인을 제거한 상태로 앱을 재빌드했습니다. (초기 설치된 플러그인: discourse-adplugin, discourse-affiliate, discourse-subscriptions, discourse-yearly-review, discourse-whos-online, discourse-data-explorer, 그리고 DiscoTOC)
  • 모든 컴포넌트를 제거한 상태로 앱을 재빌드했습니다. (초기 설치된 컴포넌트: header submenus, easy responsive footer, discotoc, 그리고 discourse ebay affiliate)
  • 서버를 재시작했습니다.
  • 다른 브라우저를 사용해 보았습니다.

Onebox가 페이지 정보를 가져오지 못하고 있습니다. 20번 중 1번 정도 성공적으로 Onebox가 생성되긴 하지만, 이 부분이 가장 답답합니다.

질문:

  1. Onebox의 로그 및 오류 정보를 어디서 찾을 수 있나요?
  2. Onebox에는 캐시 메커니즘이 있는 것 같습니다. 캐시를 어떻게 비울 수 있나요?

원인을 파악하는 데 도움이 되는 조언이 있다면 알려주세요.

감사합니다.

위에서 언급한 플러그인과 컴포넌트에 대한 모든 소프트웨어 커스터마이징을 제거했습니다. 서버를 다시 빌드하고 재시작했습니다. (이것은 Windows가 아니라는 것을 알고 있지만, 모든 방법을 시도해 보고 있습니다.)

이제 Amazon One 박스 10대 중 9대를 정상적으로 작동시킬 수 있습니다.

문제의 원인을 파악하기 위해 이제부터 컴포넌트와 플러그인을 하나씩 추가해 볼 예정입니다.

아래 링크 외에 더 자세한 진단에 대한 도움이 필요할 것 같습니다:

Rails 콘솔에서:

[1] pry(main)> Oneboxer.invalidate 'https://www.amazon.ca/Thud-Terry-Pratchett/dp/055216769X'
=> 0

[2] pry(main)> Oneboxer.onebox 'https://www.amazon.ca/Thud-Terry-Pratchett/dp/055216769X'
=> "<aside class=\"onebox amazon\" data-onebox-src=\"https://www.amazon.ca/Thud-Terry-Pratchett/dp/055216769X\">\n  <header class=\"source\">\n\n      <a href=\"https://www.amazon.ca/Thud-Terry-Pratchett/dp/055216769X\" target=\"_blank\" rel=\"nofollow ugc noopener\">amazon.ca</a>\n  </header>\n\n  <article class=\"onebox-body\">\n    <img src=\"https://m.media-amazon.com/images/I/919CVPkFxjL._SL1500_.jpg\" class=\"thumbnail\">\n\n<h3><a href=\"https://www.amazon.ca/Thud-Terry-Pratchett/dp/055216769X\" target=\"_blank\" rel=\"nofollow ugc noopener\">Thud!: (Discworld Novel 34) : Pratchett, Terry: Amazon.ca: Books</a></h3>\n\n\n\n<p>Thud!: (Discworld Novel 34) : Pratchett, Terry: Amazon.ca: Books</p>\n\n<p>\n  \n  \n  \n  \n  <strong></strong>\n</p>\n\n  </article>\n\n  <div class=\"onebox-metadata\">\n    \n    \n  </div>\n\n  <div style=\"clear: both\"></div>\n</aside>\n"

Oneboxer 클래스에서 사용할 수 있는 내용을 살펴볼 수 있습니다.

둘째로, InlineOneboxers도 있습니다. 예를 들어 Thud!: (Discworld Novel 34) : Pratchett, Terry: Amazon.ca: Books

마찬가지로 다음을 사용할 수 있습니다.

InlineOneboxer.invalidate(url)
InlineOneboxer.lookup(url)

모든 컴포넌트와 플러그인을 제거하고 재부팅한 후, Amazon 링크가 올바른 원박스(onebox)로 표시되기 시작했습니다.

그 후 discourse-adplugin을 설치하자마자 10번 중 9번이 실패하는 상태로 되돌아갔습니다. 플러그인을 끄자 몇 번은 작동했지만, 곧바로 설명을 가져오지 못하는 실패 상태로 돌아갔습니다.

app.yml에서 discourse-adplugin을 제거하고 다시 빌드했습니다. 그런 다음 서버를 재부팅했고, Amazon 링크가 다시 원박스와 함께 정상적으로 작동하기 시작했습니다.

제가 사용하는 플러그인과 컴포넌트의 조합 사이에 어떤 충돌이 있는 것 같습니다. 이를 디버깅할 수 있는 옵션은 어떤 것들이 있을까요?

12시간 동안의 문제 해결, 플러그인과 구성 요소의 조합 테스트, 그리고 수차례의 재빌드 끝에 현재는 정상적으로 작동하고 있습니다. 향후 몇 주간 어떻게 반응할지 지켜보겠습니다.

기반적으로 변한 유일한 사항은 app.yml 파일 내의 플러그인 순서입니다. discourse-adplugin은 docker_manager 다음으로 가장 높은 우선순위를 가진 플러그인이 되었습니다.

          - git clone https://github.com/discourse/docker_manager.git
          - git clone https://github.com/discourse/discourse-adplugin
          - git clone https://github.com/discourse/discourse-affiliate
          - git clone https://github.com/discourse/discourse-subscriptions
          - git clone https://github.com/discourse/discourse-yearly-review
          - git clone https://github.com/discourse/discourse-whos-online
          - git clone https://github.com/discourse/discourse-data-explorer

플러그인의 순서가 중요하지 않을 것이라고 생각했지만, 실제로는 중요했습니다. discourse-adplugin이 마지막 몇 개의 위치에 있을 때, Amazon 링크가 Onebox와 함께 작동하지 않았습니다.