Error: Access is denied

I’m getting the error Access is denied when I use the addChildDevice function which I’ve been using the function and now it’s not working. Anyone have any ideas?

Parent Device Handler Code:

addChildDevice(deviceHandlerName, "${deviceId}", null,
      		[completedSetup: true, label: "${deviceName}", 
               	isComponent: false, componentLabel: "${deviceName}"])

Child Device Handler Code:

metadata {
	definition (name: "MySensors Motion Sensor", namespace: "abc", author: "ABC") {
		capability "Motion Sensor"
         capability "Sensor"

	tiles(scale: 2) {
		multiAttributeTile(name:"motion", type: "generic"){
			tileAttribute ("device.motion", key: "PRIMARY_CONTROL") {
				attributeState "active", label:'${name}', icon:"", backgroundColor:"#00A0DC"
				attributeState "inactive", label:'${name}', icon:"st.motion.motion.inactive", backgroundColor:"#ffffff"

After the latest firmware update went out this started working.