marcy-terui / serverless-alexa-skills

Manage your Alexa Skills with Serverless Framework
https://www.npmjs.com/package/serverless-alexa-skills
MIT License
71 stars 13 forks source link

serverless alexa manifests failed #8

Open ynishi opened 6 years ago

ynishi commented 6 years ago

I've done step-by-step guide's "Create your skill" https://serverless.com/blog/how-to-manage-your-alexa-skills-with-serverless/

next step "serverless alexa manifests" failed(other like update/model/build also failed).

Do you have any infomation?

$ serverless alexa manifests                                                                                                         
  Status Code Error --------------------------------------

  404 - "<html> \n<head> \n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" />\n<title>Looking for something?</title>\n</head> \n\n<body style=\"padding: 4em; color: black; background-color: white; font-family: Verdana,Arial,Helvetica,sans-serif;\">\n\n<h2>Looking for Something?</h2>\n<p>\nWe're sorry. The Web address you entered is not a functioning page on our site.\nPlease double-check the URL for typos and other errors. Or go to our <a href=\"/\">home page</a>.\n</p>\n\n<h2>Vous recherchez quelque chose?</h2>\n<p>\nNous sommes désolés. L'adresse Web que vous avez entrée n'est pas fonctionnelle.\nVérifiez bien le lien URL ou allez à notre <a href=\"/\">page d'accueil</a>.\n</p>\n\n</body>\n</html>\n"

     For debugging logs, run again after setting the "SLS_DEBUG=*" environment variable.

  Get Support --------------------------------------------
     Docs:          docs.serverless.com
     Bugs:          github.com/serverless/serverless/issues
     Forums:        forum.serverless.com
     Chat:          gitter.im/serverless/serverless

  Your Environment Information -----------------------------
     OS:                     darwin
     Node Version:           9.4.0
     Serverless Version:     1.26.0
marcy-terui commented 6 years ago

Thank you @ynishi 👍

It seems to be caused by major version up of Alexa Skills Kit API. https://developer.amazon.com/docs/smapi/smapi-migration.html This plugin uses the v0 APIs, but the v0 List API returns the v1 urls in the href attributes 😭

I will fix this problem by migrating to v1 APIs in a few days.

ynishi commented 6 years ago

Very thanks for details!

I'v understood, and will try v0.

I think it is big issue that seamless integrate aws with amazon app developer services!

billy-bacon commented 6 years ago

I too am receiving the same error after following all the steps. I've authenticated successfully but any of the sls alexa ... commands all throw a 404 error and fail.

StatusCodeError: 404 - " \n \n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" />\nLooking for something?\n \n\n<body style=\"padding: 4em; color: black; background-color: white; font-family: Verdana,Arial,Helvetica,sans-serif;\">\n\n

Looking for Something?

\n

\nWe're sorry. The Web address you entered is not a functioning page on our site.\nPlease double-check the URL for typos and other errors. Or go to our <a href=\"/\">home page.\n

\n\n

Vous recherchez quelque chose?

\n

\nNous sommes désolés. L'adresse Web que vous avez entrée n'est pas fonctionnelle.\nVérifiez bien le lien URL ou allez à notre <a href=\"/\">page d'accueil.\n

\n\n\n\n" at new StatusCodeError (/Users/bbacon/dev/clients/dillon/hoopla/hoopla-alexa-skill/node_modules/request-promise-core/lib/errors.js:32:15) at Request.plumbing.callback (/Users/bbacon/dev/clients/dillon/hoopla/hoopla-alexa-skill/node_modules/request-promise-core/lib/plumbing.js:104:33) at Request.RP$callback [as _callback] (/Users/bbacon/dev/clients/dillon/hoopla/hoopla-alexa-skill/node_modules/request-promise-core/lib/plumbing.js:46:31) at Request.self.callback (/Users/bbacon/dev/clients/dillon/hoopla/hoopla-alexa-skill/node_modules/request/request.js:186:22) at Request.emit (events.js:159:13) at Request. (/Users/bbacon/dev/clients/dillon/hoopla/hoopla-alexa-skill/node_modules/request/request.js:1163:10) at Request.emit (events.js:159:13) at IncomingMessage. (/Users/bbacon/dev/clients/dillon/hoopla/hoopla-alexa-skill/node_modules/request/request.js:1085:12) at Object.onceWrapper (events.js:254:19) at IncomingMessage.emit (events.js:164:20) at endReadableNT (_stream_readable.js:1062:12) at process._tickCallback (internal/process/next_tick.js:152:19) From previous event: at PluginManager.invoke (/Users/bbacon/.nvm/versions/node/v9.3.0/lib/node_modules/serverless/lib/classes/PluginManager.js:372:22) at PluginManager.run (/Users/bbacon/.nvm/versions/node/v9.3.0/lib/node_modules/serverless/lib/classes/PluginManager.js:403:17) at variables.populateService.then (/Users/bbacon/.nvm/versions/node/v9.3.0/lib/node_modules/serverless/lib/Serverless.js:102:33) at runCallback (timers.js:773:18) at tryOnImmediate (timers.js:734:5) at processImmediate [as _immediateCallback] (timers.js:711:5) From previous event: at Serverless.run (/Users/bbacon/.nvm/versions/node/v9.3.0/lib/node_modules/serverless/lib/Serverless.js:89:74) at serverless.init.then (/Users/bbacon/.nvm/versions/node/v9.3.0/lib/node_modules/serverless/bin/serverless:42:50) at

Get Support -------------------------------------------- Docs: docs.serverless.com Bugs: github.com/serverless/serverless/issues Forums: forum.serverless.com Chat: gitter.im/serverless/serverless

Your Environment Information ----------------------------- OS: darwin Node Version: 9.3.0 Serverless Version: 1.26.1

Any idea on when this issue will be resolved with this plugin? Thanks in advance!

marcy-terui commented 6 years ago

