Skip to content

PushOver notification not working with error #560

@lubomben

Description

@lubomben

Behaviour

Test notifications with PushOver configured doesn't work. Tested on a Raspberry Pi 4 and on a VPS. Same behaviour.

Steps to reproduce this issue

  1. Configure PushOver notifier with environment variables in docjer compose file.
  2. Run command "docker-compose exec diun diun notif test"

Expected behaviour

Receive PushOver notification

Actual behaviour

No notification receiver on PushOver account and found error in diun container logs. Container exits after error.

Configuration

Paste your configuration files here

version: '3.5'

services:
  diun: 4.21.0
    image: crazymax/diun:latest
    container_name: diun
    command: serve
    volumes:
      - ./data:/data
      - /var/run/docker.sock:/var/run/docker.sock:ro
    environment:
      - TZ=Europe/Rome
      - LOG_LEVEL=info
      - LOG_JSON=false
      - DIUN_WATCH_WORKERS=20
      - DIUN_WATCH_SCHEDULE=0 */6 * * *
      - DIUN_PROVIDERS_DOCKER=true
      - DIUN_PROVIDERS_DOCKER_WATCHBYDEFAULT=true
      - DIUN_NOTIF_PUSHOVER_TOKEN=XXX
      - DIUN_NOTIF_PUSHOVER_RECIPIENT=XXX
      - DIUN_NOTIF_PUSHOVER_TEMPLATETITLE={{ .Entry.Image }} {{ if (eq .Entry.Status new) }}is available{{ else }}has been updated{{ end }}
      - DIUN_NOTIF_PUSHOVER_TEMPLATEBODY=Docker tag {{ if .Entry.Image.HubLink }}[**{{ .Entry.Image }}**]({{ .Entry.Image.HubLink }}){{ else }}**{{ .Entry.Image }}**{{ end }} which you subscribed to through {{ .Entry.Provider }} provider {{ if (eq .Entry.Status new) }}is available{{ else }}has been updated{{ end }} on {{ .Entry.Image.Domain }} registry (triggered by {{ .Meta.Hostname }} host).
    restart: unless-stopped

Logs

diun  | panic: template: title:1: function "new" not defined
diun  | 
diun  | goroutine 396 [running]:
diun  | text/template.Must(...)
diun  |         text/template/helper.go:25
diun  | github.com/crazy-max/diun/v4/internal/msg.(*Client).RenderMarkdown(0x4000bdb530)
diun  |         github.com/crazy-max/diun/v4/internal/msg/client.go:42 +0x704
diun  | github.com/crazy-max/diun/v4/internal/msg.(*Client).RenderHTML(0x4000095530)
diun  |         github.com/crazy-max/diun/v4/internal/msg/client.go:74 +0x28
diun  | github.com/crazy-max/diun/v4/internal/notif/pushover.(*Client).Send(0x400013e960, {{0x14c2432, 0x3}, {0x14c322e, 0x4}, {{0x40004c4040, 0x9}, {0x40004c404a, 0xe}, {0x40004c4059, ...}, ...}, ...})
diun  |         github.com/crazy-max/diun/v4/internal/notif/pushover/client.go:58 +0x270
diun  | github.com/crazy-max/diun/v4/internal/grpc.(*Client).NotifTest(0x4000734360, {0x17abac0, 0x40006061b0}, 0x40006061e0)
diun  |         github.com/crazy-max/diun/v4/internal/grpc/notif.go:63 +0x75c
diun  | github.com/crazy-max/diun/v4/pb._NotifService_NotifTest_Handler({0x13bb580, 0x4000734360}, {0x17abac0, 0x40006061b0}, 0x4000910060, 0x0)
diun  |         github.com/crazy-max/diun/v4/pb/notif_grpc.pb.go:79 +0x1bc
diun  | google.golang.org/grpc.(*Server).processUnaryRPC(0x400047e1c0, {0x17d70e0, 0x4000abd860}, 0x40004b8000, 0x4000734510, 0x2476ad0, 0x0)
diun  |         google.golang.org/[email protected]/server.go:1282 +0xc3c
diun  | google.golang.org/grpc.(*Server).handleStream(0x400047e1c0, {0x17d70e0, 0x4000abd860}, 0x40004b8000, 0x0)
diun  |         google.golang.org/[email protected]/server.go:1616 +0xa54
diun  | google.golang.org/grpc.(*Server).serveStreams.func1.2(0x40003a6050, 0x400047e1c0, {0x17d70e0, 0x4000abd860}, 0x40004b8000)
diun  |         google.golang.org/[email protected]/server.go:921 +0x94
diun  | created by google.golang.org/grpc.(*Server).serveStreams.func1
diun  |         google.golang.org/[email protected]/server.go:919 +0x1f0
diun exited with code 0

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions