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.

asynchron response don't work

See original GitHub issue

I try to setup a session with an external api after i got the ok from the API i want to respond. My function createSession Returns an Promise return new Promise( function (resolve, reject) {....

and here i want to wait until createSession is done

return createSession().then(
          function(rs){ // sucess      
              winston.log('info','... Sucessfully launched app');
              res.say('Willkommen bei Alexinator, dem Spiel das deine Gedanken lesen kann');
              winston.log('info', "... Launching successfull");
              return res.send();
          },
          function(error){
            winston.log('error', '... Launching failed!!');
          }
        );

But it doesn’t work my response answer is always empty

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:8

github_iconTop GitHub Comments

1reaction
dblockcommented, May 1, 2017

As I suspected you’re getting alexa-app 2.4.0 and not 4.0, that one doesn’t support promises the same way as the most recent version does. Upgraded, which fixed the problem, https://github.com/ZeroSoulEater/alexinator/pull/2.

0reactions
TimoPurznercommented, May 2, 2017

Thank you very mush!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Java doesn't wait for asynchronous call response
The problem is that the second request has to wait for the response of first request to come back, and is only processed...
Read more >
Server Asynchronous Response Processing - dennis-xlc
Server-side async response processing is only meant for a specific small subset of applications. Asynchronous doesn't necessarily mean automatic scalability ...
Read more >
Asynchronous response in `respond` · Issue #74 - GitHub
I am looking for a way to make respond asynchronous. In some cases I don't have a local file and I want to...
Read more >
Asynchronous programming in C# | Microsoft Learn
Cooking breakfast is a good example of asynchronous work that isn't ... Let's start by updating this code so that the thread doesn't...
Read more >
for await...of - JavaScript - MDN Web Docs
The for await...of statement creates a loop iterating over async iterable objects as well as sync iterables. This statement can only be used ......
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