Skip to content

TypeError: Cannot read property 'host' of null #10

@mannie-exe

Description

@mannie-exe

Back-end randomly crashes soon after starting regardless of whether I actually connect or interact with it at all. Here's the console output and npm-debug.log:

stdout

raevox@MOTHERSHIP:/mnt/d/Development/Pokemon GO/Enhanced-Backend $ npm start

> pokemongo-enhanced@1.0.0 start /mnt/d/Development/Pokemon GO/Enhanced-Backend
> cross-env NODE_ENV=production node ./lib/server.js

[+++] PokemonGo MITM Proxy listening on 8080
[!] Make sure to have the CA cert .http-mitm-proxy/certs/ca.pem installed on your device
/mnt/d/Development/Pokemon GO/Enhanced-Backend/node_modules/http-mitm-proxy/lib/proxy.js:708
    host: hostPort.host,
                  ^

TypeError: Cannot read property 'host' of null
  at Proxy._onHttpServerRequest (/mnt/d/Development/Pokemon GO/Enhanced-Backend/node_modules/http-mitm-proxy/lib/proxy.js:708:19)
  at emitTwo (events.js:106:13)
  at Server.emit (events.js:191:7)
  at HTTPParser.parserOnIncoming [as onIncoming] (_http_server.js:543:12)
  at HTTPParser.parserOnHeadersComplete (_http_common.js:105:23)


npm ERR! Linux 3.4.0+
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "start"
npm ERR! node v6.3.0
npm ERR! npm  v3.10.6
npm ERR! code ELIFECYCLE
npm ERR! pokemongo-enhanced@1.0.0 start: `cross-env NODE_ENV=production node ./lib/server.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the pokemongo-enhanced@1.0.0 start script 'cross-env NODE_ENV=production node ./lib/server.js'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the pokemongo-enhanced package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     cross-env NODE_ENV=production node ./lib/server.js
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs pokemongo-enhanced
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls pokemongo-enhanced
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /mnt/d/Development/Pokemon GO/Enhanced-Backend/npm-debug.log

npm-debug.log:

0 info it worked if it ends with ok
1 verbose cli [ '/usr/bin/nodejs', '/usr/bin/npm', 'start' ]
2 info using npm@3.10.6
3 info using node@v6.3.0
4 verbose run-script [ 'prestart', 'start', 'poststart' ]
5 info lifecycle pokemongo-enhanced@1.0.0~prestart: pokemongo-enhanced@1.0.0
6 silly lifecycle pokemongo-enhanced@1.0.0~prestart: no script for prestart, continuing
7 info lifecycle pokemongo-enhanced@1.0.0~start: pokemongo-enhanced@1.0.0
8 verbose lifecycle pokemongo-enhanced@1.0.0~start: unsafe-perm in lifecycle true
9 verbose lifecycle pokemongo-enhanced@1.0.0~start: PATH: /usr/lib/node_modules/npm/bin/node-gyp-bin:/mnt/d/Development/Pokemon GO/Enhanced-Backend/node_modules/.bin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games:node_modules/.bin
10 verbose lifecycle pokemongo-enhanced@1.0.0~start: CWD: /mnt/d/Development/Pokemon GO/Enhanced-Backend
11 silly lifecycle pokemongo-enhanced@1.0.0~start: Args: [ '-c', 'cross-env NODE_ENV=production node ./lib/server.js' ]
12 silly lifecycle pokemongo-enhanced@1.0.0~start: Returned: code: 1  signal: null
13 info lifecycle pokemongo-enhanced@1.0.0~start: Failed to exec start script
14 verbose stack Error: pokemongo-enhanced@1.0.0 start: `cross-env NODE_ENV=production node ./lib/server.js`
14 verbose stack Exit status 1
14 verbose stack     at EventEmitter.<anonymous> (/usr/lib/node_modules/npm/lib/utils/lifecycle.js:255:16)
14 verbose stack     at emitTwo (events.js:106:13)
14 verbose stack     at EventEmitter.emit (events.js:191:7)
14 verbose stack     at ChildProcess.<anonymous> (/usr/lib/node_modules/npm/lib/utils/spawn.js:40:14)
14 verbose stack     at emitTwo (events.js:106:13)
14 verbose stack     at ChildProcess.emit (events.js:191:7)
14 verbose stack     at maybeClose (internal/child_process.js:852:16)
14 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:215:5)
15 verbose pkgid pokemongo-enhanced@1.0.0
16 verbose cwd /mnt/d/Development/Pokemon GO/Enhanced-Backend
17 error Linux 3.4.0+
18 error argv "/usr/bin/nodejs" "/usr/bin/npm" "start"
19 error node v6.3.0
20 error npm  v3.10.6
21 error code ELIFECYCLE
22 error pokemongo-enhanced@1.0.0 start: `cross-env NODE_ENV=production node ./lib/server.js`
22 error Exit status 1
23 error Failed at the pokemongo-enhanced@1.0.0 start script 'cross-env NODE_ENV=production node ./lib/server.js'.
23 error Make sure you have the latest version of node.js and npm installed.
23 error If you do, this is most likely a problem with the pokemongo-enhanced package,
23 error not with npm itself.
23 error Tell the author that this fails on your system:
23 error     cross-env NODE_ENV=production node ./lib/server.js
23 error You can get information on how to open an issue for this project with:
23 error     npm bugs pokemongo-enhanced
23 error Or if that isn't available, you can get their info via:
23 error     npm owner ls pokemongo-enhanced
23 error There is likely additional logging output above.
24 verbose exit [ 1, true ]

I'm running Windows 10 with WSL, and I get the feeling it's mostly likely an environment-specific issue. However, it's really late and I'm too tired to uninstall MSVS 2015, get an older version, build libprotobuf, and finally confirm whether this is a WSL-specific issue or not. I'll do that tomorrooow...

P.S. There's no real difference between debug/production output.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions