telegraf / micro-bot

:robot: Zero-configuration Telegram bot runner
MIT License
182 stars 29 forks source link

μ-bot: Failed to start: Error: 404: Not Found (Now 1.0, webhook) #21

Closed Samleo8 closed 5 years ago

Samleo8 commented 5 years ago

I've been getting this error while trying to deploy to Now 1.0:

npm run now-start > brmcgamesleaderboard@2.0.0 now-start /home/nowuser/src > micro-bot -t {BOT_TOKEN}

μ-bot: Failed to start: Error: 404: Not Found More details: https://err.sh/now-cli/no-open-port-found signal: 9

I've been trying to deploy a simple telegram bot. For debugging purposes, it just says "Hello" on start and some stuff on a "help" command. I'm using Now 1.0 and webhook.

What puzzles me is that it's not the first time developing with micro-bot (the previous time worked perfectly). Also used Webhook.

As per with my previous working bot, my start scripts are:

"scripts":{
    "now-start": "micro-bot -t {BOT_TOKEN}",
    "start": "now -e BOT_TOKEN=<api-key> --public"
}

I've tried using micro-bot -t {BOT_TOKEN} -d {NOW_URL} -p 3000 to force setup the webhook, but that didn't work either.

From the error thrown, it seems to be something to do with lack of listening to port, but since I'm using a webhook why is this still a problem?

Samleo8 commented 5 years ago

Interestingly, the issue was resolved by specifying deployment but not bot token: micro-bot -d {NOW_URL}