Error executing virtual command [].sendNotificationToContacts: (13ms) java.lang.NullPointerException: Cannot get property 'translatedMessage' on null object`

fixed

#1

1) Give a description of the problem

+213ms ║║Error executing virtual command [].sendNotificationToContacts: (13ms) java.lang.NullPointerException: Cannot get property 'translatedMessage' on null object

2) What is the expected behavior?
A text notification is sent to the expected users.

3) What is happening/not happening?
The alarm arms in away, and location mode is set to Away, but the notification is not sent.

**4) Post a Green Snapshot of the piston

5) Attach any logs (From ST IDE and by turning logging level to Full)

2/15/2018, 7:48:03 AM +201ms
+1ms	╔Received event [Rozzly Home].alarmSystemStatus = away with a delay of 44ms
+10124ms	║Piston waited at a semaphore for 10018ms
+10127ms	║Runtime (39864 bytes) successfully initialized in 10032ms (v0.2.102.20180116) (10126ms)
+10128ms	║╔Execution stage started
+10133ms	║╚Execution stage complete. (5ms)
+10134ms	╚Event processed successfully (10134ms)
2/15/2018, 7:48:03 AM +1ms
+1ms	╔Received event [1 iPhone (BETA)].presence = not present with a delay of 94ms
+111ms	║Runtime (39795 bytes) successfully initialized in 21ms (v0.2.102.20180116) (109ms)
+112ms	║╔Execution stage started
+160ms	║║Executed virtual command setAlarmSystemStatus (8ms)
+196ms	║║Executed virtual command setLocationMode (34ms)
+213ms	║║Error executing virtual command [].sendNotificationToContacts: (13ms) java.lang.NullPointerException: Cannot get property 'translatedMessage' on null object
+217ms	║╚Execution stage complete. (104ms)
+218ms	╚Event processed successfully (218ms)
2/15/2018, 7:46:06 AM +969ms
+1ms	╔Received event [2 iPhone (BETA)].presence = not present with a delay of 107ms
+120ms	║Runtime (39791 bytes) successfully initialized in 26ms (v0.2.102.20180116) (118ms)
+121ms	║╔Execution stage started
+152ms	║╚Execution stage complete. (31ms)
+153ms	╚Event processed successfully (152ms)
2/15/2018, 7:44:41 AM +846ms
+0ms	╔Received event [3 iPhone (BETA)].presence = not present with a delay of 113ms
+95ms	║Runtime (39788 bytes) successfully initialized in 16ms (v0.2.102.20180116) (94ms)
+96ms	║╔Execution stage started
+128ms	║╚Execution stage complete. (32ms)
+129ms	╚Event processed successfully (130ms)

It seems this is also affecting my other pistons.

2/15/2018, 7:29:59 AM +104ms
+0ms	╔Received event [Rozzly Home].time = 1518697800000 with a delay of -897ms
+154ms	║Error executing virtual command [All Outside Lights].sendNotificationToContacts: (17ms) java.lang.NullPointerException: Cannot get property 'translatedMessage' on null object
+162ms	║Setting up scheduled job for Thu, Feb 15 2018 @ 6:13:00 PM EST (in 38580.735s), with 1 more job pending
+170ms	╚Event processed successfully (169ms)
2/14/2018, 6:11:59 PM +220ms
+1ms	╔Received event [Rozzly Home].time = 1518649920000 with a delay of -780ms
+220ms	║Error executing virtual command [All Outside Lights].sendNotificationToContacts: (13ms) java.lang.NullPointerException: Cannot get property 'translatedMessage' on null object
+226ms	║Setting up scheduled job for Thu, Feb 15 2018 @ 7:30:00 AM EST (in 47880.555s), with 1 more job pending
+234ms	╚Event processed successfully (234ms)
2/14/2018, 7:30:59 AM +115ms
+0ms	╔Received event [Rozzly Home].time = 1518611460000 with a delay of -886ms
+146ms	║Error executing virtual command [All Outside Lights].sendNotificationToContacts: (17ms) java.lang.NullPointerException: Cannot get property 'translatedMessage' on null object
+151ms	║Setting up scheduled job for Wed, Feb 14 2018 @ 6:12:00 PM EST (in 38460.734s), with 1 more job pending
+158ms	╚Event processed successfully (158ms)
2/13/2018, 6:10:59 PM +279ms
+1ms	╔Received event [Rozzly Home].time = 1518563460000 with a delay of -721ms
+254ms	║Error executing virtual command [All Outside Lights].sendNotificationToContacts: (42ms) java.lang.NullPointerException: Cannot get property 'translatedMessage' on null object
+259ms	║Setting up scheduled job for Wed, Feb 14 2018 @ 7:31:00 AM EST (in 48000.463s), with 1 more job pending
+266ms	╚Event processed successfully (266ms)
2/13/2018, 7:31:59 AM +71ms
+0ms	╔Received event [Rozzly Home].time = 1518525120000 with a delay of -930ms
+139ms	║Setting up scheduled job for Tue, Feb 13 2018 @ 6:11:00 PM EST (in 38340.791s), with 1 more job pending
+147ms	╚Event processed successfully (147ms)
2/12/2018, 6:08:59 PM +189ms
+1ms	╔Received event [Rozzly Home].time = 1518476940000 with a delay of -811ms
+285ms	║Setting up scheduled job for Tue, Feb 13 2018 @ 7:32:00 AM EST (in 48180.526s), with 1 more job pending
+295ms	╚Event processed successfully (295ms)

#2

I have the same issue when it was previously working OK. Looks like it started happening on the 13th.


#3

Same error and issue here, first noticed the lack of notification and the error in the logs yesterday.


#4

Add me to the list. I’m still able to send the same message via notification, just not via SMS. Same error message.


#6

Please report this error message to SmartThings.


#7

I’ll look into it and see if anything changed.


#8

When did this start happening? Any approximate date?


#9

Oh the 13th somewhere between 7am and 6pm. Thanks :slight_smile:


#10

Based on logs, anywhere between 7am and 7pm EST on the 13th.


#11

If it helps at all, here’s a snap of part of the piston and logs that apply to this:

The SMS/notification message and the log debug are the same message. The notification and log debug still work OK. The SMS used to work too.


#12

I noticed this as well with my pistons and also with some native ST SmartApps when it came to notifications (the same error showed up in the Live Logging section of my ST account).

I contacted ST about the issue and they said it was being caused by Notifications to Contacts. The only course of action they gave me was to stop using Contacts as it was unsupported and to send notifications directly to the phone number itself instead.

It’s mostly an easy change in pistons, but it becomes quite tedious if you have a LOT of notifications.


#13

Found the issue internally and reported it to the relevant dev, he is aware of the issue and working to fix it. Thank you for reporting it :slight_smile:


#14

That’s great news, even though SmartThings does not officially support contacts it’s good that they are willing to fix this!


#15

I’ve pushed a non-release fix to webCoRE - please update to latest piston code, it adds a fix to get the SMS working again until ST releases a fix for this. It’s coming, but this piston update can fix it now.

@Rozzly @ryry @bthrock @lflorack


#16

@ady624
Works great! Thanks!


#17

Can confirm, works great!

Additionally, I just got a reply from ST Support this morning:

Hey Robert,

This should now be resolved to receive SMS messages again via WebCore.

Let us know if there continues to be an issue or you have any additional questions - we’re always happy to help!

Cheers,

Jennifer L
SmartThings Support Agent


#18

sendNotificationtoContacts is still failing for me. I had several pistons using it and have changed them to “Send SMS Notification”.
I just checked the one piston I didn’t change, and am still receiving:

** +564ms ║Error executing virtual command [].sendNotificationToContacts: (8ms) java.lang.NullPointerException: Cannot get property ‘translatedMessage’ on null object**

I’m not sure if it matters, but I have been unable to edit devices in the Smartthings IDE for about a week.


#19

Are you on the latest version of webCoRE


#20

Thx. Checking github, webCoRE Piston was obsolete. I’ve updated and will test tomorrow.

Added the next day…It’s working now


#21

SmartThings Technical support also recommended that one remove notifications from their Routines if they are failing like my were and referencing the ST Contact book.

SmartThings Technical Support Response

To answer your question, yes, this is a known issue that just recently popped up with the problem lying in Contact Book no longer being supported. We are looking to fix this issue with automations not running completely (as scheduled), but we, unfortunately, don’t have an ETA yet. I have tagged your account to our problem ticket so as soon as there is an update/resolution you will get notified!

We would recommend (in the meantime) removing notifications from the Routines or getting rid of Contact Book altogether and using the normal built-in notification system.

We can remove Contact Book for you but would need your help in having you remove the contacts from any/all SmartApps/automations first and let us know when that is done. You may run into an error removing the last one, however. we can clear that for you - just let us know!

I did remove the notification from all my routines and will see if this helps get them working again. I did not remove them from WebCore and 25+ other apps that alert me to home automation activities.