@ynishi @billy-bacon Sorry for my late reply 😭 I finished migrate to v1 API(#9) and fixed this issue!! Please upgrade to v0.0.6 🆙

billy-bacon commented 6 years ago

@marcy-terui - Thank you for the update. I've upgraded my package.json devDependencies to use v0.0.6 and I'm still receiving the error when I run the following (after successfully authenticating).

sls alexa models --stage dev

bbacon@venus (feature/859855_integrate_serverless_alexa_skills_plugin) ~/dev/clients/dillon/hoopla/hoopla-alexa-skill: sls alexa models --stage dev

  Status Code Error --------------------------------------

  404 - "<html> \n<head> \n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" />\n<title>Looking for something?</title>\n</head> \n\n<body style=\"padding: 4em; color: black; background-color: white; font-family: Verdana,Arial,Helvetica,sans-serif;\">\n\n<h2>Looking for Something?</h2>\n<p>\nWe're sorry. The Web address you entered is not a functioning page on our site.\nPlease double-check the URL for typos and other errors. Or go to our <a href=\"/\">home page</a>.\n</p>\n\n<h2>Vous recherchez quelque chose?</h2>\n<p>\nNous sommes désolés. L'adresse Web que vous avez entrée n'est pas fonctionnelle.\nVérifiez bien le lien URL ou allez à notre <a href=\"/\">page d'accueil</a>.\n</p>\n\n</body>\n</html>\n"

     For debugging logs, run again after setting the "SLS_DEBUG=*" environment variable.

  Get Support --------------------------------------------
     Docs:          docs.serverless.com
     Bugs:          github.com/serverless/serverless/issues
     Forums:        forum.serverless.com
     Chat:          gitter.im/serverless/serverless

  Your Environment Information -----------------------------
     OS:                     darwin
     Node Version:           9.3.0
     Serverless Version:     1.26.1
marcy-terui commented 6 years ago

@billy-bacon Thank you for your reporting. The problem will not happen in my environment ;-( Currently, this plugin only supports the development stage of the skill. Is your skill at the live stage (published publicly/privately)?

billy-bacon commented 6 years ago

@marcy-terui - thank you for re-opening the issue.

Currently we have not published our skill yet, it's still in development phase, but my intent was to use this plugin for updating all of our skills in both a development or public/live stage. We currently have 4 stages/environments.

dev test phase2 prod

^ Those are more specific to our lambda deployments, not so much the amazon alexa skill environment, as I believe there is just a development or live state, is that right?

By the way, what's the -h flag you have in all of the commands on the documentation?

So to your question, the -s, short for --stage dev is specifically for our AWS Lambda deployments.

If this plugin only supports the development state for the alexa skill environment, what's the recommended process for managing a live skill when you deploy a new release or updates?

Thanks @marcy-terui !

marcy-terui commented 6 years ago

@billy-bacon Thanks!

If you have not published it yet (development stage only), I need more information. Please show me the output of the following command:

SLS_DEBUG=* sls alexa models --stage dev

hose are more specific to our lambda deployments, not so much the amazon alexa skill environment, as I believe there is just a development or live state, is that right?

Yes, it is the amazon alexa skill environment and not the stage of Lambda function.

If this plugin only supports the development state for the alexa skill environment, what's the recommended process for managing a live skill when you deploy a new release or updates?

I plan to implement it with the next update #10. But, it has not a feature for publishing yet. I think that it will take some time to cover everything about the development of alexa skills with this plugin.

billy-bacon commented 6 years ago

Sure thing @marcy-terui. Here is the output from the command you requested I run.

bbacon@venus (feature/859855_integrate_serverless_alexa_skills_plugin) ~/dev/clients/dillon/hoopla/hoopla-alexa-skill: SLS_DEBUG=* sls alexa models --stage dev
Serverless: Load command run
Serverless: Load command config
Serverless: Load command config:credentials
Serverless: Load command create
Serverless: Load command install
Serverless: Load command package
Serverless: Load command deploy
Serverless: Load command deploy:function
Serverless: Load command deploy:list
Serverless: Load command deploy:list:functions
Serverless: Load command invoke
Serverless: Load command invoke:local
Serverless: Load command info
Serverless: Load command logs
Serverless: Load command login
Serverless: Load command logout
Serverless: Load command metrics
Serverless: Load command print
Serverless: Load command remove
Serverless: Load command rollback
Serverless: Load command rollback:function
Serverless: Load command slstats
Serverless: Load command plugin
Serverless: Load command plugin
Serverless: Load command plugin:install
Serverless: Load command plugin
Serverless: Load command plugin:uninstall
Serverless: Load command plugin
Serverless: Load command plugin:list
Serverless: Load command plugin
Serverless: Load command plugin:search
Serverless: Load command emit
Serverless: Load command config
Serverless: Load command config:credentials
Serverless: Load command rollback
Serverless: Load command rollback:function
Serverless: Load command alexa
Serverless: Load command alexa:auth
Serverless: Load command alexa:manifests
Serverless: Load command alexa:models
Serverless: Load command alexa:create
Serverless: Load command alexa:delete
Serverless: Load command alexa:update
Serverless: Load command alexa:build
Serverless: Invoke alexa:models

  Status Code Error --------------------------------------

  404 - "<html> \n<head> \n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" />\n<title>Looking for something?</title>\n</head> \n\n<body style=\"padding: 4em; color: black; background-color: white; font-family: Verdana,Arial,Helvetica,sans-serif;\">\n\n<h2>Looking for Something?</h2>\n<p>\nWe're sorry. The Web address you entered is not a functioning page on our site.\nPlease double-check the URL for typos and other errors. Or go to our <a href=\"/\">home page</a>.\n</p>\n\n<h2>Vous recherchez quelque chose?</h2>\n<p>\nNous sommes désolés. L'adresse Web que vous avez entrée n'est pas fonctionnelle.\nVérifiez bien le lien URL ou allez à notre <a href=\"/\">page d'accueil</a>.\n</p>\n\n</body>\n</html>\n"

     For debugging logs, run again after setting the "SLS_DEBUG=*" environment variable.

  Stack Trace --------------------------------------------

StatusCodeError: 404 - "<html> \n<head> \n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" />\n<title>Looking for something?</title>\n</head> \n\n<body style=\"padding: 4em; color: black; background-color: white; font-family: Verdana,Arial,Helvetica,sans-serif;\">\n\n<h2>Looking for Something?</h2>\n<p>\nWe're sorry. The Web address you entered is not a functioning page on our site.\nPlease double-check the URL for typos and other errors. Or go to our <a href=\"/\">home page</a>.\n</p>\n\n<h2>Vous recherchez quelque chose?</h2>\n<p>\nNous sommes désolés. L'adresse Web que vous avez entrée n'est pas fonctionnelle.\nVérifiez bien le lien URL ou allez à notre <a href=\"/\">page d'accueil</a>.\n</p>\n\n</body>\n</html>\n"
    at new StatusCodeError (/Users/bbacon/dev/clients/dillon/hoopla/hoopla-alexa-skill/node_modules/request-promise-core/lib/errors.js:32:15)
    at Request.plumbing.callback (/Users/bbacon/dev/clients/dillon/hoopla/hoopla-alexa-skill/node_modules/request-promise-core/lib/plumbing.js:104:33)
    at Request.RP$callback [as _callback] (/Users/bbacon/dev/clients/dillon/hoopla/hoopla-alexa-skill/node_modules/request-promise-core/lib/plumbing.js:46:31)
    at Request.self.callback (/Users/bbacon/dev/clients/dillon/hoopla/hoopla-alexa-skill/node_modules/request/request.js:186:22)
    at Request.emit (events.js:159:13)
    at Request.<anonymous> (/Users/bbacon/dev/clients/dillon/hoopla/hoopla-alexa-skill/node_modules/request/request.js:1163:10)
    at Request.emit (events.js:159:13)
    at IncomingMessage.<anonymous> (/Users/bbacon/dev/clients/dillon/hoopla/hoopla-alexa-skill/node_modules/request/request.js:1085:12)
    at Object.onceWrapper (events.js:254:19)
    at IncomingMessage.emit (events.js:164:20)
    at endReadableNT (_stream_readable.js:1062:12)
    at process._tickCallback (internal/process/next_tick.js:152:19)
From previous event:
    at PluginManager.invoke (/Users/bbacon/.nvm/versions/node/v9.3.0/lib/node_modules/serverless/lib/classes/PluginManager.js:372:22)
    at PluginManager.run (/Users/bbacon/.nvm/versions/node/v9.3.0/lib/node_modules/serverless/lib/classes/PluginManager.js:403:17)
    at variables.populateService.then (/Users/bbacon/.nvm/versions/node/v9.3.0/lib/node_modules/serverless/lib/Serverless.js:102:33)
    at runCallback (timers.js:773:18)
    at tryOnImmediate (timers.js:734:5)
    at processImmediate [as _immediateCallback] (timers.js:711:5)
From previous event:
    at Serverless.run (/Users/bbacon/.nvm/versions/node/v9.3.0/lib/node_modules/serverless/lib/Serverless.js:89:74)
    at serverless.init.then (/Users/bbacon/.nvm/versions/node/v9.3.0/lib/node_modules/serverless/bin/serverless:42:50)
    at <anonymous>

  Get Support --------------------------------------------
     Docs:          docs.serverless.com
     Bugs:          github.com/serverless/serverless/issues
     Forums:        forum.serverless.com
     Chat:          gitter.im/serverless/serverless

  Your Environment Information -----------------------------
     OS:                     darwin
     Node Version:           9.3.0
     Serverless Version:     1.26.1
billy-bacon commented 6 years ago

@marcy-terui - were you able to find anything useful with the debug information I provided?

marcy-terui commented 6 years ago

@billy-bacon Thank you for your information and sorry my late reply. I found that I didn't notify a big change on the configuration file about migrating to v1 APIs.

The change is as bellow:

Before:

custom:
  alexa:
    vendorId: ${env:YOUR_AMAZON_VENDOR_ID}
    clientId: ${env:YOUR_AMAZON_CLIENT_ID}
    clientSecret: ${env:YOUR_AMAZON_CLIENT_SECRET}
    skills:
      - id: ${env:YOUR_ALEXA_SKILL_ID}
        skillManifest:
          publishingInformation:
            locales:
              en-US:
                name: test2
          apis:
            custom: {}
          manifestVersion: '1.0'
        models:
          en-US:
            interactionModel:
              languageModel:
                invocationName: hello
                intents:
                  - name: AMAZON.CancelIntent
                    samples: []
                  - name: AMAZON.HelpIntent
                    samples: []
                  - name: AMAZON.StopIntent
                    samples: []
                  - name: HelloWorldIntent
                    samples:
                    - hello

After:

custom:
  alexa:
    vendorId: ${env:YOUR_AMAZON_VENDOR_ID}
    clientId: ${env:YOUR_AMAZON_CLIENT_ID}
    clientSecret: ${env:YOUR_AMAZON_CLIENT_SECRET}
    skills:
      - id: ${env:YOUR_ALEXA_SKILL_ID}
        manifest:
          publishingInformation:
            locales:
              en-US:
                name: test2
          apis:
            custom: {}
          manifestVersion: '1.0'
        models:
          en-US:
            interactionModel:
              languageModel:
                invocationName: hello
                intents:
                  - name: AMAZON.CancelIntent
                    samples: []
                  - name: AMAZON.HelpIntent
                    samples: []
                  - name: AMAZON.StopIntent
                    samples: []
                  - name: HelloWorldIntent
                    samples:
                    - hello
billy-bacon commented 6 years ago

@marcy-terui - Thank you for the reply. I changed skillManifest to manifest but the same exceptions are being thrown. Here's my latest output.

`bbacon@venus (feature/859855_integrate_serverless_alexa_skills_plugin ) ~/dev/clients/dillon/hoopla/hoopla-alexa-skill: SLS_DEBUG= sls alexa models --stage dev Serverless: Load command run Serverless: Load command config Serverless: Load command config:credentials Serverless: Load command create Serverless: Load command install Serverless: Load command package Serverless: Load command deploy Serverless: Load command deploy:function Serverless: Load command deploy:list Serverless: Load command deploy:list:functions Serverless: Load command invoke Serverless: Load command invoke:local Serverless: Load command info Serverless: Load command logs Serverless: Load command login Serverless: Load command logout Serverless: Load command metrics Serverless: Load command print Serverless: Load command remove Serverless: Load command rollback Serverless: Load command rollback:function Serverless: Load command slstats Serverless: Load command plugin Serverless: Load command plugin Serverless: Load command plugin:install Serverless: Load command plugin Serverless: Load command plugin:uninstall Serverless: Load command plugin Serverless: Load command plugin:list Serverless: Load command plugin Serverless: Load command plugin:search Serverless: Load command emit Serverless: Load command config Serverless: Load command config:credentials Serverless: Load command rollback Serverless: Load command rollback:function Serverless: Load command alexa Serverless: Load command alexa:auth Serverless: Load command alexa:manifests Serverless: Load command alexa:models Serverless: Load command alexa:create Serverless: Load command alexa:delete Serverless: Load command alexa:update Serverless: Load command alexa:build Serverless: Invoke alexa:models

Status Code Error --------------------------------------

404 - " \n \n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" />\nLooking for something?\n \n\n<body style=\"padding: 4em; color: black; background-color: white; font-family: Verdana,Arial,Helvetica,sans-serif;\">\n\n

Looking for Something?

\n

\nWe're sorry. The Web address you entered is not a functioning page on our site.\nPlease double-check the URL for typos and other errors. Or go to our <a href=\"/\">home page.\n

\n\n

Vous recherchez quelque chose?

\n

\nNous sommes désolés. L'adresse Web que vous avez entrée n'est pas fonctionnelle.\nVérifiez bien le lien URL ou allez à notre <a href=\"/\">page d'accueil.\n

\n\n\n\n"

 For debugging logs, run again after setting the "SLS_DEBUG=*" environment variable.

Stack Trace --------------------------------------------

StatusCodeError: 404 - " \n \n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" />\nLooking for something?\n \n\n<body style=\"padding: 4em; color: black; background-color: white; font-family: Verdana,Arial,Helvetica,sans-serif;\">\n\n

Looking for Something?

\n

\nWe're sorry. The Web address you entered is not a functioning page on our site.\nPlease double-check the URL for typos and other errors. Or go to our <a href=\"/\">home page.\n

\n\n

Vous recherchez quelque chose?

\n

\nNous sommes désolés. L'adresse Web que vous avez entrée n'est pas fonctionnelle.\nVérifiez bien le lien URL ou allez à notre <a href=\"/\">page d'accueil.\n

\n\n\n\n" at new StatusCodeError (/Users/bbacon/dev/clients/dillon/hoopla/hoopla-alexa-skill/node_modules/request-promise-core/lib/errors.js:32:15) at Request.plumbing.callback (/Users/bbacon/dev/clients/dillon/hoopla/hoopla-alexa-skill/node_modules/request-promise-core/lib/plumbing.js:104:33) at Request.RP$callback [as _callback] (/Users/bbacon/dev/clients/dillon/hoopla/hoopla-alexa-skill/node_modules/request-promise-core/lib/plumbing.js:46:31) at Request.self.callback (/Users/bbacon/dev/clients/dillon/hoopla/hoopla-alexa-skill/node_modules/request/request.js:186:22) at Request.emit (events.js:159:13) at Request. (/Users/bbacon/dev/clients/dillon/hoopla/hoopla-alexa-skill/node_modules/request/request.js:1163:10) at Request.emit (events.js:159:13) at IncomingMessage. (/Users/bbacon/dev/clients/dillon/hoopla/hoopla-alexa-skill/node_modules/request/request.js:1085:12) at Object.onceWrapper (events.js:254:19) at IncomingMessage.emit (events.js:164:20) at endReadableNT (_stream_readable.js:1062:12) at process._tickCallback (internal/process/next_tick.js:152:19) From previous event: at PluginManager.invoke (/Users/bbacon/.nvm/versions/node/v9.3.0/lib/node_modules/serverless/lib/classes/PluginManager.js:372:22) at PluginManager.run (/Users/bbacon/.nvm/versions/node/v9.3.0/lib/node_modules/serverless/lib/classes/PluginManager.js:403:17) at variables.populateService.then (/Users/bbacon/.nvm/versions/node/v9.3.0/lib/node_modules/serverless/lib/Serverless.js:102:33) at runCallback (timers.js:773:18) at tryOnImmediate (timers.js:734:5) at processImmediate [as _immediateCallback] (timers.js:711:5) From previous event: at Serverless.run (/Users/bbacon/.nvm/versions/node/v9.3.0/lib/node_modules/serverless/lib/Serverless.js:89:74) at serverless.init.then (/Users/bbacon/.nvm/versions/node/v9.3.0/lib/node_modules/serverless/bin/serverless:42:50) at

Get Support -------------------------------------------- Docs: docs.serverless.com Bugs: github.com/serverless/serverless/issues Forums: forum.serverless.com Chat: gitter.im/serverless/serverless

Your Environment Information ----------------------------- OS: darwin Node Version: 9.3.0 Serverless Version: 1.26.1 `