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

Production Deployment #9

Open
DEVOPSIO21 opened this issue Dec 16, 2024 · 6 comments
Open

Production Deployment #9

DEVOPSIO21 opened this issue Dec 16, 2024 · 6 comments

Comments

@DEVOPSIO21
Copy link

DEVOPSIO21 commented Dec 16, 2024

works in my dev environment, not working when deploying to production, getting a big int error.

no movement on my telegram bot, using same .env as development

bigint: Failed to load bindings, pure JS will be used (try npm run rebuild?)


bigint

@DEVOPSIO21
Copy link
Author

to add to this, i've tried with node 18, 20, 22

@DEVOPSIO21
Copy link
Author

I got this working, but webhooks is not working.

I tested that my receviging webhook server is receiving webhooks correctly, and it is.

however, when i enable webhooks on src/providors/telegram.ts the bot stops working on telegram, even though i can see it's still tracking the transactions on the console.

no webhooks being sent, no response on telegram

if i comment the webhook code again, telegram will start working.

@DracoR22
Copy link
Owner

Hi, about the bigint error you can pretty much ignore it, its just a javascript warning.
As for the webhook, it requires your bot to be accessible via a publicly reachable URL, which typically means hosting it on a server. If you're running the bot locally, the webhook won't work because Telegram's servers can't reach your local environment, so just use polling instead if thats the case

@DEVOPSIO21
Copy link
Author

i am hosting it publicly. i tested the public endpoint with curl and i am receiving webhooks to it. the problem is that nothing is being sent to the /webhook/telegram route. expecaction is that the same payload that is being sent to TG, is also the payload of a POST to that local route/endpoint.

@DEVOPSIO21
Copy link
Author

Can you please pinpoint code files and lines related to the parsed transaction being posted to that local route?

@DracoR22
Copy link
Owner

I see in your console screenshot that your app url ends with /webhook and not /webhook/telegram which is where the POST request is pointing to

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

No branches or pull requests

2 participants