Yakyak: Hangs on connecting state because of parsing error

Created on 17 May 2018  路  59Comments  路  Source: yakyak/yakyak

I cannot get pass the Connecting -state.
The same problem with both yakyak 1.4.3 and 1.5.3

This started occurring today. connect_failed SyntaxError: Unexpected token <
Deleting ~/.config/yakyak/cookies.json does not solve the problem.

Ubuntu 18.04 LTS

Log output:

reconnecting 0
resolving proxy http://plus.google.com
resolving proxy https://plus.google.com
resolved proxy DIRECT
resolved proxy DIRECT
connect_failed SyntaxError: Unexpected token <
    at Object.bind.out (/opt/yakyak/resources/app/node_modules/hangupsjs/lib/init.js:62:23)
    at /opt/yakyak/resources/app/node_modules/hangupsjs/lib/init.js:63:26
    at _fulfilled (/opt/yakyak/resources/app/node_modules/q/q.js:854:54)
    at self.promiseDispatch.done (/opt/yakyak/resources/app/node_modules/q/q.js:883:30)
    at Promise.promise.promiseDispatch (/opt/yakyak/resources/app/node_modules/q/q.js:816:13)
    at /opt/yakyak/resources/app/node_modules/q/q.js:877:14
    at runSingle (/opt/yakyak/resources/app/node_modules/q/q.js:137:13)
    at flush (/opt/yakyak/resources/app/node_modules/q/q.js:125:13)
    at _combinedTickCallback (internal/process/next_tick.js:73:7)
    at process._tickCallback (internal/process/next_tick.js:104:9)
error connecting SyntaxError: Unexpected token <
    at Object.bind.out (/opt/yakyak/resources/app/node_modules/hangupsjs/lib/init.js:62:23)
    at /opt/yakyak/resources/app/node_modules/hangupsjs/lib/init.js:63:26
    at _fulfilled (/opt/yakyak/resources/app/node_modules/q/q.js:854:54)
    at self.promiseDispatch.done (/opt/yakyak/resources/app/node_modules/q/q.js:883:30)
    at Promise.promise.promiseDispatch (/opt/yakyak/resources/app/node_modules/q/q.js:816:13)
    at /opt/yakyak/resources/app/node_modules/q/q.js:877:14
    at runSingle (/opt/yakyak/resources/app/node_modules/q/q.js:137:13)
    at flush (/opt/yakyak/resources/app/node_modules/q/q.js:125:13)
    at _combinedTickCallback (internal/process/next_tick.js:73:7)
    at process._tickCallback (internal/process/next_tick.js:104:9)
reconnecting 0

Most helpful comment

Looks like Google added a nonce to a script tag which broke yakyak's HTML parsing. Workaround: in the file [yakyak directory]/node_modules/hangupsjs/lib/init.js, edit line 59

html = html.replace(/<\/?script>/gm, '');

to

html = html.replace(/<\/?script.*?>/gm, '');

All 59 comments

The same happens here today.

Same here

same here on mac os

Same here

Same ...
OS: Parrot GNU/Linux 4.0
yakyak/now 1.5.0 amd64 [installed,local]

reconnecting 0
resolving proxy http://plus.google.com
resolving proxy https://plus.google.com
resolved proxy DIRECT
resolved proxy DIRECT
connect_failed SyntaxError: Unexpected token <
at Object.bind.out (/opt/yakyak/resources/app/node_modules/hangupsjs/lib/init.js:62:23)
at /opt/yakyak/resources/app/node_modules/hangupsjs/lib/init.js:63:26
at _fulfilled (/opt/yakyak/resources/app/node_modules/q/q.js:854:54)
at self.promiseDispatch.done (/opt/yakyak/resources/app/node_modules/q/q.js:883:30)
at Promise.promise.promiseDispatch (/opt/yakyak/resources/app/node_modules/q/q.js:816:13)
at /opt/yakyak/resources/app/node_modules/q/q.js:877:14
at runSingle (/opt/yakyak/resources/app/node_modules/q/q.js:137:13)
at flush (/opt/yakyak/resources/app/node_modules/q/q.js:125:13)
at _combinedTickCallback (internal/process/next_tick.js:73:7)
at process._tickCallback (internal/process/next_tick.js:104:9)
error connecting SyntaxError: Unexpected token <
at Object.bind.out (/opt/yakyak/resources/app/node_modules/hangupsjs/lib/init.js:62:23)
at /opt/yakyak/resources/app/node_modules/hangupsjs/lib/init.js:63:26
at _fulfilled (/opt/yakyak/resources/app/node_modules/q/q.js:854:54)
at self.promiseDispatch.done (/opt/yakyak/resources/app/node_modules/q/q.js:883:30)
at Promise.promise.promiseDispatch (/opt/yakyak/resources/app/node_modules/q/q.js:816:13)
at /opt/yakyak/resources/app/node_modules/q/q.js:877:14
at runSingle (/opt/yakyak/resources/app/node_modules/q/q.js:137:13)
at flush (/opt/yakyak/resources/app/node_modules/q/q.js:125:13)
at _combinedTickCallback (internal/process/next_tick.js:73:7)
at process._tickCallback (internal/process/next_tick.js:104:9)

