Problem with lambda function

amazon-alexa

#1

hi guys, I don’t know if is a bug of the framework.
I have an old project in lambda with Jovo 1.0 and it works perfectly, but with these new project ( amazon alexa ) ( jovo 3.0.0 ) doesn’t works on labda, when i try a launch test, appear these error code.
In my local PC it works

“errorType”: “TypeError”,
“errorMessage”: “Cannot read property ‘code’ of null”,
“trace”: [
“TypeError: Cannot read property ‘code’ of null”,
" at Function.printError (/var/task/node_modules/jovo-core/src/errors/JovoError.ts:16:11)",
" at App.handle (/var/task/node_modules/jovo-core/src/core/BaseApp.ts:293:17)",
" at process._tickCallback (internal/process/next_tick.js:68:7)"
]
}

can some guy hel me :smiley: thanks


#2

Hi @Marco_De_Felice, welcome to the Jovo community :wave:

Could you share a bit more information about your setup?

  • What type of project? JS, TS?
  • What were your deployment steps?
  • What are you using to test it?

Thanks,
Jan


#3

Hi thanks for help me.

The project is in JS with node JS 12.00
I deployed the package form the zip created with "jovo deploy --target zip " command
I’m using for test IT the Jovo CLI with ( jovo run ) command


#4

Hi there,

can you provide the code of the handler that causes this error?
To me, it seems like something like throw null or throw undefined is called.


#5

sure is these
app.setHandler({
LAUNCH() {
return this.toIntent(‘AskmeIntent’);
},

async AskmeIntent() {

const res = await getMyIp();
var myIp = JSON.parse(res);

this.$speech.addT('yourip', {ip: myIp.ip });
this.tell(this.$speech);

},
});

is easy, i tried with a simple hello word, and it doesn’t works


#6

so i solved, the problem was my code… the reject on promise :smiley:


#7

Great! Closing this then :slight_smile:


closed #8