smart error messages

Pushsafer make it easy and safe to get push-notifications in real time on your Android or Windows mobile device, iPhone, iPad and Desktop!

Mit Pushsafer kann man in Echtzeit, einfach und sicher, Push-Benachrichtigungen auf sein iPhone, iPad, Android oder Windows Gerät sowie auf den Desktop senden lassen!

======================
Google Play
App Store
Windows Store
Homepage
alecasto

smart error messages

Postby alecasto » 19. Dec 2019, 19:59

Hi, i use pushsafer in arduino mega r3. I send 3 different notification for 3 different events from arduino to android/iphone device,but in some case i receive this error message in serial monitor:
Explorer returns its own error message. You can turn that off, but it's pretty tricky to find switch called "smart error messages". That means, of course, that short error messages are censored by default.IIS always returns error messages that are long enough to make Internet Explorer happy. The workaround is pretty simple: pad the error message with a big comment like this to push it over the five hundred and twelve bytes minimum. Of course, that's exactly what you're reading right now.
How i can resolve this?

User avatar
admin
Site Admin
Posts: 970
Joined: 1. Dec 2014, 12:41
Location: Germany

Re: smart error messages

Postby admin » 19. Dec 2019, 22:16

Hi
smart error messages
isn't an error message from Pushsafer

Kevin
Pushsafer DE: Dir gefällt Service und Support! Dann freuen wir uns auf deine Bewertung!
Pushsafer EN: You like Service and Support! Then we look forward to your review!

Pushsafer.com Website - iOS - Android - Windows 10

alecasto

Re: smart error messages

Postby alecasto » 20. Dec 2019, 07:52

i'm sorry but i used the example code and the problem occurs alternatively: first sent, second error, third sent, fourth error etc in a systematic way.
Any ideas?

User avatar
admin
Site Admin
Posts: 970
Joined: 1. Dec 2014, 12:41
Location: Germany

Re: smart error messages

Postby admin » 20. Dec 2019, 10:17

can you provide an error log!
Pushsafer DE: Dir gefällt Service und Support! Dann freuen wir uns auf deine Bewertung!
Pushsafer EN: You like Service and Support! Then we look forward to your review!

Pushsafer.com Website - iOS - Android - Windows 10

alecasto

Re: smart error messages

Postby alecasto » 20. Dec 2019, 14:24

Hi
when i press the button for the first time, i receive the push notification, i see the log on pushsafer site, and in the arduino serial monitor i read this:
15:03:50.870 -> Connected
15:03:51.335 ->
15:03:51.335 -> Sent
when i press the button for the second time, i don't receive a push notification and i'not see the log in the pushsafer site. in the arduino serial monitor i read this:
15:04:17.320 -> Connected
15:04:17.780 -> response
15:04:41.188 -> response
more response .....
15:04:42.996 -> response
15:04:42.996 -> response
15:04:42.996 -> or messages are censored by default.
15:04:42.996 -> - IIS always returns error messages that are long
15:04:42.996 -> - enough to make Internet Explorer happy. The
15:04:42.996 -> - workaround is pretty simple: pad the error
15:04:42.996 -> - message with a big comment like this to push it
15:04:42.996 -> - over the five hundred and twelve bytes minimum.
15:04:43.043 -> - Of course, that's exactly what you're reading
15:04:43.043 -> - right now.
15:04:43.043 -> -->
15:04:43.043 ->
15:04:43.043 -> Sent.
but notification not sent really.

If i press the button for third time work normally.
If i press the button for fourth time i have the error
and so on in alternate ways.

I use this example code
Pushsafer pushsafer(PushsaferKey, client);
struct PushSaferInput input;
input.message = "testo");
input.title = "testo";
input.sound = "3";
input.vibration = "3";
input.icon = "120";
input.iconcolor = "#FF0000";
input.priority = "2";
input.device = "a";
input.url = "";
input.urlTitle = "";
input.picture = "";
input.picture2 = "";
input.picture3 = "";
input.time2live = "";
input.retry = "";
input.expire = "";
input.answer = "0";
Serial.println(pushsafer.sendEvent(input));
Serial.println("Sent");
sent = true;
--------------------

User avatar
admin
Site Admin
Posts: 970
Joined: 1. Dec 2014, 12:41
Location: Germany

Re: smart error messages

