iGotify-Notification-Assistent icon indicating copy to clipboard operation
iGotify-Notification-Assistent copied to clipboard

[BUG] Refresh needed in Gotify App to receive push messages when using http

Open FantaExotic opened this issue 9 months ago • 1 comments

Can the issue be reproduced with the latest available release from gotify server? (y/n) y (v2.6.1)

Which one is the environment gotify server is running in?

  • [ ] Docker
  • [x] Linux machine
  • [ ] Windows machine
Docker startup command or config file here (please mask sensitive information)
# Example configuration file for the server.
# Save it to `config.yml` when edited

server:
  keepaliveperiodseconds: 0 # 0 = use Go default (15s); -1 = disable keepalive; set the interval in which keepalive packets will be sent. Only change this value if you know what you are doing.
  listenaddr: "" # the address to bind on, leave empty to bind on all addresses. Prefix with "unix:" to create a unix socket. Example: "unix:/tmp/gotify.sock".
  port: 80 # the port the HTTP server will listen on

  ssl:
    enabled: false # if https should be enabled
    redirecttohttps: true # redirect to https if site is accessed by http
    listenaddr: "" # the address to bind on, leave empty to bind on all addresses. Prefix with "unix:" to create a unix socket. Example: "unix:/tmp/gotify.sock".
    port: 443 # the https port
    certfile: cert/server2.crt # the cert file (leave empty when using letsencrypt)
    certkey: cert/server2.key # the cert key (leave empty when using letsencrypt)
    letsencrypt:
      enabled: false # if the certificate should be requested from letsencrypt
      accepttos: false # if you accept the tos from letsencrypt
      cache: data/certs # the directory of the cache from letsencrypt
      hosts: # the hosts for which letsencrypt should request certificates
#      - mydomain.tld
#      - myotherdomain.tld

  responseheaders: # response headers are added to every response (default: none)
#    X-Custom-Header: "custom value"
#
  trustedproxies: # IPs or IP ranges of trusted proxies. Used to obtain the remote ip via the X-Forwarded-For header. (configure 127.0.0.1 to trust sockets)
#   - 127.0.0.1/32
#   - ::1

  cors: # Sets cors headers only when needed and provides support for multiple allowed origins. Overrides Access-Control-* Headers in response headers.
    alloworigins:
#      - ".+.example.com"
#      - "otherdomain.com"
    allowmethods:
#      - "GET"
#      - "POST"
    allowheaders:
#      - "Authorization"
#      - "content-type"
  stream:
    pingperiodseconds: 45 # the interval in which websocket pings will be sent. Only change this value if you know what you are doing.
    allowedorigins: # allowed origins for websocket connections (same origin is always allowed)
#      - ".+.example.com"
#      - "otherdomain.com"

database: # for database see (configure database section)
  dialect: sqlite3
  connection: data/gotify.db

defaultuser: # on database creation, gotify creates an admin user
  name: admin # the username of the default user
  pass: admin # the password of the default user
passstrength: 10 # the bcrypt password strength (higher = better but also slower)
uploadedimagesdir: data/images # the directory for storing uploaded images
pluginsdir: data/plugins # the directory where plugin resides
registration: false # enable registrations

Do you have an reverse proxy installed in front of gotify server? (Please select None if the problem can be reproduced without the presense of a reverse proxy)

  • [x] None
  • [ ] Nginx
  • [ ] Apache
  • [ ] Caddy
Reverse proxy configuration (please mask sensitive information)

On which client do you experience problems? (Select as many as you can see)

  • [ ] WebUI
  • [ ] gotify-cli
  • [ ] Android Client
  • [ ] 3rd-party API call (Please include your code)
  • [x] iGotify App on iOS

What did you do? I started the gotify server on my linux machine with this command: sudo ./gotify-linux-amd64 Then i connected with my iGotify App to the Gotify server with these settings: http local instance http://192.168.178.20 port 9090 I had to restart the application since it was stuck loading. But after loading i successfully started the application and it was connected to my Gotify server.

then I send a push message from my commandline interface (which was running on the same machine where the server is hosted) with this command: curl "http://192.168.178.20:9090/message?token=AvBT76dGED7d28g" -F "message=testmessage" -F "priority=1"

I tried above command with multiple priorities (e.g. 0,1,5,10,100,...) I did not see any not

I did not see any popup message appear on my iOS iGotify app. Only after refreshing the app (by swiping down) it did update and i saw the messages appear on the iGotify app.

In addition i activated all necessary setting on my iOS device, this includes:

  1. activated notifications in the iGotify app in settings in section "messages"
  2. device was not in power saving mode (to make sure background activiites like receiving updates is working)
  3. activated "allow notifications" and backgroup refresh in iOS settings for the app iGotify

What did you expect to see? I expect that i dont have to refresh my iGotify app manually by swiping down, in order to receive push messages

What did you see instead? (Include screenshots, android logcat/request dumps if possible) I had to swipe down to receive the push messages on my iGotify app

Smartphone (please complete the following information):

  • Device: [e.g. iPhoneX]
  • OS: [e.g. iOS 16.7.10]
  • Version of iGotify [e.g. 1.4.2]

Additional context Add any other context about the problem here.

FantaExotic avatar Mar 01 '25 17:03 FantaExotic

hi, did you install the igotify notification assistent? it seems you only use the app

can you please describe you're problem correctly, without the informations from gotify? Because this is a third partyx community project and not rrelated to gotify.

androidseb25 avatar Mar 04 '25 12:03 androidseb25

I read this in other related notification projects. It seems that http is not supported for the background notification. So you should use https. But I'm not sure if this is only related to the "notification web api".

If it helps, I could provide you a very simple way to setup cloudflare tunnels (requires any public domain, but you can get one for under 1$ per year). This way you get a free certificate.

This setup is doable within under 5 minutes. And you will have fully secured https setup.

Cheers, Cellexec

cellexec avatar May 28 '25 09:05 cellexec