Closed TheFiZi closed 10 years ago
Could this sqlite errors during the tapchat install be related?
> sqlite3@2.1.19 install /home/sa_tapchat/node_modules/tapchat/node_modules/sqlite3
> node build.js
[sqlite3]: Checking for http://node-sqlite3.s3.amazonaws.com/Release/node_sqlite3-v2.1.a-node-v11-linux-x64.tar.gz
[sqlite3]: Downloaded to: /home/sa_tapchat/tmp/node-sqlite3-Release/node_sqlite3-v2.1.a-node-v11-linux-x64.tar.gz
[sqlite3]: Checking for http://node-sqlite3.s3.amazonaws.com/Release/node_sqlite3-v2.1.a-node-v11-linux-x64.sha1.txt
[sqlite3]: Sha1sum matches! 822cc5103a2d6788ff2b6882ea98675a387bd45e
[sqlite3]: Extracting to lib/binding/Release
[sqlite3]: Testing the binary failed: "Command failed:
module.js:356
Module._extensions[extension](this, filename);
^
Error: /lib64/libc.so.6: version `GLIBC_2.14' not found (required by /home/sa_tapchat/node_modules/tapchat/node_modules/sqlite3/lib/binding/Release/node-v11-linux-x64/node_sqlite3.node)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at Object.<anonymous> (/home/sa_tapchat/node_modules/tapchat/node_modules/sqlite3/lib/sqlite3.js:7:15)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Function.Module.runMain (module.js:497:10)
"
[sqlite3]: Attempting source compile...
make: Entering directory `/home/sa_tapchat/node_modules/tapchat/node_modules/sqlite3/build'
ACTION deps_sqlite3_gyp_action_before_build_target_unpack_sqlite_dep Release/obj/gen/sqlite-autoconf-3071700/sqlite3.c
TOUCH Release/obj.target/deps/action_before_build.stamp
CC(target) Release/obj.target/sqlite3/gen/sqlite-autoconf-3071700/sqlite3.o
Release/obj/gen/sqlite-autoconf-3071700/sqlite3.c: In function ‘porter_stemmer’:
Release/obj/gen/sqlite-autoconf-3071700/sqlite3.c:127209: warning: value computed is not used
Release/obj/gen/sqlite-autoconf-3071700/sqlite3.c:127213: warning: value computed is not used
Release/obj/gen/sqlite-autoconf-3071700/sqlite3.c:127226: warning: value computed is not used
Release/obj/gen/sqlite-autoconf-3071700/sqlite3.c:127231: warning: value computed is not used
Release/obj/gen/sqlite-autoconf-3071700/sqlite3.c:127237: warning: value computed is not used
Release/obj/gen/sqlite-autoconf-3071700/sqlite3.c:127242: warning: value computed is not used
Release/obj/gen/sqlite-autoconf-3071700/sqlite3.c:127251: warning: value computed is not used
Release/obj/gen/sqlite-autoconf-3071700/sqlite3.c:127258: warning: value computed is not used
Release/obj/gen/sqlite-autoconf-3071700/sqlite3.c:127301: warning: value computed is not used
Release/obj/gen/sqlite-autoconf-3071700/sqlite3.c:127321: warning: value computed is not used
AR(target) Release/obj.target/deps/sqlite3.a
COPY Release/sqlite3.a
CXX(target) Release/obj.target/node_sqlite3/src/database.o
CXX(target) Release/obj.target/node_sqlite3/src/node_sqlite3.o
CXX(target) Release/obj.target/node_sqlite3/src/statement.o
SOLINK_MODULE(target) Release/obj.target/node_sqlite3.node
SOLINK_MODULE(target) Release/obj.target/node_sqlite3.node: Finished
COPY Release/node_sqlite3.node
make: Leaving directory `/home/sa_tapchat/node_modules/tapchat/node_modules/sqlite3/build'
[sqlite3]: Created: lib/binding/Release/node-v11-linux-x64
[sqlite3]: Installed in lib/binding/Release/node-v11-linux-x64/node_sqlite3.node
[sqlite3]: Sweet: "node_sqlite3.node" is valid, node-sqlite3 is now installed!
The sqlite error does not occur if I run
npm install sqlite3 --build-from-source
which installs sqlite3 2.2.0. If I run npm install tapchat it tries to install sqlite3 2.1.9. If I run
npm install tapchat --build-from-source
The sqlite error goes away but I still get invalid username/password after running tapchat for the first time.
After a friend helped me manually insert a username/hashed password into the sqlite I can now connect with the app and change my password via the webapp
that's great TheFiZi ... but would you mind explaining how to put login/pass manually in sqlite? :)
Generate a password hash the way tapchat expects:
$ node
> var passwordHash = require('password-hash');
undefined
> passwordHash.generate('password123');
'sha1$b99d0a58$1$56876773c42499883a0f0ccaba24cf477efdd0dd'
Insert a new entry in the tapchat database:
$ sqlite3 ~/.tapchat/backlog.db
sqlite> insert into users (name,password,is_admin,push_id,push_key) values ('yourusername', 'sha1$b99d0a58$1$56876773c42499883a0f0ccaba24cf477efdd0dd', 1, '', '');
I am not sure if push_id and push_key can be blank like I have them above. I used values I had in my old copy of ~/.tapchat/config.json.
Yup what @omwah said.
I should also mention I was running node.js 0.10.22 originally when this occurred. I then compiled 0.10.25 and still had the same issue.
I also see this and the exact same workaround works for me. Running Node.js from wheezy-backports. Also see the sqlite3 error during build.
$ node --version v0.10.21 $ tapchat --version 0.0.41 $ uname -a Linux vpn 3.2.0-4-amd64 #1 SMP Debian 3.2.51-1 x86_64 GNU/Linux
Only problem with manually creating the user entry in the database is that without the push_id and push_key values, the tapchat server seems to crash when your nick is mentioned (aka, when it wants to send a push) Otherwise, omwah's suggestion works fine.
In my case, I didn't have my original config.json anymore so I have no idea how to generate the right values for that record.I'm sure the answer is in the tapchat code somewhere but I won't pretend I'm any better at reading code than I am at writing it.
ppl @ irc said you need to purge the .tapchat folder, start it with debug on and it'll be fine .. you can restart with debug off after setting id/key
On Fri, Feb 14, 2014 at 4:38 PM, csdibiase notifications@github.com wrote:
Only problem with manually creating the user entry in the database is that without the push_id and push_key values, the tapchat server seems to crash when your nick is mentioned (aka, when it wants to send a push) Otherwise, omwah's suggestion works fine.
In my case, I didn't have my original config.json anymore so I have no idea how to generate the right values for that record.I'm sure the answer is in the tapchat code somewhere but I won't pretend I'm any better at reading code than I am at writing it.
— Reply to this email directly or view it on GitHubhttps://github.com/codebutler/tapchat/issues/27#issuecomment-35094155 .
Yup, that did the trick.
For those that don't want to figure it out, purge the .tapchat folder then run it the first time with the command: $ nodejs --debug /usr/local/lib/node_modules/tapchat/bin/tapchat start --foreground
It'll prompt to setup but this time successfully build the record in the users table.
Using Windows 7 and Putty to SSH into my server. Did a fresh install of Tapchat and after setting the password I cannot login to Tapchat via the App or the Web Interface. Keeps telling me my username/password are wrong.
CentOS 6.5 64-bit Node v0.10.22
I entered 'fizi' for my password.
Nothing in tapchat.log when I attempt to login.