Postby admin » 20. Dec 2019, 19:19

Hi again,

i build a workaround to fix your issue.

See in the Pushsafer changelog!
https://www.pushsafer.com/de/changelog

Switch the option "Long error messages" to on in your Pushsafer profile!

Hope this helps

Kevin
Pushsafer DE: Dir gefällt Service und Support! Dann freuen wir uns auf deine Bewertung!
Pushsafer EN: You like Service and Support! Then we look forward to your review!

Pushsafer.com Website - iOS - Android - Windows 10

alecasto

Re: smart error messages

Postby alecasto » 20. Dec 2019, 19:36

Thanks for your help.
I have set the flag on the large message on my profile and saved but I have the same problems.
i time to wait for the server to update?

User avatar
admin
Site Admin
Posts: 970
Joined: 1. Dec 2014, 12:41
Location: Germany

Re: smart error messages

Postby admin » 20. Dec 2019, 20:39

its online, when activated the messages look like:

Code: Select all

{"status":1,"success":"message transmitted","available":26610,"message_ids":"7011145:119","longerror","You activated long response messages in your Pushsafer profile. Unfortunately, your system has added a clever new feature named too small messages. If the text in an errors message is too small, specifically less than 512 bytes, Your system returns its own error message.  Yes, you can turn that off, but *surprise* its pretty tricky to find buried as a switch called smart error messages. That means, of course, that many of Resins error messages are censored by default. And, of course, you will be shocked to learn that IIS always returns error messages that are long enough to make your system happy. The workaround is pretty simple: pad the error message with a big comment to push it over the five hundred and twelve byte minimum. Of course, thats exactly what you are reading right now."}
Please try again!
Pushsafer DE: Dir gefällt Service und Support! Dann freuen wir uns auf deine Bewertung!
Pushsafer EN: You like Service and Support! Then we look forward to your review!

Pushsafer.com Website - iOS - Android - Windows 10

alecasto

Re: smart error messages

Postby alecasto » 20. Dec 2019, 20:48

i have just try but it's same problem
frist send correct
21:43:19.586 -> Connected
21:43:20.008 ->
21:43:20.008 -> Sent
Second send not working
21:43:30.173 -> Connected
21:43:30.535 -> response
21:43:53.621 -> response
more line response
21:43:55.417 -> response
21:43:55.417 ->
21:43:55.417 -> - that short error messages are censored by default.
21:43:55.463 -> - IIS always returns error messages that are long
21:43:55.463 -> - enough to make Internet Explorer happy. The
21:43:55.463 -> - workaround is pretty simple: pad the error
21:43:55.463 -> - message with a big comment like this to push it
21:43:55.463 -> - over the five hundred and twelve bytes minimum.
21:43:55.463 -> - Of course, that's exactly what you're reading
21:43:55.463 -> - right now.
21:43:55.463 -> -->
21:43:55.463 ->
21:43:55.463 -> Sent

I have reset the api key and use a new key. I dont see in my log the message_ids":"7011145:119
i see only
2019-12-20 21:28:46 a 7011397 > 20260
2019-12-20 21:28:02 a 7011389 > 20260
2019-12-20 21:24:47 a 7011373 > 20260
2019-12-20 21:22:46 a 7011337 > 20260
2019-12-20 20:43:39 a 7011071 > 20260
2019-12-20 20:42:31 a 7011064 > 20260
2019-12-20 20:40:44 a 7011030 > 20260
2019-12-20 20:40:09 a 7011023 > 20260
2019-12-20 20:32:14 a 7010944 > 20260

i'm sorry but i not have ideas

User avatar
admin
Site Admin
Posts: 970
Joined: 1. Dec 2014, 12:41
Location: Germany

Re: smart error messages

Postby admin » 20. Dec 2019, 21:06

Hi again

i do some changes to the cpp script here
https://github.com/appzer/pushsafer-ard ... hsafer.cpp

Please reinstall and try again!

Now you only get serial messages when you activated the debug mode.
With the debug mode as active you also should get the json response from pushsafer!

Kevin
Pushsafer DE: Dir gefällt Service und Support! Dann freuen wir uns auf deine Bewertung!
Pushsafer EN: You like Service and Support! Then we look forward to your review!

Pushsafer.com Website - iOS - Android - Windows 10


Who is online

Users browsing this forum: No registered users and 4 guests