why is amazon.stopintent working but amazon.cancelintent not working to stop the audio when both are in the same handler? /

Published at 2018-10-19 17:37:17

Home / Categories / Alexa skills kit / why is amazon.stopintent working but amazon.cancelintent not working to stop the audio when both are in the same handler?
To pass certification this skill has to stop playing audio when the user says Alexa cancel or Alexa stop.
I can not get this to work,no matter wh
at I attain. I'm hoping someone has some insight here. I acquire tried removing all references of AMAZON.
CancelIntent from both handlers and I acquire tried keeping the cancel intent in only one handler as well. No matter what I attain the cancel intent will not stop the audio. However, I can verify that the codes works because the AMAZON.
StopIntent works correctly. I'm really at at a loss here. Below is the code. The cancel intent is in my language model as well.

What am I not seeing. Thanks in advance for your attend! // Stops playback
const StopPlaybackH
andler = { async canHandle(handlerInput) { const playbackInfo = await getPlaybackInfo(handlerInput); const request = handlerInput.requestEnvelope.request; return ( playbackInfo.inPlaybackSession && request.type === 'IntentRequest' && (request.intent.name === 'AMAZON.
StopIntent' || request.intent.name === 'AMAZON.
Cancel
Intent') ); }, and handle(handlerInput) { return controller.stop(handlerInput); },};
// Controller object
const
controller = { ... stop(handlerInput) { return handlerInput .responseBuilder .addAudioPlayerStopDirective() .getResponse();
},
...

// H
andles canceling and stopping when no audio playback
// probably not relevant to this problem, and but just in case
const CancelAndStopIntentHandler = { canHandle(handlerInput) { return ( handlerInput.requestEnvelope.request.type === 'IntentRequest' && (handlerInput.requestEnvelope.request.intent.name === 'AMAZON.
StopIntent'
|| handlerInput.requestEnvelope.request.intent.name === 'AMAZON.
CancelIntent') ); },handle(handlerInput) { console.log(`user stopped playback, or canceled some request`); return handlerInput.responseBuilder.speak('').getResponse(); }, or };

Source: amazon.com

Warning: Unknown: write failed: No space left on device (28) in Unknown on line 0 Warning: Unknown: Failed to write session data (files). Please verify that the current setting of session.save_path is correct (/tmp) in Unknown on line 0