Migrating: unhandledRejection - Cannot read property 'handle' of undefined


#1

Hi,

I’m new to Jovo and trying to migrate my Alexa Skill. However I’m not able to get it running. When launching the application in the webhook i just get the following error:

unhandledRejection

TypeError: Cannot read property ‘handle’ of undefined
at Webhook.post (U:\amsQuiz\src\index.js:20:19)
at Layer.handle [as handle_request] (U:\amsQuiz\node_modules\express\l
outer\layer.js:95:5)
at next (U:\amsQuiz\node_modules\express\lib\router\route.js:137:13)
at Route.dispatch (U:\amsQuiz\node_modules\express\lib\router\route.js
:3)
at Layer.handle [as handle_request] (U:\amsQuiz\node_modules\express\l
outer\layer.js:95:5)
at U:\amsQuiz\node_modules\express\lib\router\index.js:281:22
at Function.process_params (U:\amsQuiz\node_modules\express\lib\router
ex.js:335:12)
at next (U:\amsQuiz\node_modules\express\lib\router\index.js:275:10)
at U:\amsQuiz\node_modules\body-parser\lib\read.js:130:5
at invokeCallback (U:\amsQuiz\node_modules\raw-body\index.js:224:16)

I followed you guide to get it running however i haven’t tested after i got the model working in jovo. then the error came up

my apps.js looks like this:

‘use strict’;

// ------------------------------------------------------------------
// APP INITIALIZATION
// ------------------------------------------------------------------

const {
App
} = require(‘jovo-framework’);
const {
Alexa
} = require(‘jovo-platform-alexa’);
const {
GoogleAssistant
} = require(‘jovo-platform-googleassistant’);
const {
JovoDebugger
} = require(‘jovo-plugin-debugger’);
const {
FileDb
} = require(‘jovo-db-filedb’);

const app = new App();

app.use(
new Alexa(),
new GoogleAssistant(),
new JovoDebugger(),
new FileDb()
);

// ------------------------------------------------------------------
// Handler
// ------------------------------------------------------------------

app.setHandler({
LAUNCH() {
this.ask(“Hello”);
},
getQuestionIntent() {

},
repeatQuestionIntent() {

},
nextQuestionIntent() {

},
answerIntent() {

},
HELP() {

},
FALLBACK() {

},
END() {

}
});

//module.exports.app = app;

and my config.js like this:

module.exports = {
logging: true,

intentMap: {
   'AMAZON.StopIntent': 'END',
   'AMAZON.CanelIntent': 'END',
   'AMAZON.PauseIntent': 'END',
   'AMAZON.HelpIntent': 'HELP',
   'AMAZON.FallbackIntent': 'FALLBACK'
},

db: {
     FileDb: {
         pathToFile: '../db/db.json',
     }
 },

};

I dont know what I did wrong there becasue I didn’t touch the index.js
The only thing i changed when setting up the projekt was to use the de-DE model


#2

ok nvm. got it working

i set up everything once again - this time using the jovo get cmd
by copy + pasting everything i used here i got the error of using " instead of ’

thats it