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.

manage.authorize promise is not resolved or rejected

See original GitHub issue

I followed the readme except for when I enabled Keychain Sharing Entitlement in Capabilities I got an error icon next to “Add the Keychain Sharing feature to your App ID” and a message under it saying “Failed to create provisioning profile”. Anyway, I was (possibly incorrectly) hoping I could ignore it and see if I could get further into my prototype. I got the rest of the setup done but when my code executes manager.authorize, the resulting promise never gets resolved or rejected. I don’t get any kind of error in the debugging console and I don’t see requests go to Twitter in the network tab.

My code looks like this:

const manager = new OAuthManager('peoplewatch');
    manager.configure(config);
    manager.authorize('twitter')
      .then((response) => {
        console.log(response);
      })
      .catch((err) => {
        console.log(err);
      });

I tried debugging deeper into the authorize code but it got to where it queues up the call to the native code and lost me after that. Could this be a bug or am I missing something? Thanks!

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
Aaroniuscommented, Jan 17, 2017

I was trying with 2.1.11. I just tried 2.1.13 with and without a second argument and the promise is still not resolved or rejected. I’m not sure what to pass as a second argument though. I just passed an empty object.

0reactions
ausercommented, Jan 17, 2017

Closing in favor of #42. You need to make sure you have the app set up properly. I’ll add a checklist on the README to discuss this.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Is it safe to not resolve or reject a promise - Stack Overflow
I want the authorizeOwnership() function to handle 403 (access denied) and 500 (e.g. database query error) responses so that each route doesn't need...
Read more >
Promise.reject() - JavaScript - MDN Web Docs - Mozilla
The Promise.reject() method returns a Promise object that is rejected with a given reason.
Read more >
JavaScript Promise Tutorial – How to Resolve or Reject ...
You can use this handler method to handle errors (rejections) from promises. The syntax of passing null as the first argument to the...
Read more >
Promise Error Handling - JavaScript Tutorial
In this tutorial, you will learn about promise error handling that shows you how to handle error in promises.
Read more >
Functional Node.js: Working with Promises | during the drive
Again, Promise.reject does not exit the promise instantly, ... resolving the promise }) .catch((error) => { //handle error, reject Promise } ...
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