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

Invalid input error #5

Open
CJGlitter opened this issue Oct 18, 2022 · 4 comments
Open

Invalid input error #5

CJGlitter opened this issue Oct 18, 2022 · 4 comments

Comments

@CJGlitter
Copy link

Hi @jackellenberger! Big fan of yours while we were at BT together and I'm still a big fan. I'm trying to sync up my emojis in my fork. I made sure nvm is all ready to go and, barring any corporate security stuff that might be interfering, I think it's good to go.

I ran ./generate.sh "corydavis" "braintree" "[FILTERED]"

And I got an error:

(node:78757) UnhandledPromiseRejectionWarning: Error: Invalid input. Ensure that every given "subdomain" has a matching "token" and "cookie"
    at Object.zipAuthTuples (/Users/corydavis/allmyemojichildren/emojme/lib/util/helpers.js:48:11)
    at download (/Users/corydavis/allmyemojichildren/emojme/emojme-download.js:65:32)
    at downloadCli (/Users/corydavis/allmyemojichildren/emojme/emojme-download.js:95:10)
    at Object.<anonymous> (/Users/corydavis/allmyemojichildren/emojme/emojme-download.js:106:3)
    at Module._compile (internal/modules/cjs/loader.js:778:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
    at Module.load (internal/modules/cjs/loader.js:653:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
    at Function.Module._load (internal/modules/cjs/loader.js:585:3)
    at Function.Module.runMain (internal/modules/cjs/loader.js:831:12)
(node:78757) 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:78757) [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.
cp: emojme/build/braintree/corydavis/*: No such file or directory

Seems like I may be missing a step? Any input is appreciated.

@CJGlitter
Copy link
Author

Should add that I tried it with capitalizing the first letter on my workspace, and I've also changed my Slack name to the concatenated "corydavis", which is also my @ handle in Slack.

@jackellenberger
Copy link
Owner

aha aha yes that is because I neglected to update this project when slack updated their security! Honestly, i have no memory of how this project works. like, why is there a generate.sh and a generate.js. what are the mysterious inputs to generate.sh anyway. i could have written like one line of help text for myself.

anyway i think (and i'm not at a computer where i can test this at all) the issue is here: https://github.com/jackellenberger/allmyemojichildren/blob/master/generate.sh#L15. The subdomain/token pair is no longer enough for slack, they also want a cookie to prove you're you, which is smart but also no fun.

you'll instead want that line to be

    && node emojme.js download --save "$1" --auth-blob "$2"

where $1 is your user name and $2 is a json auth blob you've pulled using the emojme chrome extension(!), or

    && node emojme.js download --save "$1" --subdomain $2 --token $3 --cookie "$4"

If you don't want to install the extension and use the auxiliary instructions for collecting your auth. It's all at https://github.com/jackellenberger/emojme#finding-a-slack-token, emoji science has really taken off, it's a cold war.

Let me know if that works!

@CJGlitter
Copy link
Author

Ahh. I had a feeling that it might be the cookie thing. If I get it up and running, I'll update the README and see if I can get a PR with the changes your way.

@CJGlitter
Copy link
Author

PR-7 coming soon to fix this!

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

2 participants