micro-bot icon indicating copy to clipboard operation
micro-bot copied to clipboard

μ-bot: Failed to start: Error: 404: Not Found

Open Kevinmrqz opened this issue 7 years ago • 5 comments

Whenever I try to run or deploy the bot y got the error "μ-bot: Failed to start: Error: 404: Not Found". I've been also trying using the examples but it gives me the same error. However this error only happens on windows environments because it works when I do it on Mac. Hope you guys can help me if there's a solution or if it just doesn't work on windows.

Kevinmrqz avatar Aug 20 '18 22:08 Kevinmrqz

Could you provide more information on how you are starting your bot on windows environment?

thomasgroch avatar Aug 30 '18 15:08 thomasgroch

I have the same problem in the heroku environment

2018-10-10T21:02:44.172955+00:00 heroku[web.1]: Starting process with command `micro-bot -p 37325`
2018-10-10T21:02:48.873602+00:00 app[web.1]: μ-bot: Failed to start: Error: 404: Not Found

emersonlaurentino avatar Oct 10 '18 21:10 emersonlaurentino

I was able to solve this problem by setting the variables correctly, but i have another problem:

when my bot is runnig in heroku:

2018-10-10T21:30:00.554084+00:00 heroku[web.1]: Starting process with command `micro-bot -p 12859`
2018-10-10T21:30:03.452054+00:00 app[web.1]: μ-bot: Starting @MY_BOT
2018-10-10T21:30:03.541865+00:00 app[web.1]: μ-bot: Bot started
2018-10-10T21:31:00.846057+00:00 heroku[web.1]: State changed from starting to crashed
2018-10-10T21:31:00.736316+00:00 heroku[web.1]: Error R10 (Boot timeout) -> Web process failed to bind to $PORT within 60 seconds of launch
2018-10-10T21:31:00.736450+00:00 heroku[web.1]: Stopping process with SIGKILL
2018-10-10T21:31:00.825657+00:00 heroku[web.1]: Process exited with status 137

emersonlaurentino avatar Oct 10 '18 21:10 emersonlaurentino

I was able to solve this problem too. I changed web to work on Procfile and run the command:

heroku scale web=0 worker=1

https://github.com/Naltox/telegram-node-bot/issues/119

emersonlaurentino avatar Oct 10 '18 23:10 emersonlaurentino

@emersonlaurentino how you solved this?

$ npm start

> [email protected] start D:\dev\temp\testbot\smart-bot
> micro-bot -t 'tokenHERE' ./index.js

μ-bot: Failed to start: Error: 404: Not Found

also tried:

$ npm start

> [email protected] start D:\dev\temp\testbot\smart-bot
> micro-bot -t 'tokenHERE' index.js

μ-bot: Failed to start: Error: 404: Not Found

ls -al

$ ls -al
total 125
drwxr-xr-x 1 user 197121     0 дек 15 04:20 ./
drwxr-xr-x 1 user 197121     0 дек 13 08:55 ../
-rw-r--r-- 1 user 197121   249 дек 13 08:53 .editorconfig
-rw-r--r-- 1 user 197121    14 дек 13 08:53 .eslintignore
-rw-r--r-- 1 user 197121    30 дек 13 08:53 .eslintrc
drwxr-xr-x 1 user 197121     0 дек 15 04:21 .git/
-rw-r--r-- 1 user 197121   550 дек 13 08:53 .gitignore
-rw-r--r-- 1 user 197121   351 дек 13 11:49 index.js
drwxr-xr-x 1 user 197121     0 дек 15 04:20 node_modules/
-rw-r--r-- 1 user 197121   856 дек 15 04:19 package.json
-rw-r--r-- 1 user 197121 52146 дек 15 04:20 package-lock.json
-rw-r--r-- 1 user 197121   797 дек 13 08:53 readme.md

lgg avatar Dec 15 '18 01:12 lgg