Notifications rarely working suddenly

Hi!

I am running local Blynk Server with latest version and several projects on it. For about 1.5 years everything worked fine including notifications!

Suddenly I rarely get push notifications to my iPhone running iOS 13.3.1.

When I remove the notifications widget, and add it again it seems to work for <24h without changing anything.

It also doesn’t matter if notification is sent by esp8266 or nodered… seems like a server issue.

Any ideas? Thanks for your support!

I can’t provide any insight into the issue I’m afraid, but those that can will probably want to know what version of the app you are running, and what version of local server as well.

Information from the Blynk local server logs, especially those relating to the notification send process will probably be helpful too.

I assume that your local server has a constant connection to the internet and that there are no issues with this, and that you’ve tried rebooting everything, including the router?

There was an issue previously with iOS notifications, which required the Blynk app to be uninstalled then reinstalled to fix the issue…

Pete.

Hi, yes sorry the version was not pointed out clearly. Local server running on server-0.41.12-java8.jar
iPhone App Version 2.26.2(8)

Internet Connection working and I restarted everything.

In the log files I can see no information about notifications or errors occurring. Do I have to change log level maybe?

I deleted the app, restarted the phone and reinstalled the app. That doesn’t help.

Then I deleted notification widget in the project and added again, this worked for yesterday night. This morning it stopped working again.

Any ideas? Thanks!
Thomas

Any actions on your side during this time? Login/logout, stop/run project… did you open Blynk app at all during this time?
Are you the only one using the project (it is not used on other phones)?
How often notifications are sent?

What response do you get when sending notification using http api?

e.g. from console:

curl -v -X POST -d "{\"body\":\"test\"}"  "http://<SERVER_HERE>/<TOKEN_HERE>/notify" --trace-ascii /dev/stdout -H "Content-Type: application/json"

Thanks Eugene for your response.

I opened the app and I am sure the app disconnected and connected automatically during that time due to lost WiFi etc.

I am using notifications in several projects on my local server. One project is shared but others are not. All do not work now. Before I had the effect, that the shared device got the notification and I did not on the main project.

With the http call the notification worked on all projects! In my project I use the Nodered notification widget or on the esp the function call.

I get the following response:

Many of the following line…
== Info: Expire in 0 ms for 1 (transfer 0x1c55880)
== Info: Trying ::1…
== Info: TCP_NODELAY set
== Info: Expire in 149999 ms for 3 (transfer 0x1c55880)
== Info: Expire in 200 ms for 4 (transfer 0x1c55880)
== Info: Connected to localhost (::1) port 8080 (#0)
=> Send header, 170 bytes (0xaa)
0000: POST //notify HTTP/1.1
0038: Host: localhost:8080
004e: User-Agent: curl/7.64.0
0067: Accept: /
0074: Content-Type: application/json
0094: Content-Length: 15
00a8:
=> Send data, 15 bytes (0xf)
0000: {“body”:“test”}
== Info: upload completely sent off: 15 out of 15 bytes
<= Recv header, 17 bytes (0x11)
0000: HTTP/1.1 200 OK
<= Recv header, 24 bytes (0x18)
0000: connection: keep-alive
<= Recv header, 32 bytes (0x20)
0000: access-control-allow-origin: *
<= Recv header, 19 bytes (0x13)
0000: content-length: 0
<= Recv header, 2 bytes (0x2)
0000:
== Info: Connection #0 to host localhost left intact

When you said that with the http call the notification worked on all projects, did you mean that a notification, sent using http api with a token of a device used in a shared project, was received on both phones (both main and shared account received push)?

What phone/app version is used on a shared account?

When you say you had effect notification received on a shared but not main project - was it just once? Is it possible that when you say notifications don’t work (for this particular, shared project) they actually do work for a shared account?

The the code from esp8266 that handles notifications dispatch uses ordinary Blynk.notify() function, right?

Shared device is using same app version and also iOS. For now I signed out on the shared device for closing in on the problem.

I just found out - and I can reproduce it - when I stop and start the one project under my user that does not send notifications it starts again sending. But the other one stops. When I do same stop/start on the second one it works on it but stops on the first one.

Seems like either the one or the other project can send the notification. Or at least the app on the phone processes it.

I still don’t understand how come http /notify api works when Blynk.notify() don’t.

Can you increase the server log level to trace, this will make server output to blynk.log file not just errors, but when notification sent successfully as well, so you know for sure notification was dispatched.

The logging level is set via server.properties file, as described in server readme: https://github.com/blynkkk/blynk-server

In the log file I can find the following for the “not working project” (garage):

22:08:43.418 TRACE- Incoming id=648, command=Push, body=‘Garage door opened’
22:08:43.419 DEBUG- User has no access token provided for push widget.

Then I stopped the garage project and started again. The following test sent a push and log file says:
22:14:19.413 TRACE- Incoming id=1028, command=Push, body=‘Garage door closed’
22:14:19.414 TRACE- Sending push for user xxx@xxx.xx, with message : ‘Garage door closed’.
22:14:19.416 DEBUG- Using pooled Channel ‘[id: 0x85121bee, L:/192.168.11.11:50668 - R:fcm.googleapis.com/172.217.16.74:443]’ for ‘POST’ to ‘https://fcm.googleapis.com/fcm/send
22:14:19.416 DEBUG- Using open Channel [id: 0x85121bee, L:/192.168.11.11:50668 - R:fcm.googleapis.com/172.217.16.74:443] for POST ‘/fcm/send’

Now the Homeautomation Project doesnt send push and log file is:
22:14:31.109 TRACE- Incoming id=94, command=Push, body=‘Test!’
22:14:31.109 DEBUG- User has no access token provided for push widget.

What is the “access token for push widget” ?

When I run the HTTP API call on the non working project, I get the following error as a response to the command: “Notification widget not initialized.”

Thank you for your continuing support!

OK, thanks for the logs. The issue will be fixed in the next server update.

1 Like

Thanks for the support and getting it fixed!

hi, I am also getting the
Error sending push. Reason MismatchSenderId

00:30:19.140 TRACE- HTTP connection detected.
00:30:19.163 TRACE- In http and websocket unificator handler.
00:30:19.165 TRACE- Initialized http pipeline. [HttpServerCodec, HttpServerKeepAlive, HttpObjectAggregator, LetsEncryptHandler#0, HttpChunkedWrite, HttpUrlMapper, HttpStaticFile, ResetPasswordHttpLogic#0, HttpAPILogic#0, NoMatchHandler#0, DefaultChannelPipeline$TailContext#0]
00:30:19.165 TRACE- Mapping from /OBFUSCATED,/notify to /_3vpynxL22NY12ADSsDQeSmOjOHhW8dj/notify
00:30:19.165 DEBUG- POST : /OBFUSCATED,/notify
00:30:19.167 TRACE- Re registering http channel. [id: 0xf5c4b8e5, L:/192.168.1.11:8080 - R:/192.168.1.11:54681]
00:30:19.169 TRACE- Sending push for user OBFUSCATED, with message : ‘message no less than 255 chars.’.
00:30:19.190 TRACE- Re registering http channel finished.
00:30:19.347 TRACE- Incoming id=500, command=Ping, body=‘’
00:30:19.469 DEBUG-

Request DefaultFullHttpRequest(decodeResult: success, version: HTTP/1.1, content: UnpooledSlicedByteBuf(freed))
POST /fcm/send HTTP/1.1
Authorization: key=OBFUSCATED,
content-type: application/json; charset=utf-8
content-length: 262
host: fcm.googleapis.com
accept: /

Response DefaultHttpResponse(decodeResult: success, version: HTTP/1.1)
HTTP/1.1 200 OK
Content-Type: application/json; charset=UTF-8
Date: Sun, 24 Jan 2021 22:30:18 GMT
Expires: Sun, 24 Jan 2021 22:30:18 GMT
Cache-Control: private, max-age=0
X-Content-Type-Options: nosniff
X-Frame-Options: SAMEORIGIN
Content-Security-Policy: frame-ancestors ‘self’
X-XSS-Protection: 1; mode=block
Server: GSE
Alt-Svc: h3-29=“:443”; ma=2592000,h3-T051=“:443”; ma=2592000,h3-Q050=“:443”; ma=2592000,h3-Q046=“:443”; ma=2592000,h3-Q043=“:443”; ma=2592000,quic=“:443”; ma=2592000; v=“46,43”
Accept-Ranges: none
Vary: Accept-Encoding
Transfer-Encoding: chunked

00:30:19.475 ERROR- Error sending push. Reason MismatchSenderId