Skip to content

Refresh needed in Gotify App to receive push messages when using http #773

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
3 of 12 tasks
FantaExotic opened this issue Mar 1, 2025 · 1 comment
Open
3 of 12 tasks
Labels
a:bug Something isn't working

Comments

@FantaExotic
Copy link

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

Which one is the environment gotify server is running in?

  • Docker
  • 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)

  • 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)
  • 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

@FantaExotic FantaExotic added the a:bug Something isn't working label Mar 1, 2025
@eternal-flame-AD
Copy link
Member

eternal-flame-AD commented Mar 1, 2025

Please try opening the web app and check if websocket was properly connected. If notifications can be delivered normally using the webapp it should be something with your device settings, if not please check the devtools output.

I suspect it might be because of apple restrictions on unencrypted network traffic …

"Stuck loading" could be anything from a network hiccup to a real issue, but if refreshing does work I don't think it is related

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a:bug Something isn't working
Development

No branches or pull requests

2 participants