Error while Installing SmartApp in the IDE

I get this weird error when trying to install this very simple app in the IDE. Any pointers? Code is at the bottom which is incomplete.

grails.validation.ValidationException: Validation Error(s) occurred during save():

  • Field error in object ‘physicalgraph.device.Device’ on field ‘name’: rejected value [null]; codes [,,,,,,,,,,,,,,,,,,,nullable]; arguments [name,class physicalgraph.device.Device]; default message [{0} cannot be null]


// Automatically generated. Make future change here.
    name: "Sonos Notifier",
    namespace: "rsarkar",
    author: "Ron Sarkar",
    description: "Notifies door open/close messages",
    category: "My Apps",
    iconUrl: "",
    iconX2Url: "",
    iconX3Url: "")

preferences {
	section("Choose one or more, when..."){
		input "contact", "capability.contactSensor", title: "Contact Opens", required: false, multiple: true
		input "contactClosed", "capability.contactSensor", title: "Contact Closes", required: false, multiple: true

	section("Speak This Text"){
		input "message", "text", title: "Sonos to speak", required: false

	section {
		input "sonos", "capability.musicPlayer", title: "Sonos Device", required: true

def installed() {
	log.debug "Installed with settings: ${settings}"

def updated() {
	log.debug "Updated with settings: ${settings}"

def subscribeToEvents() {
	subscribe(contact, "", eventHandler)
	subscribe(contactClosed, "contact.closed", eventHandler)

def eventHandler(evt) {

private takeAction(evt) {
    def currentStatus = sonos.currentValue("status")
	def currentVolume = sonos.currentState("level")?.integerValue
	def currentTrack = sonos.currentState("trackData").jsonValue