Comment: Worked yesterday (2018-05-16)

Likewise
fedora 28 [4.16.8-300.fc28.x86_64]
yakyak 1.5.0 [rpm]

$ yakyak
hconnect
reconnecting 0
resolving proxy http://plus.google.com
resolving proxy https://plus.google.com
resolved proxy DIRECT
resolved proxy DIRECT
connect_failed SyntaxError: Unexpected token <
at Object.bind.out (/opt/yakyak/resources/app/node_modules/hangupsjs/lib/init.js:62:23)
at /opt/yakyak/resources/app/node_modules/hangupsjs/lib/init.js:63:26
at _fulfilled (/opt/yakyak/resources/app/node_modules/q/q.js:854:54)
at self.promiseDispatch.done (/opt/yakyak/resources/app/node_modules/q/q.js:883:30)
at Promise.promise.promiseDispatch (/opt/yakyak/resources/app/node_modules/q/q.js:816:13)
at /opt/yakyak/resources/app/node_modules/q/q.js:877:14
at runSingle (/opt/yakyak/resources/app/node_modules/q/q.js:137:13)
at flush (/opt/yakyak/resources/app/node_modules/q/q.js:125:13)
at _combinedTickCallback (internal/process/next_tick.js:73:7)
at process._tickCallback (internal/process/next_tick.js:104:9)
error connecting SyntaxError: Unexpected token <
at Object.bind.out (/opt/yakyak/resources/app/node_modules/hangupsjs/lib/init.js:62:23)
at /opt/yakyak/resources/app/node_modules/hangupsjs/lib/init.js:63:26
at _fulfilled (/opt/yakyak/resources/app/node_modules/q/q.js:854:54)
at self.promiseDispatch.done (/opt/yakyak/resources/app/node_modules/q/q.js:883:30)
at Promise.promise.promiseDispatch (/opt/yakyak/resources/app/node_modules/q/q.js:816:13)
at /opt/yakyak/resources/app/node_modules/q/q.js:877:14
at runSingle (/opt/yakyak/resources/app/node_modules/q/q.js:137:13)
at flush (/opt/yakyak/resources/app/node_modules/q/q.js:125:13)
at _combinedTickCallback (internal/process/next_tick.js:73:7)
at process._tickCallback (internal/process/next_tick.js:104:9)
reconnecting 0

win10 as well

Same error on Mint 18.3 64bit.

Same here, latest Mac OS version.

Looks like a new iOS release dropped.

Looks like Google added a nonce to a script tag which broke yakyak's HTML parsing. Workaround: in the file [yakyak directory]/node_modules/hangupsjs/lib/init.js, edit line 59

html = html.replace(/<\/?script>/gm, '');

to

html = html.replace(/<\/?script.*?>/gm, '');

Thanks danbob, that worked for me.
Fedora path for reference, /opt/yakyak/resources/app/node_modules/hangupsjs/lib/init.js

Thank @danbob
MacOS path for reference
/Applications/YakYak.app/Contents/Resources/app/node_modules/hangupsjs/lib/init.js

@danbob thanks, it works

Thanks @danbob It's works in macOS High Sierrra 10.13.4

/Applications/YakYak.app/Contents/Resources/app/node_modules/hangupsjs/lib/init.js

html = html.replace(//gm, '');
to
html = html.replace(//gm, '');

Thanks @danbob - confirmed the update fixed the issue.

Also thanks to @cristianoronan for consolidating the path and fix in one comment.

Thanks @danbob It's works Debian 9.4.

Found mine under /opt/yakyak/resources/app/node_modules/hangupsjs/lib/init.js
adding ".*?" after "script" worked as well.
Thanks for the fix.

The fix worked for me on my Mac, but not on my Windows 10 machine. Anyone have any luck with Windows?

@TheJoelGray On Windows 10. I followed the same steps @danbob outlined, only the file is located wherever you saved the initial download (mine was still in the Downloads folder). So:
/Downloads/yakyak-1.4.3-win32-x64/YakYak-win32-x64/resources/app/node_modules/hangupjs/lib/init.js

Thanks @danbob it worked for me too.

Hi @Courtney-Lang, I did find the file, I'd moved mine, unfortunately editing it per @danbob and others did not resolve the issue, it still sits on "connecting" and gives me a brief message which disappears after a few seconds reading "Possible fatal error on Main Process. Yak Yak may stop working as expected"

@TheJoelGray try deleting the folder here:

%AppData%yakyak

Make sure the application is closed first.
This will be like a fresh install then.

That seems to have partially resolved it, once. After an extended period of time if finally connect. I was able to have conversations. When I closed and reopened, it seemed like it was going to work, but after connecting went away I was left with a screen that has nothing in it.

Hm. Seems odd.
I think I am out of ideas if deleteing the whole YakYak directory in AppData didn't help.

This worked for me. Thanks!

I just deleted the yakyak AppData folder AND my install (which was the current release version 1.4.4). I then downloaded the prerelease 1.5.0 and implemented the modification mentioned above and now it's working for me.

@danbob
Your fix worked for me as well.

Immediately fixed the problem and didn't even have to clear appdata folder. God bless! Probably should put this fix in a new version for the guys who aren't as techy. Anyway, thank you @danbob!

On ubuntu i cant edit the file. read only even with root account.
Any advice?

@Zloduh you can make the file editable by root like so:

sudo chmod u+w /opt/yakyak/resources/app/node_modules/hangupsjs/lib/init.js

I believe that's the correct path for Ubuntu but it will only complain if it's not.

@danbob
chmod: cannot access '/opt/yakyak/resources/app/node_modules/hangupsjs/lib/init.js': No such file or directory
i have found the file on different location
/snap/yakyak/1/resources/app/node_modules/hangupsjs/lib/init.js

when i try to edit that file i cant save it due to "read only file system"
also chmod gave same error....
Perhaps there is some service that is blocking the write on the file.. yakyak is not running

ummm.. late update-
appears that yakyak snap is mounted as read only.
will try to remount as RW and edit the file.

--- Update
fail. . unable to remount as rw... so i cant edit.
there is no other init.js file on my sistem.
if there is anyone on ubuntu that has this issue pls shed some light on how to fix

Oh, you're using the Snap version. Snaps are self-contained filesystems, I don't know how to edit them or if they even can be edited. You might have to install the regular .deb version to use the workaround.

@Zloduh do the following:
create temp directory
cd that
$ sudo systemctl stop snap-yakyak-1.mount
$ unsquashfs /var/lib/snapd/snaps/yakyak_1.snap
$ vim squashfs-root/resources/app/node_modules/hangupsjs/lib/init.js
go to line 59 and apply the fix, save and quit
$ mksquashfs squashfs-root/ yakyak_1.snap -noappend -always-use-fragments
replace file in /var/lib/snapd/snaps/
$ sudo systemctl start snap-yakyak-1.mount
and that's it, yakyak working again. Thanks @danbob !

Changing the node_modules/hangupsjs/lib/init.js script worked on Windows 10 64-bit version 1.5.0.

Fix didn't work for OSX El Capitan 10.11.6, although I'm not experienced in making these types of edits.

EDIT - Had the application installed multiple times and did not update the correct file tied to the application I was using. Found the correct root file and the fix worked. Thanks.

This very same problem happened to me last week. I thought it's the service having problem. Found this and the fix work the magic for me. (I'm on MacOS 10.12.6)

Thanks guys, this did the trick for me too. Great community here.

Thanks for the workaround. It works for me too!

Thanks, it works!

Worked for me in Windows 10.

Tks!

Had this issue on MacOS Sierra allofasudden. The html = html.replace(/<\/?script.*?>/gm, ''); replacement fixed it for me. Thanks @danbob!

Thanks @cristianoronan !

Worked for me on macOS 10.13.4

Hi guys,

We appreciate the fast fix, but could we stop commenting this issue as it sends spam to everybody's emails. Fast fix, it works as promised. Thanks to developers.

@juhasim In fact, but you can also mute this thread in your account and stop spams ;)

This fix worked for me, now it's happening again and I've tried to kill the app and made sure the init file still has the change described, but the application still won't load. Stuck on connecting... :(

@sumnercreations Try installing the latest release and deleting %appdata%yakyak folder.

https://github.com/yakyak/yakyak/issues/919#issuecomment-389866711

Solve the problem!

Details:
Arch Linux x64
YakYak installed from AUR

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Hi guys, I have the very same issue. Yesterday YakYak was working, today it's not. I have Kubuntu 18.04 - I had a snap install, so I used the .deb package. Tried to edit the script, did not help. Tried to delete AppData AND the installation while the app was closed, deleted the .deb package of 1.5.2 version, downloaded 1.5.0, edited the script and still not working....does anyone have any idea?

Thanks a lot.

Same problem here. Started occurring today.

Same! I've just started to get the problem again. Tried updating the init.js and even installed the latest version via hombrew

brew caskroom install yakyak

but to no avail.

Any help would be appreciated

Unfortunately the changes they made this time are more difficult to work around. Some folks found a partial fix here: https://github.com/yakyak/yakyak/issues/979#issuecomment-432817986

Sadly that didnt work for me :( I'm using MacOS HighSierra - not even the latest Mojave

Yakyak does not work with MacOS Mojave, the above fixes do not seem to work!

Again, after 1.5.1 with updated values was working. Updated with homebrew to 1.5.2 it stopped working again.
What is the status of this issue ?

Google made more changes like the ones last week. There's a pull request pending that should prevent this particular issue from happening again: https://github.com/yakyak/hangupsjs/pull/107

Latest stable version corrects this, please confirm by installing v1.5.3 from release page (or wait until it is released in your distribution)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ebramanti picture ebramanti  路  6Comments

ghost picture ghost  路  3Comments

leftpropeller picture leftpropeller  路  3Comments

pricelessbrewing picture pricelessbrewing  路  6Comments

cgatesman picture cgatesman  路  5Comments