-
Notifications
You must be signed in to change notification settings - Fork 10
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
Push notification messages not delivered to iPhone/Android phones #120
Comments
After looking at your iOS code from git repository I have added following environment variables in the LAMP API Server stack Now I am getting Error encountered sending APN push notification. Please let me know if you need any more information on this. Thanks! |
@jeydude1 it should be |
Thanks Aditya, Getting Error encountered sending APN push notification. version: '3.7'
services:
server:
image: bidmcdigitalpsychiatry/lamp-server:2021
healthcheck:
test: wget --no-verbose --tries=1 --spider http://localhost:3000 || exit 1
environment:
HTTPS: 'off'
SCHEDULER: 'on'
ROOT_KEY: ''
CDB: 'http://@database:5984/'
APP_GATEWAY: 'app-gateway.lamp.digital'
PUSH_API_KEY: 'API Key from MindLAMP team'
DASHBOARD_URL: 'dashboard.lamp.digital'
REDIS_HOST: 'redis://cache:6379/0'
NATS_SERVER: 'message_queue:4222'
|
@Linoy339, please let me know if you need anything from me to avoid getting Error encountered sending APN push notification. Thanks! |
@jeydude1 . We can investigate it. Is the device token given above valid? |
@Linoy339, Here is most recent one push notification message and failure message, let me know if you need anything. I have reinstalled the mindLAMP app on my iphone 7 plus and confirmed push notification and other settings are ON. Still not getting push notification message. If you want to send test push notification message feel free to do it. Use this device token -
|
Got your test message on my iphone |
Okay |
Got another test message |
Can you send this
|
Interesting, got above push notification on my phone. Manual testing looks good |
any reason why API server is still erroring out - |
@jeydude1 . May I confirm that no participants are getting notifications ? |
Currently I am the only user/tester who has iPhone and others are having android phones. They have mindLAMP to Google Fit connection issue. So they are not able to test the push notification. |
Okay @jeydude1 |
@jeydude1 Can you restart the api server once, as we doubt that environment variables might not got reflected in api server? |
Redeployed the whole stack, still erroring out... Here is the yaml configuration for API server. version: '3.7'
services:
server:
image: bidmcdigitalpsychiatry/lamp-server:2021
healthcheck:
test: wget --no-verbose --tries=1 --spider http://localhost:3000 || exit 1
environment:
HTTPS: 'off'
SCHEDULER: 'on'
ROOT_KEY: 'fd804de0e9fb5bec33e888ad27c0ede41d39ff8e520c8a38fd8515618064ce24'
CDB: 'http://admin:yourpassword@database:5984/'
APP_GATEWAY: 'app-gateway.lamp.digital'
PUSH_API_KEY: 'key from rebecca'
DASHBOARD_URL: 'dashboard.lamp.digital'
REDIS_HOST: 'redis://cache:6379/0'
NATS_SERVER: 'message_queue:4222'
networks:
- default
- public
deploy:
mode: replicated
update_config:
order: start-first
failure_action: rollback
labels:
traefik.enable: 'true'
traefik.http.routers.lamp_server.entryPoints: 'websecure'
traefik.http.routers.lamp_server.rule: 'Host(`hostname`)'
traefik.http.routers.lamp_server.tls.certresolver: 'default'
traefik.http.services.lamp_server.loadbalancer.server.port: 3000
traefik.docker.network: 'public'
placement:
constraints:
- node.role == manager Here is the API server log:
|
I believe you guys are not printing actual exception object error message in the log, may be printing exception object might help |
@jeydude1. This is not the reason.
Please confirm that above data exists for android for the same user which you have stated above. Regarding notifications, it seems no calls are sent to app-gateway for some network issues. |
@Linoy339, here is what I am seeing while user login to the application using their mobile app. Please try this on your end and confirm. In android, while login to the mindLAMP android mobile application
for android users, I do not see any log with action login, tried from different phones same log message for android. In iOS, while login to the mindLAMP iOS mobile app
|
@Linoy339, About 'Error encountered sending APN push notification' in the code - https://github.com/BIDMCDigitalPsychiatry/LAMP-server/blob/master/src/utils/queue/SchedulerQueue.ts To display error/exception message what do I need to do on my local server, if you have instructions please share. Thanks! from:
to:
|
Can you console the error like this:
|
Thanks for sharing the code, we are using your image "image: bidmcdigitalpsychiatry/lamp-server:2021" not sure how to update the image code, if you have instructions to get inside the image and update the code and redploy the updated image in the portainer, share with me, happy to try that. Thanks a lot! |
@jeydude1 If you have node and npm installed, you could |
Thanks I will try that. Appreciate much for sharing the instructions |
Also another thing you may want to check is whether your firewall allows outgoing connections to |
I tried this from the centos server, i got the push notification to my iPhone, that confirms I am able to communicate with https://app-gateway.lamp.digital/push from centos sever.
I will need to install node and npm in the centos I will have to work with unix administrator for that. I will let you know what I find out. |
I could not deploy the API server package locally in centos , having issues with permissions. Once you have the exception message added to the code, please let me know I can redeploy latest mindLAMP stacks. Thanks! |
We have 2 iphone users having issues with push notifications. And for Android users scheduler is not generating push notification messages:
|
@avaidyam thanks for updating the code and for the new release while sending push notification to iOS devices here is the exception I am seeing and scheduler does not generate any push notification message for android devices.
Please let me know. Thanks! |
@jeydude1 This is an error on your deployments' end.
|
@avaidyam Thanks, I tried to restart the docker container, restarted the docker, no luck. Still getting the error, I will try few more options. If I got it working I will let you know the solutions. I just updated yaml configuration in the production CENT OS server. Push notification works in our production LAMP API server. Only test server has this issue. |
@amaljofyzco, here is what I see, I just downloaded and installed mindLAMP app from Android Play store app released on Dec 14 2020. Here is what I see when I login to the android app. |
@avaidyam I was able to fix the push notification in test server to avoid "Error encountered sending APN push notification."--FetchError: request to https://app-gateway.lamp.digital/push failed, reason: getaddrinfo EAI_AGAIN app-gateway.lamp.digital Solution, I have followed: |
@amaljofyzco, can you please try installing app from android play store and see if you are able to see the login action? Thanks! I have mindLAMP version 1.2 on android phone. Even tried with beta version of play store app in android, no luck getting login action for android. Let me know if you want me to do anything else. Thanks! |
@jeydude1 Those steps seem specific to CentOS distributions and perhaps your specific organization as well. Thanks for sharing though - others that use CentOS may need to do the same. |
Hei JeyDude, I have fixed the issue, it will be updated in the next update. |
@amaljofyzco Could you link the pull request on |
Thanks @amaljofyzco for fixing the android app to capture login action so we can get push notification for Android. Thanks a lot! Waiting for official release! |
We are getting push notification from beta version of Android. and iOS |
Hello,
We are not getting push notification messages to iPhone device, I have attached our LAMP YAML configuration and log from API Server. while looking at the log, I have noticed Push gateway address is not defined message in the API Server log. Is there anything I have to do.
While looking at the previous git issue - #88, user says, he enabled toggle button on the Dashboard app. I do not see any Toggle button.
Here is the lamp configuration
Here is the server log:
The text was updated successfully, but these errors were encountered: