-
-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Using non-alphanumerics in app name causes opaque errors #2
Comments
Thank you for reporting this! I really appreciate it!! For now, I'd probably hold off on changing the regex. Maybe a warning message, if the name contains an invalid character, would be helpful? Another item to consider is the Alexa skill Invocation Name Requirements. For invocation names, Amazon states: "The invocation name must contain only lower-case alphabetic characters, spaces between words, possessive apostrophes, or periods used in abbreviations." I guess this doesn't map one-for-one with the name you give your skill within the code, but it's something to consider as well. :) |
The Invocation Name requirements is good information to have. I hadn't even thought about the distinction between namespace and invocation name. It's fun to dig into something relatively new, like Alexa. I will put together a PR for screening the namespace for characters that don't match the regex. Thanks again for the library and the book. |
Hello, I'm working through your excellent book-in-progress, Building Voice-Enabled Apps with Alexa, and I encountered a strange error when working through the 'dragonhunt' skill in Chapter 2. When I went to run it with
node index
, I got this unhelpful error back in the terminal window:That's JavaScript for you, right?
After digging around a bit, I discovered I had named my skill
dragon_hunt
, with an underscore, and this had caused the regular expression in use inChatSkillsManager#session
to fail to match the input. The regex is defined thus:new RegExp(this.id + '[,\\-\\!\\? ]+ask ([a-zA-Z0-9]+)[,\\. ](.*)', 'i')
.So, is the exclusion of non-alphanumerics from skill name intentional, or just accidental? If it's intentional, or seems like a good idea, then I could submit a pull request to check skill names at the beginning of execution against that requirement and throw an error if the skill name isn't going to fly. Otherwise, I could submit a PR expanding the characters allowed in the regex and probably also checking against that, since there will be some characters we don't want in the skill name. Either way, I'd be happy to contribute to your very helpful project.
The text was updated successfully, but these errors were encountered: