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

Batch Upload - Permission Denied #164

Open
r0ug3 opened this issue Dec 16, 2018 · 10 comments
Open

Batch Upload - Permission Denied #164

r0ug3 opened this issue Dec 16, 2018 · 10 comments

Comments

@r0ug3
Copy link

r0ug3 commented Dec 16, 2018

I copied the batchUploadExample.sh file and edited the top fields. Saved as batchUpload.sh and tried running
./batchUpload.sh
I am getting a permission error but my shell is running as root.

In addition:
Running just one file upload throws an app error after I put in 2FA.
Uh oh! Error: Application Error: unable to find api token on login page

@elloboblanco
Copy link

Same issue here!

@kmcgaire
Copy link

kmcgaire commented Mar 6, 2019

Same!

@DavidWatkins
Copy link

I was able to fix it by manually generating a token at: https://api.slack.com/custom-integrations/legacy-tokens and replacing the line opts.apiToken = match[1]; in lib/slack.js with the token itself and commenting out the http request. I am assuming the lack of a generated auth token is the issue?

@davem-git
Copy link

fix didn't work for me, assuming i replaced the token properly. Did you put it inside the match[]. or put the token after the =? I've tried multiple different ways no luck

@jkogara
Copy link

jkogara commented May 7, 2019

I tried this approach, #164 (comment), but the api is returning {"ok":false,"error":"not_allowed_token_type"}

@mcconkiee
Copy link

I was able to fix it by manually generating a token at: https://api.slack.com/custom-integrations/legacy-tokens and replacing the line opts.apiToken = match[1]; in lib/slack.js with the token itself and commenting out the http request. I am assuming the lack of a generated auth token is the issue?

Just to clarify what @DavidWatkins did (and does work for me), commenting lines 153-158 (or simply remove) and making it read:

//TODO: it may be necessary in the future to replace this with a user-supplied token
// var match = apiTokenRegex.exec(res[0].body);
// if (!match || !match[1]) {
//   throw new Error('Application Error: unable to find api token on login page');
// }

// opts.apiToken = match[1];  
opts.apiToken = "xxx-your-token-here";
return this.opts = opts;

@davem-git
Copy link

So now this doesn't error but it doesn't do anything either

@jungledre
Copy link

jungledre commented Jul 25, 2019

mcconkiee's tip seemed to work for me but I'm not seeing them in the actual application even after three hours.

I found an alternative solution using chrome extensions.

@robhawkins
Copy link

Sometimes the URL filenames do not match the emoji's name. Here is my solution.

In theory someone could make a browser extension that reads a YAML file, downloads the data and then uploads it to slack.

@timsully
Copy link

timsully commented Mar 19, 2020

I am having the same issue @davem-git is having. I modified the lib/slack.js file by adding my test API token using the following steps indicated by @mcconkiee but still a recurring issue. Anyone else coming across this issue?

Starting import
Got tokens
Logged in
Uh oh! Error: Login error: could not get emoji upload crumb for https://thyhomiez.slack.com
(node:12726) UnhandledPromiseRejectionWarning: Error: Login error: could not get emoji upload crumb for https://thyhomiez.slack.com
    at Slack.emoji (/Users/tims/.nvm/versions/node/v10.16.0/lib/node_modules/emojipacks/lib/slack.js:162:34)
    at Slack.emoji.next (<anonymous>)
    at onFulfilled (/Users/tims/.nvm/versions/node/v10.16.0/lib/node_modules/emojipacks/node_modules/co/index.js:65:19)
    at process._tickCallback (internal/process/next_tick.js:68:7)
(node:12726) 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:12726) [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.
packs//fika.yaml

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

10 participants