yakyak / hangupsjs

google hangouts client library for nodejs
226 stars 46 forks source link

launching yakyak fails with connect_failed TypeError: Cannot read property 'length' of null #106

Closed cmurf closed 5 years ago

cmurf commented 5 years ago

This is happening on Fedora 29, with both yakyak git ec04e5e and e461b79. Yesterday, 0c04e5e was working fine, but it's broken this morning; updating to e461b79 and cleaning things up and running clean (see below) doesn't help, I still get the same errors.

nodejs-10.12.0-1.fc29.x86_64 npm-6.4.1-1.10.12.0.1.fc29.x86_64

[chris@flap yakyak]$ git pull
remote: Enumerating objects: 21, done.
remote: Counting objects: 100% (21/21), done.
remote: Compressing objects: 100% (12/12), done.
remote: Total 21 (delta 11), reused 15 (delta 9), pack-reused 0
Unpacking objects: 100% (21/21), done.
From https://github.com/yakyak/yakyak
   ec04e5e..e461b79  master     -> origin/master
 * [new tag]         v1.5.3-beta-rolling -> v1.5.3-beta-rolling
Updating ec04e5e..e461b79
error: Your local changes to the following files would be overwritten by merge:
    package-lock.json
Please commit your changes or stash them before you merge.
Aborting
[chris@flap yakyak]$ git clean -fxd
Removing app/
Removing node_modules/
[chris@flap yakyak]$ git reset --hard origin/master
HEAD is now at e461b79 Merge pull request #992 from ztoben/master
[chris@flap yakyak]$ npm install

> typechecker@2.0.8 preinstall /home/chris/Applications/yakyak/node_modules/extendr/node_modules/typechecker
> node ./cyclic.js

> typechecker@2.0.8 preinstall /home/chris/Applications/yakyak/node_modules/extract-opts/node_modules/typechecker
> node ./cyclic.js

> electron@3.0.6 postinstall /home/chris/Applications/yakyak/node_modules/electron
> node install.js

Downloading tmp-3193-1-SHASUMS256.txt-3.0.6
[============================================>] 100.0% of 4.74 kB (4.74 kB/s)

> hangupsjs@1.3.7 postinstall /home/chris/Applications/yakyak/node_modules/hangupsjs
> npm run prepublish

> hangupsjs@1.3.7 prepublish /home/chris/Applications/yakyak/node_modules/hangupsjs
> coffee -o lib src

npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.4 (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.4: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

added 855 packages from 1518 contributors and audited 7457 packages in 16.705s
found 1 low severity vulnerability
  run `npm audit fix` to fix them, or `npm audit` for details
[chris@flap yakyak]$ npm run gulp

> yakyak@1.5.2 gulp /home/chris/Applications/yakyak
> gulp

[12:36:55] Failed to load external module coffeescript/register
[12:36:55] Requiring external module coffee-script/register
[12:36:56] Using gulpfile ~/Applications/yakyak/gulpfile.coffee
[12:36:56] Starting 'default'...
[12:36:56] Starting 'package'...
[12:36:56] Starting 'coffee'...
[12:36:56] Starting 'html'...
[12:36:56] Starting 'images'...
[12:36:56] Starting 'media'...
[12:36:56] Starting 'locales'...
[12:36:56] Starting 'icons'...
[12:36:56] Starting 'less'...
[12:36:56] Starting 'fontello'...
[12:36:56] Finished 'icons' after 73 ms
[12:36:57] Finished 'media' after 481 ms
[12:36:57] Finished 'images' after 614 ms
[12:36:57] Finished 'html' after 779 ms
[12:36:57] Finished 'less' after 784 ms
[12:36:58] Finished 'locales' after 1.8 sl pacote range manifest for gulp-install@^1.1.0 fetched in
npm WARN deprecated gulp-util@3.0.8: gulp-util is deprecated - replace it, following the guidelines at https://medium.com/gulpjs/gulp-util-ca3b1f9f9ac5
npm WARN deprecated coffee-script@1.12.7: CoffeeScript on NPM has moved to "coffeescript" (no hyphen)
[12:36:59] Finished 'coffee' after 2.38 sl pacote range manifest for electron-download@^4.1.0 fetch
[12:36:59] Finished 'fontello' after 2.54 spacote range manifest for sanitize-filename@^1.6.0 fetch
npm WARN deprecated text-encoding@0.6.4: no longer maintained

> typechecker@2.0.8 preinstall /home/chris/Applications/yakyak/app/node_modules/extendr/node_modules/typechecker
> node ./cyclic.js

> typechecker@2.0.8 preinstall /home/chris/Applications/yakyak/app/node_modules/extract-opts/node_modules/typechecker
> node ./cyclic.js

> hangupsjs@1.3.7 postinstall /home/chris/Applications/yakyak/app/node_modules/hangupsjs
> npm run prepublish

> hangupsjs@1.3.7 prepublish /home/chris/Applications/yakyak/app/node_modules/hangupsjs
> coffee -o lib src

npm notice created a lockfile as package-lock.json. You should commit this file.
added 209 packages from 164 contributors and audited 7457 packages in 10.527s
found 1 low severity vulnerability
  run `npm audit fix` to fix them, or `npm audit` for details
[12:37:08] Finished 'package' after 12 s
[12:37:08] Finished 'default' after 12 s
[chris@flap yakyak]$ npm run electron app

> yakyak@1.5.2 electron /home/chris/Applications/yakyak
> electron "app"

hconnect
reconnecting 0
resolving proxy http://plus.google.com
resolving proxy https://plus.google.com
resolved proxy DIRECT
resolved proxy DIRECT
connect_failed TypeError: Cannot read property 'length' of null
    at /home/chris/Applications/yakyak/app/node_modules/hangupsjs/lib/init.js:125:21
    at _fulfilled (/home/chris/Applications/yakyak/app/node_modules/q/q.js:854:54)
    at /home/chris/Applications/yakyak/app/node_modules/q/q.js:883:30
    at Promise.promise.promiseDispatch (/home/chris/Applications/yakyak/app/node_modules/q/q.js:816:13)
    at /home/chris/Applications/yakyak/app/node_modules/q/q.js:570:49
    at runSingle (/home/chris/Applications/yakyak/app/node_modules/q/q.js:137:13)
    at flush (/home/chris/Applications/yakyak/app/node_modules/q/q.js:125:13)
    at process._tickCallback (internal/process/next_tick.js:61:11)
error connecting TypeError: Cannot read property 'length' of null
    at /home/chris/Applications/yakyak/app/node_modules/hangupsjs/lib/init.js:125:21
    at _fulfilled (/home/chris/Applications/yakyak/app/node_modules/q/q.js:854:54)
    at /home/chris/Applications/yakyak/app/node_modules/q/q.js:883:30
    at Promise.promise.promiseDispatch (/home/chris/Applications/yakyak/app/node_modules/q/q.js:816:13)
    at /home/chris/Applications/yakyak/app/node_modules/q/q.js:570:49
    at runSingle (/home/chris/Applications/yakyak/app/node_modules/q/q.js:137:13)
    at flush (/home/chris/Applications/yakyak/app/node_modules/q/q.js:125:13)
    at process._tickCallback (internal/process/next_tick.js:61:11)
reconnecting 0
resolving proxy http://plus.google.com
resolving proxy https://plus.google.com
resolved proxy DIRECT
resolved proxy DIRECT
connect_failed TypeError: Cannot read property 'length' of null
    at /home/chris/Applications/yakyak/app/node_modules/hangupsjs/lib/init.js:125:21
    at _fulfilled (/home/chris/Applications/yakyak/app/node_modules/q/q.js:854:54)
    at /home/chris/Applications/yakyak/app/node_modules/q/q.js:883:30
    at Promise.promise.promiseDispatch (/home/chris/Applications/yakyak/app/node_modules/q/q.js:816:13)
    at /home/chris/Applications/yakyak/app/node_modules/q/q.js:570:49
    at runSingle (/home/chris/Applications/yakyak/app/node_modules/q/q.js:137:13)
    at flush (/home/chris/Applications/yakyak/app/node_modules/q/q.js:125:13)
    at process._tickCallback (internal/process/next_tick.js:61:11)
error connecting TypeError: Cannot read property 'length' of null
    at /home/chris/Applications/yakyak/app/node_modules/hangupsjs/lib/init.js:125:21
    at _fulfilled (/home/chris/Applications/yakyak/app/node_modules/q/q.js:854:54)
    at /home/chris/Applications/yakyak/app/node_modules/q/q.js:883:30
    at Promise.promise.promiseDispatch (/home/chris/Applications/yakyak/app/node_modules/q/q.js:816:13)
    at /home/chris/Applications/yakyak/app/node_modules/q/q.js:570:49
    at runSingle (/home/chris/Applications/yakyak/app/node_modules/q/q.js:137:13)
    at flush (/home/chris/Applications/yakyak/app/node_modules/q/q.js:125:13)
    at process._tickCallback (internal/process/next_tick.js:61:11)
reconnecting 0
resolving proxy http://plus.google.com
resolving proxy https://plus.google.com
resolved proxy DIRECT
resolved proxy DIRECT
connect_failed TypeError: Cannot read property 'length' of null
    at /home/chris/Applications/yakyak/app/node_modules/hangupsjs/lib/init.js:125:21
    at _fulfilled (/home/chris/Applications/yakyak/app/node_modules/q/q.js:854:54)
    at /home/chris/Applications/yakyak/app/node_modules/q/q.js:883:30
    at Promise.promise.promiseDispatch (/home/chris/Applications/yakyak/app/node_modules/q/q.js:816:13)
    at /home/chris/Applications/yakyak/app/node_modules/q/q.js:570:49
    at runSingle (/home/chris/Applications/yakyak/app/node_modules/q/q.js:137:13)
    at flush (/home/chris/Applications/yakyak/app/node_modules/q/q.js:125:13)
    at process._tickCallback (internal/process/next_tick.js:61:11)
error connecting TypeError: Cannot read property 'length' of null
    at /home/chris/Applications/yakyak/app/node_modules/hangupsjs/lib/init.js:125:21
    at _fulfilled (/home/chris/Applications/yakyak/app/node_modules/q/q.js:854:54)
    at /home/chris/Applications/yakyak/app/node_modules/q/q.js:883:30
    at Promise.promise.promiseDispatch (/home/chris/Applications/yakyak/app/node_modules/q/q.js:816:13)
    at /home/chris/Applications/yakyak/app/node_modules/q/q.js:570:49
    at runSingle (/home/chris/Applications/yakyak/app/node_modules/q/q.js:137:13)
    at flush (/home/chris/Applications/yakyak/app/node_modules/q/q.js:125:13)
    at process._tickCallback (internal/process/next_tick.js:61:11)
reconnecting 0
resolving proxy http://plus.google.com
resolving proxy https://plus.google.com
resolved proxy DIRECT
resolved proxy DIRECT
connect_failed TypeError: Cannot read property 'length' of null
    at /home/chris/Applications/yakyak/app/node_modules/hangupsjs/lib/init.js:125:21
    at _fulfilled (/home/chris/Applications/yakyak/app/node_modules/q/q.js:854:54)
    at /home/chris/Applications/yakyak/app/node_modules/q/q.js:883:30
    at Promise.promise.promiseDispatch (/home/chris/Applications/yakyak/app/node_modules/q/q.js:816:13)
    at /home/chris/Applications/yakyak/app/node_modules/q/q.js:570:49
    at runSingle (/home/chris/Applications/yakyak/app/node_modules/q/q.js:137:13)
    at flush (/home/chris/Applications/yakyak/app/node_modules/q/q.js:125:13)
    at process._tickCallback (internal/process/next_tick.js:61:11)
error connecting TypeError: Cannot read property 'length' of null
    at /home/chris/Applications/yakyak/app/node_modules/hangupsjs/lib/init.js:125:21
    at _fulfilled (/home/chris/Applications/yakyak/app/node_modules/q/q.js:854:54)
    at /home/chris/Applications/yakyak/app/node_modules/q/q.js:883:30
    at Promise.promise.promiseDispatch (/home/chris/Applications/yakyak/app/node_modules/q/q.js:816:13)
    at /home/chris/Applications/yakyak/app/node_modules/q/q.js:570:49
    at runSingle (/home/chris/Applications/yakyak/app/node_modules/q/q.js:137:13)
    at flush (/home/chris/Applications/yakyak/app/node_modules/q/q.js:125:13)
    at process._tickCallback (internal/process/next_tick.js:61:11)
tomasz-musialek commented 5 years ago

@cmurf

I explained how to fix that temporarily in:

https://github.com/yakyak/yakyak/issues/999#issuecomment-434873957

EDIT:

Btw. we need to figure out some heuristic, because those changes happen every now and then. Google probably generates the field IDs dynamically using some build system, so it's not stable that we got it hardcoded.

I suggested the heuristics in a closed pull request here:

https://github.com/yakyak/hangupsjs/pull/102#issuecomment-433480001

@averissimo you might be interested in this.

HomerSp commented 5 years ago

Yep, they changed things around again. I've created a pull request that checks the name instead of the key - that should hopefully be a lot more reliable.