question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

alexa-verifier set the "verify" flag to true and calling from a non echo throws an error

See original GitHub issue

I used the example code here:

var AlexaAppServer = require("alexa-app-server");
var server = new AlexaAppServer( {
	port:3000
    ,verify: true
    ,public_html: "public"
	// Use preRequest to load user data on each request and add it to the request json.
	// In reality, this data would come from a db or files, etc.
	,preRequest: function(json,req,res) {
		//console.log("preRequest fired");
		//json.userDetails = { "name":"Bob Smith" };
	}
	// Add a dummy attribute to the response
	,postRequest: function(json,req,res) {
		//json.dummy = "text";
	}
} );
server.start();

and added the verify flag so that I can pass the skills certification. When I try to make a request through postman it does fail (which is good) but It’s not throwing a 500, instead it throws the following error:

ReferenceError: er is not defined
    at Object.handle (/my/path/node_modules/alexa-app-server/index.js:97:57)
    at next_layer (/my/path/node_modules/alexa-app-server/node_modules/express/lib/router/route.js:103:13)
    at Route.dispatch (/my/path/node_modules/alexa-app-server/node_modules/express/lib/router/route.js:107:5)
    at /my/path/node_modules/alexa-app-server/node_modules/express/lib/router/index.js:195:24
    at Function.proto.process_params (/my/path/node_modules/alexa-app-server/node_modules/express/lib/router/index.js:251:12)
    at next (/my/path/node_modules/alexa-app-server/node_modules/express/lib/router/index.js:189:19)
    at Layer.handle (/my/path/node_modules/alexa-app-server/index.js:79:15)
    at trim_prefix (/my/path/node_modules/alexa-app-server/node_modules/express/lib/router/index.js:226:17)
    at /my/path/node_modules/alexa-app-server/node_modules/express/lib/router/index.js:198:9
    at Function.proto.process_params (/my/path/node_modules/alexa-app-server/node_modules/express/lib/router/index.js:251:12)
    at next (/my/path/node_modules/alexa-app-server/node_modules/express/lib/router/index.js:189:19)
    at next (/my/path/node_modules/alexa-app-server/node_modules/express/lib/router/index.js:166:38)
    at Layer.staticMiddleware [as handle] (/my/path/node_modules/alexa-app-server/node_modules/serve-static/index.js:55:61)
    at trim_prefix (/my/path/node_modules/alexa-app-server/node_modules/express/lib/router/index.js:226:17)
    at /my/path/node_modules/alexa-app-server/node_modules/express/lib/router/index.js:198:9
    at Function.proto.process_params (/my/path/node_modules/alexa-app-server/node_modules/express/lib/router/index.js:251:12)
    at next (/my/path/node_modules/alexa-app-server/node_modules/express/lib/router/index.js:189:19)
    at IncomingMessage.<anonymous> (/my/path/node_modules/alexa-app-server/index.js:184:5)
    at emitNone (events.js:86:13)
    at IncomingMessage.emit (events.js:185:7)
    at endReadableNT (_stream_readable.js:974:12)
    at _combinedTickCallback (internal/process/next_tick.js:74:11)
    at process._tickCallback (internal/process/next_tick.js:98:9)

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:15 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
dblockcommented, Jan 31, 2017

I’m saying that I don’t know much about it, I didn’t write this code or actually used it myself 😉 Others like @tejashah88 or @mreinstein will know a lot more!

0reactions
dblockcommented, Jan 31, 2017
Read more comments on GitHub >

github_iconTop Results From Across the Web

Error trying to verify phone number
When trying to access the calling / messaging tab in the Alexa app I get the message "An error occurred trying to verify...
Read more >
SyntaxError: Cannot use import statement outside a module
Verify that you have the latest version of Node.js installed (or, ... add "--experimental-modules" flag to the Node.js call.
Read more >
Untitled
Aleva brands are all anchored by a set of core values to ensure the best ... Amazon really wants people to use the...
Read more >
Untitled
Alexa CLI Says everything was packaged with no errors. ... She set out to create a fun package for people of varying age...
Read more >
Untitled
She set out to create a fun package for people of varying age ranges to find food that sparks onder and fun no...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found