PatreonのWebhookが失敗しています

I wonder if @Falco or anyone else could help.

I recently started using Patreon and I’ve set up a Discourse server in a Digital Ocean Droplet. I also installed the discourse-patreon plugin and entered all the keys etc. following this tutorial. I’m able to click the Update Patreon Data & Sync Groups button on the Plugin > Patreon > Filters page, and this works fine. All of my tiers are available and I’ve assigned all of them to Discourse Groups etc.

All seemed fine, but then I received an email from the Patreon servers telling me:
We’re writing to let you know that a WebHook POST to https://discourse.martinbaileyphotography.com/patreon/webhook has failed. As a result we’ve paused on sending more events to your URL.

I have tried setting up the client with both API 1 as specified in this post and API 2 changing the keys and secrets accordingly each time, and trying the top three deprecated events and the bottom six with both APIs, and I cannot find a combination that works.

In my Discourse logs, I’ve found this error message:
(patreon) Authentication failure! csrf_detected: OmniAuth::Strategies::OAuth2::CallbackError, csrf_detected | CSRF detected

I’ve asked Digital Ocean and they do not block POST requests and can’t think of any reason with their system why this would not work, so I’m stumped. I can’t find any useful information to help me fix this, so I’m now posting here (and in the Patreon forum) in the hope that this rings a bell with someone. Can anyone offer any advice on either how to fix this or what to check in order to troubleshoot this issue further.

Thanks in advance for any help anyone can provide!

Regards,
Martin Bailey.

「いいね!」 2

When configuring webhooks you should only enable the deprecated ones as explained in Configuring Patreon integration with Discourse and configure the secret in site settings.

If they still fail, it may be a problem on the Patreon side. Can you ask their support for detailed logs for the failures?

「いいね!」 2

Falcoさん、ありがとうございます。
お尋ねしてみます。彼らはすでにAPIのサポートは提供していないと私に伝えてきました。残念です。これを始めたとき、Patreonが不十分な会社であることに気づきませんでした。

わかりました、非推奨のオプションを使用します。API v1、webhookも使用すべきですか?当初は両方試しましたが、数週間試していません。

ご協力ありがとうございます。

「いいね!」 4

はい、v1バージョンを使用してください。

「いいね!」 3

Falcoさん、ありがとうございます。すべて元に戻し、APIキーとシークレットをすべて変更しました。

しかし、マニュアルテストではステータスコード200が返されており、呼び出しは正常に行われているようです。また、今朝Discourse / Patreonプラグインを確認したところ、データが5時間前に同期されたと表示されていました。5時間前は寝ていたので、何かが起こっているはずですが、それでも「Webhook Paused」という赤いメッセージが表示され、[Resume]ボタンをクリックすると別のエラーが発生します。

いずれにせよ、Patreonチームに詳細なログをリクエストして、彼らの意見を聞いてみます。

改めて、ご協力ありがとうございました。

「いいね!」 2

Falco様

受信トレイに溜まっていたPatreonサポートからの返信を見つけましたが、ログは提供できないとのことでした。また、コミュニティサポートフォーラムも閉鎖されたようです。

いくつかの同期は機能しており、睡眠中にシステムが同期されたことを示すメッセージも表示されていますが、新規のPatreonが貢献を行った際に自動的に追加されないというエラーは依然として発生しています。私は、新規Patreonのティアに応じて様々なカテゴリへのアクセス権を付与する招待状を作成することで、この問題を回避していますが、手動で送信する必要があるため、あまりスムーズではありません。また、貢献をやめた人々が私のDiscourseコミュニティから削除されない可能性も懸念しており、現在、少数のPatreonしかいないため確認できますが、Patreonプログラムを推進して多くの参加者が得られるようになれば、この問題を見失い、状況が悪化する可能性があります。

いずれにしても、これはあなたの問題ではないことは承知していますが、Patreonがマーケティングでこれらの統合を利用して人々がシステムを利用するように促しているにもかかわらず、これらの統合に対するサポートを全く提供していないことに非常に失望しています。

よろしくお願いいたします。
Martin.

Webhookサポートにより、変更への同期がより速くなりますが、プラグインはそれなしでも100%機能します。6時間ごとに完全な同期を行い、新しいパトロンをキャプチャし、退会したパトロンのアクセスを削除します。そのため、そのようなことを心配する必要はありません。

参考までに、このプラグインはDiscourseで100%作成され、Patreonのサポートなしで作成されたため、APIが存在する限り機能し続けることができます。

「いいね!」 1