telegram-notifications-plugin icon indicating copy to clipboard operation
telegram-notifications-plugin copied to clipboard

Telegram Bot Not Send message

Open BocharnikovDmitry opened this issue 3 years ago • 5 comments

Jenkins and plugins versions report

telegramSend(message: "Hello World", chatId: 977645935)

What Operating System are you using (both controller, and any agents involved in the problem)?

Ubuntu 20

Reproduction steps

Write name and Token in Global Setting

Expected Results

Recieve Message

Actual Results

Message Not Recieved

Anything else?

No response

BocharnikovDmitry avatar Jan 13 '22 16:01 BocharnikovDmitry

any update? I got same error

chipcop106 avatar Mar 04 '22 09:03 chipcop106

Hello.

Install via the release file hpi, not via the plugin manager. So messages started working for me.

According to the server logs, you can see the 404 error, most likely the org.telegram.telegrambots dependency update is missing, in the version that comes through the plugin manager.

brgv avatar Mar 17 '22 22:03 brgv

Yeah, can confirm it. I've installed plugin with hpi file and everything is ok now.

Thank you for the solution! Cheers!

krepkay avatar Mar 28 '22 12:03 krepkay

@nikitabelonogov any chance to see a new release, with fix of the issue which already is in master branch?

dstd avatar Jun 21 '22 09:06 dstd

No Working

PipeLine Text

pipeline {
    agent { label 'S1' }
    
    post {
        failure {
            bat "echo failure"
        }
        
        success {
            bat "echo success"      
        }
    }
    
    stages {
        stage('Send') {
            steps {
               telegramSend(message: 'Test Jenkins', chatId: -1001330954208)                
            }
        }
    }
}

ERROR

java.lang.NullPointerException at jenkinsci.plugins.telegrambot.TelegramBotMessager.perform(TelegramBotMessager.java:71) at jenkins.tasks.SimpleBuildStep.perform(SimpleBuildStep.java:123) at org.jenkinsci.plugins.workflow.steps.CoreStep$Execution.run(CoreStep.java:101) at org.jenkinsci.plugins.workflow.steps.CoreStep$Execution.run(CoreStep.java:71) at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution.lambda$start$0(SynchronousNonBlockingStepExecution.java:47) at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) at java.base/java.lang.Thread.run(Thread.java:829)

BocharnikovDmitry avatar Aug 11 '22 14:08 BocharnikovDmitry