question

newuser-b52a7f0b-da06-4d23-a92d-57c275231038 avatar image

The error we’re getting is: serviceClientFactory.getMonetizationServiceClient is not a function.

Hello Team!

We have implemented all the ISP code on the Lambda backend but our ISP tests are failing.

We haven't found anyone who has come across the same problem.

The error we’re getting is: serviceClientFactory.getMonetizationServiceClient is not a function.

We’re currently using the standard skill builder included in the “ask-sdk”.

We’re having a really difficult time in figuring out what’s causing the issue.

Please help!

isp
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Anand@Amazon avatar image
Anand@Amazon answered

Hi there,

Please update 'ask-sdk' to latest version i.e. 2.4.0 and use standard function to create skill builder instance if you don't want to mention API client.

Add code something like below:

exports.handler = Alexa.SkillBuilders.standard()
                    .addRequestHandlers(
                       WelcomeIntentHandler,
                       HelpIntentHandler,
                       CancelAndStopIntentHandler,
                       SessionEndedRequestHandler
                      )
                    .lambda();

Check this link for more details.

10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

newuser-b52a7f0b-da06-4d23-a92d-57c275231038 avatar image
newuser-b52a7f0b-da06-4d23-a92d-57c275231038 answered

Cool, we will try that.... thanks heaps!

If anyone else has this problem, I also got this answer from Amazon Developer Support:

Can you update "ask-sdk" library to 2.4.0 version? Please use standard function in your backend code like

exports.handler = Alexa.SkillBuilders.standard()
.addRequestHandlers(

WelcomeIntentHandler,
HelpIntentHandler,
CancelAndStopIntentHandler,
SessionEndedRequestHandler
)
.lambda();

If this too doesn't solve your issue then please share your complete backend code for further support.

10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

newuser-b52a7f0b-da06-4d23-a92d-57c275231038 avatar image
newuser-b52a7f0b-da06-4d23-a92d-57c275231038 answered

Hi Team!

A fresh install of the latest ask-sdk (in this case, version 2.4.0) solved the issue.

10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.