Bug: Schedule Methods Cause Fatal Java Error

The Unofficial SmartThings Blog
Jump to: navigation, search

Description of the Issue

Since week of January 18, 2016, scheduling related SmartApp methods (e.g., runIn(), unschedule(), ...) can sometimes result in a serious fatal Java error. This can also prevent attempts by the user to uninstall / remove the SmartApp.

Live Logging shows: "java.lang.reflect.UndeclaredThrowableException".

Detected and reported by the SmartTiles [1] development team.

  • 2016-02-02 1200h PST: Per SmartTiles user, confirmed this error still occurring upon call to unschedule() in our updated() method. SmartTiles has not attempted a try/catch block around this method call yet.


Regions affected: ALL

Phone OS affected: ALL

Users affected: Unknown, but reported by many SmartTiles users and some SmartRules users.

Variable or Always Occurs: variable

Prior/Intended Function

NA


SmartThings official response

2016-01-26: Acknowledged with internal tracking #: CLOUD-745, by Tyler Lange.

Caused by: com.reachlocal.grails.plugins.cassandra.mapping.CassandraMappingNullIndexException: Primary keys and indexed properties cannot have null values


Related Issues

NB: This bug can cause attempts to uninstall / remove the SmartApp to fail, since those actions execute an implied unschedule() to be called.

Workarounds

None.

  • try/catch can be used within SmartApp code to prevent the error from being fatal, but then the scheduling action is not taken.
  • try/catch cannot be used to handle the fatal case of 'implied' unschedule() for uninstall / remove of the SmartApp.

Community Discussions

Community discussions may be found in the following threads: