alexa-js / alexa-app-server

An Alexa app server for alexa-app.
MIT License
401 stars 116 forks source link

The raw request body has already been parsed error message is displaying in alexa-app-server #111

Open rajeevs960 opened 6 years ago

rajeevs960 commented 6 years ago

Hi,

I have set verify as true and debug as false. But i am getting this error "The raw request body has already been parsed" which is in alexa-verifier-middleware. I am sending requests from amazon simulator and also tried from alexa device. Then i just used alexa-app (removed alexa-app-server) where i set checkCert: true . It worked fine. Request coming from amazon is passing verification and request coming from other places getting {"status":"failure","reason":"missing certificate url"} response (Which is as expected). What might be the issue ?

AlexaAppServer.start({
  server_root: __dirname,     // Path to root
  public_html: "public_html", // Static content
  app_dir: "app",            // Location of alexa-app modules
  app_root: "/alexa/",        // Service root
  port: 8080,                // Port to use 
  verify: true,
  debug: false,

// 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("pre")
  },

  postRequest: function(json, req, res) {  
    console.log("post")
  }
});