Skip to content
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

UnhandledPromiseRejectionWarning #100

Closed
tdmalone opened this issue Apr 2, 2017 · 14 comments
Closed

UnhandledPromiseRejectionWarning #100

tdmalone opened this issue Apr 2, 2017 · 14 comments

Comments

@tdmalone
Copy link

tdmalone commented Apr 2, 2017

This is on Windows, tried in two different shells (cmd & mingw64). Also tried both with supplying all the options via command-line, and with interactive responses. Any ideas?

Slack subdomain: xxxxxxxxxxx
Email address login: xxxxxxxxxxx
Password: ****************
Path or URL of Emoji yaml file: ./pokemon_emojipack.yml
Starting import
Got tokens
Logged in
Getting emoji page
Uploading undefined with undefined
(node:14684) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 3): TypeError: Cannot read property 'name' of undefined
(node:14684) DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

After this the execution appears to hang.

@tdmalone
Copy link
Author

tdmalone commented Apr 3, 2017

Hmm.. might have partly been my issue, just realised the YAML file was not formatted correctly, but after fixing that I'm getting a slightly different error:

Got tokens
Logged in
Uh oh! Error: Login error: could not get emoji upload crumb for https://xxxxxxxxxxx.slack.com
(node:10700) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: Login error: could not get emoji upload crumb for https://xxxxxxxxxxx.slack.com
(node:10700) DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

@zachfeldman
Copy link
Contributor

Hey @tdmalone , thanks for reporting. How does your organization sign in (do you use regular login methods)? Do you use 2FA?

@tdmalone
Copy link
Author

tdmalone commented Apr 4, 2017

Hi Zach!

The particular account I was using for this is just username/password (I do use 2FA on my own account but figured that might get in the way of things!)

I actually came back a bit later and tried this again, and it worked then. So perhaps it had reached some sort of rate-limit with my earlier tries...

So in retrospect, there might not actually be a problem - other than some unhandled error situations which left me guessing :)

Thanks for replying and for the excellent work on this - sure makes it easy getting hundreds of emoji in at once!!

@zachfeldman
Copy link
Contributor

Awesome! Yeah it was probably a rate limiting problem. I'm going to close this though because testing a feature to handle this case might get us banned... But if it comes up again maybe someone can post a regex or scanner to let users know! Glad to help.

@dan-kez
Copy link

dan-kez commented Dec 27, 2017

I'm also having the same issue though this occurred on my first attempt:

 ~  emojipacks
Slack subdomain: ***
Email address login: ***
Password: ***
Path or URL of Emoji yaml file: https://raw.githubusercontent.com/Surgo/aws_emojipacks/master/noprefix-emojipacks.yml
Starting import
Got tokens
Logged in
Uh oh! Error: Login error: could not get emoji upload crumb for https://***.slack.com
(node:25050) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: Login error: could not get emoji upload crumb for https://***.slack.com
(node:25050) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate
the Node.js process with a non-zero exit code.

@Santana1053
Copy link

Santana1053 commented Dec 28, 2017

I am also having this issue, running version 0.2.1

Edit: The issue might have something to with having special characters in your password

@uxward
Copy link

uxward commented Jun 8, 2018

I'm also having this issue. Mac OS X, 10.13.6 Beta.

Flynn:emoji brandon$ sh batchemoji.sh emojipacks
./packs/*.yaml
Starting import
Got tokens
Logged in
Getting emoji page
(node:2176) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): TypeError: Cannot convert undefined or null to object
(node:2176) DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

@elliotvilhelm
Copy link

same issue

@ghost
Copy link

ghost commented Sep 29, 2018

Run with -d(ebug) option

Starting import
Got tokens
Logged in
Uh oh! Error: Login error: could not get emoji upload crumb for https://.slack.com
(node:15347) UnhandledPromiseRejectionWarning: Error: Login error: could not get emoji upload crumb for https://
.slack.com
at Slack.emoji (/usr/local/lib/node_modules/emojipacks/lib/slack.js:162:34)
at Slack.emoji.next ()
at onFulfilled (/usr/local/lib/node_modules/emojipacks/node_modules/co/index.js:65:19)
at process._tickCallback (internal/process/next_tick.js:68:7)
(node:15347) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:15347) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

@breadstickguy
Copy link

I am getting the same issue as tsunghao. I've used this on many teams before but it's not working now. I'm an admin in my workspace as well

@ghost
Copy link

ghost commented Oct 17, 2018

@breadstickguy
I am able to use emojipacks after switching to this commit:


commit 3651dd8 (HEAD -> update-selector-for-upload-page-rewrite, jackellenberger/update-selector-for-upload-page-rewrite)
Author: jackellenberger jellenberger@uchicago.edu
Date: Mon Aug 27 00:19:50 2018 -0500

remove excessive debugers

Good Luck!

@UlyssesInvictus
Copy link

@TsungHao 's fix worked great, thank you!

@UlyssesInvictus
Copy link

Actually, check that: I can't confirm that it didn't just work because I stopped trying to use NPM, and installed straight from source (using git+make) instead. This issue (#158) seems to suggest it's just because the NPM distro is very out of date.

@jacketattack
Copy link

@TsungHao thanks! Building from that commit worked for me as well. For other folks, I checked out commit 3651dd8 and then ran make from the root of the project as the README advises. After that I was able to install my emjois without the Login error around emoji upload crumb.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants