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

Cannot GET / #3

Open
bluet opened this issue Oct 10, 2015 · 8 comments
Open

Cannot GET / #3

bluet opened this issue Oct 10, 2015 · 8 comments

Comments

@bluet
Copy link
Contributor

bluet commented Oct 10, 2015

Browsing to https://localhost:6900/ only shows a text 'Cannot GET /', no error msg in console.

@agsh
Copy link
Owner

agsh commented Oct 11, 2015

Sorry, this is a pet project to replace ONVIF Device Manager in web with node.js and onvif,js, not only windows,
And you can find there only authorization form. Just about your question, you should build client with gulp. I have no time to work on this.
If you want to work on this project, I'll gladly add you to developers, or give this project to you.

@bluet
Copy link
Contributor Author

bluet commented Oct 11, 2015

I've read about the project README and that's why I started testing. This is a cool project which might help a lot of people, and shouldn't be stoppped! :-)
I'll see what I can help, but before that I guess I have to run it successfully to figure out the logic, hahaha.

As I'm really not a frontend guy, could you point out some instructions?

@bluet
Copy link
Contributor Author

bluet commented Oct 11, 2015

After installing gulp npm install gulp and run it matthew@0xB1uE7:~/tmp/broviki$ ./node_modules/gulp/bin/gulp.js all, I got error:

matthew@0xB1uE7:~/tmp/broviki$ ./node_modules/gulp/bin/gulp.js all
[00:42:06] Using gulpfile ~/tmp/broviki/gulpfile.js
[00:42:06] Starting 'jade'...
[00:42:06] Finished 'jade' after 7.45 ms
[00:42:06] Starting 'less to css'...
[00:42:06] Finished 'less to css' after 12 ms
[00:42:06] Starting 'browserify js'...
[00:42:06] Finished 'browserify js' after 5.98 ms
[00:42:06] Starting 'index'...
[00:42:06] Finished 'index' after 609 μs
[00:42:06] Starting 'all'...
[00:42:06] Finished 'all' after 5.44 μs

_stream_readable.js:583
var written = dest.write(chunk);
^
TypeError: Object # has no method 'write'
at write (_stream_readable.js:583:24)
at flow (_stream_readable.js:592:7)
at _stream_readable.js:560:7
at process._tickCallback (node.js:415:13)
matthew@0xB1uE7:~/tmp/broviki$ node -v
v0.10.22

@agsh
Copy link
Owner

agsh commented Oct 13, 2015

Thanks for feedback! The reason of this error is new behaviour of gulp-browserify plugin. I've fixed this in repo. Also added npm run build command to package.json to build client

@bluet
Copy link
Contributor Author

bluet commented Oct 15, 2015

matthew@0xB1uE7:~/workspace/broviki$ ./node_modules/gulp/bin/gulp.js all

Error: Cannot find module 'vinyl-source-stream'
at Function.Module._resolveFilename (module.js:338:15)
at Function.Module._load (module.js:280:25)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at Object. (/home/matthew/workspace/broviki/gulpfile.js:12:13)
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 Module.require (module.js:364:17)

After installing npm install vinyl-source-stream it builds.

@bluet
Copy link
Contributor Author

bluet commented Oct 15, 2015

#4

@bluet
Copy link
Contributor Author

bluet commented Oct 15, 2015

server/app.js runs now with
'started at port 6900'

I can see the port opened via sudo netstat -ntupl|grep 6900
'tcp 0 0 0.0.0.0:6900 0.0.0.0:* LISTEN 29785/node'

But open http://127.0.0.1:6900 will stay in 'connected' state and it never return anything.
Same when using telnet to test:
matthew@0xB1uE7:~/workspace/broviki$ telnet localhost 6900
Trying ::1...
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
GET / HTTP/1.0

^C^]

telnet> quit
Connection closed.

@bluet
Copy link
Contributor Author

bluet commented Oct 15, 2015

runing npm run test shows lots of error:

matthew@0xB1uE7:~/workspace/broviki$ npm run test

[email protected] test /home/matthew/workspace/broviki
./node_modules/.bin/mocha

Users module
Simple test
✓ should return test response (79ms)
New user creation
✓ should not create a new user if fields is missing (48ms)
ReferenceError: Promise is not defined
at Datastore.insert (/home/matthew/workspace/broviki/server/js/db.js:45:14)
at Object.database.users.add (/home/matthew/workspace/broviki/server/js/db.js:128:4)
at signup (/home/matthew/workspace/broviki/server/js/users.js:43:18)
at Layer.handle as handle_request
at next (/home/matthew/workspace/broviki/node_modules/express/lib/router/route.js:131:13)
at Route.dispatch (/home/matthew/workspace/broviki/node_modules/express/lib/router/route.js:112:3)
at Layer.handle as handle_request
at /home/matthew/workspace/broviki/node_modules/express/lib/router/index.js:277:22
at Function.process_params (/home/matthew/workspace/broviki/node_modules/express/lib/router/index.js:330:12)
at next (/home/matthew/workspace/broviki/node_modules/express/lib/router/index.js:271:10)
at /home/matthew/workspace/broviki/node_modules/body-parser/lib/read.js:129:5
at invokeCallback (/home/matthew/workspace/broviki/node_modules/body-parser/node_modules/raw-body/index.js:262:16)
at done (/home/matthew/workspace/broviki/node_modules/body-parser/node_modules/raw-body/index.js:251:7)
at IncomingMessage.onEnd (/home/matthew/workspace/broviki/node_modules/body-parser/node_modules/raw-body/index.js:308:7)
at IncomingMessage.EventEmitter.emit (events.js:92:17)
at _stream_readable.js:920:16
at process._tickCallback (node.js:415:13)
1) should create a new user
ReferenceError: Promise is not defined
at Datastore.insert (/home/matthew/workspace/broviki/server/js/db.js:45:14)
at Object.database.users.add (/home/matthew/workspace/broviki/server/js/db.js:128:4)
at signup (/home/matthew/workspace/broviki/server/js/users.js:43:18)
at Layer.handle as handle_request
at next (/home/matthew/workspace/broviki/node_modules/express/lib/router/route.js:131:13)
at Route.dispatch (/home/matthew/workspace/broviki/node_modules/express/lib/router/route.js:112:3)
at Layer.handle as handle_request
at /home/matthew/workspace/broviki/node_modules/express/lib/router/index.js:277:22
at Function.process_params (/home/matthew/workspace/broviki/node_modules/express/lib/router/index.js:330:12)
at next (/home/matthew/workspace/broviki/node_modules/express/lib/router/index.js:271:10)
at /home/matthew/workspace/broviki/node_modules/body-parser/lib/read.js:129:5
at invokeCallback (/home/matthew/workspace/broviki/node_modules/body-parser/node_modules/raw-body/index.js:262:16)
at done (/home/matthew/workspace/broviki/node_modules/body-parser/node_modules/raw-body/index.js:251:7)
at IncomingMessage.onEnd (/home/matthew/workspace/broviki/node_modules/body-parser/node_modules/raw-body/index.js:308:7)
at IncomingMessage.EventEmitter.emit (events.js:92:17)
at _stream_readable.js:920:16
at process._tickCallback (node.js:415:13)
2) should create existing user
Login
ReferenceError: Promise is not defined
at promisifyDb (/home/matthew/workspace/broviki/server/js/db.js:60:13)
at Object.database.users.getUser (/home/matthew/workspace/broviki/server/js/db.js:115:9)
at login (/home/matthew/workspace/broviki/server/js/users.js:26:17)
at Layer.handle as handle_request
at next (/home/matthew/workspace/broviki/node_modules/express/lib/router/route.js:131:13)
at Route.dispatch (/home/matthew/workspace/broviki/node_modules/express/lib/router/route.js:112:3)
at Layer.handle as handle_request
at /home/matthew/workspace/broviki/node_modules/express/lib/router/index.js:277:22
at Function.process_params (/home/matthew/workspace/broviki/node_modules/express/lib/router/index.js:330:12)
at next (/home/matthew/workspace/broviki/node_modules/express/lib/router/index.js:271:10)
at /home/matthew/workspace/broviki/node_modules/body-parser/lib/read.js:129:5
at invokeCallback (/home/matthew/workspace/broviki/node_modules/body-parser/node_modules/raw-body/index.js:262:16)
at done (/home/matthew/workspace/broviki/node_modules/body-parser/node_modules/raw-body/index.js:251:7)
at IncomingMessage.onEnd (/home/matthew/workspace/broviki/node_modules/body-parser/node_modules/raw-body/index.js:308:7)
at IncomingMessage.EventEmitter.emit (events.js:92:17)
at _stream_readable.js:920:16
at process._tickCallback (node.js:415:13)
3) should fail with unexisting user
ReferenceError: Promise is not defined
at promisifyDb (/home/matthew/workspace/broviki/server/js/db.js:60:13)
at Object.database.users.getUser (/home/matthew/workspace/broviki/server/js/db.js:115:9)
at login (/home/matthew/workspace/broviki/server/js/users.js:26:17)
at Layer.handle as handle_request
at next (/home/matthew/workspace/broviki/node_modules/express/lib/router/route.js:131:13)
at Route.dispatch (/home/matthew/workspace/broviki/node_modules/express/lib/router/route.js:112:3)
at Layer.handle as handle_request
at /home/matthew/workspace/broviki/node_modules/express/lib/router/index.js:277:22
at Function.process_params (/home/matthew/workspace/broviki/node_modules/express/lib/router/index.js:330:12)
at next (/home/matthew/workspace/broviki/node_modules/express/lib/router/index.js:271:10)
at /home/matthew/workspace/broviki/node_modules/body-parser/lib/read.js:129:5
at invokeCallback (/home/matthew/workspace/broviki/node_modules/body-parser/node_modules/raw-body/index.js:262:16)
at done (/home/matthew/workspace/broviki/node_modules/body-parser/node_modules/raw-body/index.js:251:7)
at IncomingMessage.onEnd (/home/matthew/workspace/broviki/node_modules/body-parser/node_modules/raw-body/index.js:308:7)
at IncomingMessage.EventEmitter.emit (events.js:92:17)
at _stream_readable.js:920:16
at process._tickCallback (node.js:415:13)
4) should fail with wrong credentials
ReferenceError: Promise is not defined
at promisifyDb (/home/matthew/workspace/broviki/server/js/db.js:60:13)
at Object.database.users.getUser (/home/matthew/workspace/broviki/server/js/db.js:115:9)
at login (/home/matthew/workspace/broviki/server/js/users.js:26:17)
at Layer.handle as handle_request
at next (/home/matthew/workspace/broviki/node_modules/express/lib/router/route.js:131:13)
at Route.dispatch (/home/matthew/workspace/broviki/node_modules/express/lib/router/route.js:112:3)
at Layer.handle as handle_request
at /home/matthew/workspace/broviki/node_modules/express/lib/router/index.js:277:22
at Function.process_params (/home/matthew/workspace/broviki/node_modules/express/lib/router/index.js:330:12)
at next (/home/matthew/workspace/broviki/node_modules/express/lib/router/index.js:271:10)
at /home/matthew/workspace/broviki/node_modules/body-parser/lib/read.js:129:5
at invokeCallback (/home/matthew/workspace/broviki/node_modules/body-parser/node_modules/raw-body/index.js:262:16)
at done (/home/matthew/workspace/broviki/node_modules/body-parser/node_modules/raw-body/index.js:251:7)
at IncomingMessage.onEnd (/home/matthew/workspace/broviki/node_modules/body-parser/node_modules/raw-body/index.js:308:7)
at IncomingMessage.EventEmitter.emit (events.js:92:17)
at _stream_readable.js:920:16
at process._tickCallback (node.js:415:13)
5) should login with proper credentials
Remove user
ReferenceError: Promise is not defined
at Datastore.remove (/home/matthew/workspace/broviki/server/js/db.js:45:14)
at Object.database.users.remove (/home/matthew/workspace/broviki/server/js/db.js:142:18)
at remove (/home/matthew/workspace/broviki/server/js/users.js:55:17)
at Layer.handle as handle_request
at next (/home/matthew/workspace/broviki/node_modules/express/lib/router/route.js:131:13)
at Route.dispatch (/home/matthew/workspace/broviki/node_modules/express/lib/router/route.js:112:3)
at Layer.handle as handle_request
at /home/matthew/workspace/broviki/node_modules/express/lib/router/index.js:277:22
at Function.process_params (/home/matthew/workspace/broviki/node_modules/express/lib/router/index.js:330:12)
at next (/home/matthew/workspace/broviki/node_modules/express/lib/router/index.js:271:10)
at /home/matthew/workspace/broviki/node_modules/body-parser/lib/read.js:129:5
at invokeCallback (/home/matthew/workspace/broviki/node_modules/body-parser/node_modules/raw-body/index.js:262:16)
at done (/home/matthew/workspace/broviki/node_modules/body-parser/node_modules/raw-body/index.js:251:7)
at IncomingMessage.onEnd (/home/matthew/workspace/broviki/node_modules/body-parser/node_modules/raw-body/index.js:308:7)
at IncomingMessage.EventEmitter.emit (events.js:92:17)
at _stream_readable.js:920:16
at process._tickCallback (node.js:415:13)
6) should remove user from database

