Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(messenger): fix fetch pageId when in live mode #227

Merged
merged 1 commit into from
Nov 1, 2021

Conversation

samuelmasse
Copy link
Contributor

Fixes a problem where having a bot in live mode wouldn't work if it wasn't approved by facebook.

Closes DEV-1950

@linear
Copy link

linear bot commented Nov 1, 2021

DEV-1950 [BUG] Messenger stops working when the botpress server restarts while Facebook app is in live mode (botpress/borpress botpress/v12#1525)

If I restart the botpress server while the Facebook App it is connected to is in Live Mode, Messenger stops working receiving messages from the bot but it is still successfully sending messages to the bot.

I see the following error messages repeated in the logs

10/27/2021 11:19:32.395 [Messaging] app:messenger Error trying to setup conduit. Error: Error occured fetching page id
    at MessengerClient.getPageId (/snapshot/messaging/packages/server/dist/channels/messenger/client.js)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)

If I put the Facebook app into Development Mode, I see the following success message

[Messaging] app:messenger [botname] Messenger webhook https://[www.website.com]/api/v1/messaging/webhooks/[botname]/messenger`

Turning the Facebook App back into Live Mode no longer shows the error message and Messenger starts working again.

I am running botpress on Ubuntu 18 through docker-compose: docker-compose-community-nginx-https.yaml.

botpress/borpress botpress/v12#1525 by @ imperialleisure

Copy link
Member

@franklevasseur franklevasseur left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@franklevasseur franklevasseur merged commit d5c1e9c into shake_your_botpress Nov 1, 2021
samuelmasse added a commit that referenced this pull request Nov 2, 2021
* fix(messenger): fix fetch pageId when in live mode (#227)

* fix(smooch): fix buttons (#230)

* fix

Co-authored-by: Samuel Massé <59894025+samuelmasse@users.noreply.github.com>
Co-authored-by: Samuel Massé <samuelmasse4@gmail.com>
@samuelmasse samuelmasse deleted the sm-fix-fetch-pageId branch November 12, 2021 22:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants