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

"Error 401 on request" error

Open PolliSoft opened this issue 5 years ago • 8 comments

I just built the non-Docker version of OMBI-bot for Telegram. However, when I run it I get the following error and I don't know how to troubleshoot it.

OMBI-Bot version 2.1. (Same error on master branch) OMBI is v4.0.483.0. My env file is:

OMBI_HOST=http://localhost:5000
OMBI_KEY=xyzombikeyxyz
OMBI_BOT_TOKEN=xyzbotkeyxyz
OMBI_BOT_NAME=@bot_name

java -jar c:\Utils\ombi-bot-2.1.jar -p c:\Utils\ombi-bot.env

[trace, com.bot4s.telegram.clients.ScalajHttpClient] REQUEST 1fce7bda-2d06-4982-918d-b573ed4cfb1e DeleteWebhook
[error, com.bot4s.telegram.clients.ScalajHttpClient] RESPONSE 1fce7bda-2d06-4982-918d-b573ed4cfb1e java.lang.RuntimeException: Error 401 on request
Exception in thread "main" java.lang.RuntimeException: Error 401 on request
at com.bot4s.telegram.clients.ScalajHttpClient.$anonfun$sendRequest$13(ScalajHttpClient.scala:107)
at scala.util.Success.$anonfun$map$1(Try.scala:251)
at scala.util.Success.map(Try.scala:209)
at scala.concurrent.Future.$anonfun$map$1(Future.scala:288)
at scala.concurrent.impl.Promise.liftedTree1$1(Promise.scala:29)
at scala.concurrent.impl.Promise.$anonfun$transform$1(Promise.scala:29)
at scala.concurrent.impl.CallbackRunnable.run(Promise.scala:60)
at java.util.concurrent.ForkJoinTask$RunnableExecuteAction.exec(Unknown Source)
at java.util.concurrent.ForkJoinTask.doExec(Unknown Source)
at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(Unknown Source)
at java.util.concurrent.ForkJoinPool.runWorker(Unknown Source)
at java.util.concurrent.ForkJoinWorkerThread.run(Unknown Source)

PolliSoft avatar Oct 16 '20 07:10 PolliSoft

@PolliSoft gonna try and reproduce it tonight

StackTraceYo avatar Oct 16 '20 19:10 StackTraceYo

Hello, I've just installed the bot on v4 and seems to load well, @PolliSoft Did you try to remove "@" from your OMBI_BOT_NAME variable, I've seen this error the first time run in docker, and I don't use @ to name bot. Try it

daurpam avatar Nov 15 '20 12:11 daurpam

Tried it now, same error.

PolliSoft avatar Nov 16 '20 18:11 PolliSoft

@PolliSoft does that happen on boot? or after you try and run a command?

StackTraceYo avatar Nov 16 '20 23:11 StackTraceYo

On boot.

PolliSoft avatar Nov 17 '20 07:11 PolliSoft

that usually indicates either a wrong bot token/bot name or your other bot is still running

StackTraceYo avatar Nov 17 '20 16:11 StackTraceYo

I got it to work. I want to call it a rookie mistake... I had to remove the comments "// " on each line of the .env file. I thought that the double back slashes escaped the explanation. When I see the pasted .env file I gave you, I feel really ashamed!!!

PolliSoft avatar Nov 17 '20 18:11 PolliSoft

no thats my fault. i will make a change to it so it ignores those

StackTraceYo avatar Nov 17 '20 18:11 StackTraceYo