2 passing (644ms)
6 failing

  1. Users module New user creation should create a new user:
  Uncaught AssertionError: false == true
  + expected - actual

  -false
  +true

  at Request._callback (test/users.js:46:12)
  at Request.self.callback (node_modules/request/request.js:198:22)
  at Request.<anonymous> (node_modules/request/request.js:1082:10)
  at IncomingMessage.<anonymous> (node_modules/request/request.js:1009:12)
  at _stream_readable.js:920:16
  1. Users module New user creation should create existing user:
  Uncaught AssertionError: false == true
  + expected - actual

  -false
  +true

  at Request._callback (test/users.js:60:12)
  at Request.self.callback (node_modules/request/request.js:198:22)
  at Request.<anonymous> (node_modules/request/request.js:1082:10)
  at IncomingMessage.<anonymous> (node_modules/request/request.js:1009:12)
  at _stream_readable.js:920:16
  1. Users module Login should fail with unexisting user:
  Uncaught AssertionError: false == true
  + expected - actual

  -false
  +true

  at Request._callback (test/users.js:76:12)
  at Request.self.callback (node_modules/request/request.js:198:22)
  at Request.<anonymous> (node_modules/request/request.js:1082:10)
  at IncomingMessage.<anonymous> (node_modules/request/request.js:1009:12)
  at _stream_readable.js:920:16
  1. Users module Login should fail with wrong credentials:
  Uncaught AssertionError: false == true
  + expected - actual

  -false
  +true

  at Request._callback (test/users.js:89:12)
  at Request.self.callback (node_modules/request/request.js:198:22)
  at Request.<anonymous> (node_modules/request/request.js:1082:10)
  at IncomingMessage.<anonymous> (node_modules/request/request.js:1009:12)
  at _stream_readable.js:920:16
  1. Users module Login should login with proper credentials:
  Uncaught AssertionError: false == true
  + expected - actual

  -false
  +true

  at Request._callback (test/users.js:102:12)
  at Request.self.callback (node_modules/request/request.js:198:22)
  at Request.<anonymous> (node_modules/request/request.js:1082:10)
  at IncomingMessage.<anonymous> (node_modules/request/request.js:1009:12)
  at _stream_readable.js:920:16
  1. Users module Remove user should remove user from database:
  Uncaught AssertionError: false == true
  + expected - actual

  -false
  +true

  at Request._callback (test/users.js:117:12)
  at Request.self.callback (node_modules/request/request.js:198:22)
  at Request.<anonymous> (node_modules/request/request.js:1082:10)
  at IncomingMessage.<anonymous> (node_modules/request/request.js:1009:12)
  at _stream_readable.js:920:16

npm ERR! [email protected] test: ./node_modules/.bin/mocha
npm ERR! Exit status 6
npm ERR!
npm ERR! Failed at the [email protected] test script.
npm ERR! This is most likely a problem with the Broviki package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! ./node_modules/.bin/mocha
npm ERR! You can get their info via:
npm ERR! npm owner ls Broviki
npm ERR! There is likely additional logging output above.
npm ERR! System Linux 3.19.0-30-generic
npm ERR! command "/usr/local/bin/node" "/usr/local/bin/npm" "run" "test"
npm ERR! cwd /home/matthew/workspace/broviki
npm ERR! node -v v0.10.22
npm ERR! npm -v 1.3.14
npm ERR! code ELIFECYCLE
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /home/matthew/workspace/broviki/npm-debug.log
npm ERR! not ok code 0

agsh pushed a commit that referenced this issue Oct 9, 2022
…879ca

[Snyk] Security upgrade react-scripts from 3.4.3 to 4.0.0
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