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

Error when clicking 'get my invite' #169

Closed
crobinson42 opened this issue Mar 19, 2016 · 10 comments
Closed

Error when clicking 'get my invite' #169

crobinson42 opened this issue Mar 19, 2016 · 10 comments

Comments

@crobinson42
Copy link
Contributor

starting slackin with:

slackin {my_team_name} xoxp-276xxx505139-xxxxxxxxx-xxxxxxx-4xxx0e3x5 -h localhost -p 3001

When adding an email address and clicking 'get my invite', this message appears in the console:

client.js:22 Uncaught TypeError: Cannot read property 'value' of undefined

Screenshots:
https://www.dropbox.com/s/iq3lwmel0x7etmx/Screenshot%202016-03-18%2023.59.38.png?dl=0
https://www.dropbox.com/s/cjwokeaefkh8nw0/Screenshot%202016-03-18%2023.59.32.png?dl=0
https://www.dropbox.com/s/zmsroho719gwyyl/Screenshot%202016-03-18%2023.59.48.png?dl=0

node v4.4
npm v2.14

jlegrone referenced this issue in Bernie-2016/ground-control Mar 19, 2016
WARNING: the invite form does not currently appear to work
@thepixelmonk
Copy link

same issue here

@timpritlove
Copy link

same here. going back to 0.8.1 brings up a syntax error. can't get login screen to work.

@funkhouserw
Copy link

Encountering this issue as well, used the one-click heroku deploy link in the readme.

Of possible note: the first person to sign-up to this channel via slackin seems to have done so without any issues. All following attempts are resulting in errors.

@thepixelmonk
Copy link

thepixelmonk commented Mar 21, 2016

I'm using slackin on my own server and this change fixes the issue for me, if anyone else needs it in the meantime:

diff --git a/lib/assets/client.js b/lib/assets/client.js
index 542337d..357de1b 100644
--- a/lib/assets/client.js
+++ b/lib/assets/client.js
@@ -5,7 +5,7 @@ var request = superagent;

 // elements
 var form = body.querySelector('form#invite');
-var channel = form.elements['channel'];
+var channel = form.elements['channel'] || {};
 var email = form.elements['email'];
 var coc = form.elements['coc'];
 var button = body.querySelector('button');

@funkhouserw
Copy link

Worked fine for me. Thanks @nbolt !

timpritlove added a commit to timpritlove/slackin that referenced this issue Mar 21, 2016
@timpritlove
Copy link

Yes, the fix works for me too. Should be rolled in to a new release.

@skreutzberger
Copy link

skreutzberger commented May 12, 2016

I have the same issue with Slackin version 0.8.3 even after applying the fix which changes var channel = form.elements['channel'];to var channel = form.elements['channel'] || {}; in the file ~/.npm-global/lib/node_modules/slackin/lib/assets/config.js

When adding an email to the list the following error does still occur:

screenshot 2016-05-12 at 10 04 46

You can test for yourself at http://ec2-54-175-247-25.compute-1.amazonaws.com:3000/

@rauchg
Copy link
Owner

rauchg commented May 12, 2016

PRs welcome!

@skreutzberger
Copy link

Oh and where does Slackin log to? My above mentioned error (undefined value) was not visible in Slackin console output on the server.

@maxnaude
Copy link

@nbolt thanks - that worked for me on 0.8.3

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

7 participants