okTurtles / group-income

A decentralized and private (end-to-end encrypted) financial safety net for you and your friends.
https://groupincome.org
GNU Affero General Public License v3.0
329 stars 43 forks source link

"SOCKET UNHANDLED EVENT" for "sup" and "unsub" #259

Open taoeffect opened 7 years ago

taoeffect commented 7 years ago

Problem

Got this:

lookup name: john
hapi.js:77 subscribing to: 21XWnNTZZqaiqmkgLzi6K8tTmiQp51fvZuwr36Bqx7zCKjRvre
TimeTravel.vue?fe481c1e:39 [TimeTravel] spied mutation: Object {type: "pending", payload: "21XWnNTZZqaiqmkgLzi6K8tTmiQp51fvZuwr36Bqx7zCKjRvre"}
TimeTravel.vue?fe481c1e:49 Firing position 32: Object {…}
TimeTravel.vue?fe481c1e:49 Firing position 32: Object {…}
hapi.js:47 SOCKET UNHANDLED EVENT! Object {type: "sub", data: Object}
hapi.js:81 subscribed response: Object {type: "success", data: Object}
state.js:233 saveSettings: Object {position: "21XWnNWaDNT3aXXNME4z7NVYHsi1LgUj4SzVU1MfWQ1Rufngv7", currentGroupId: "21XWnNTxadzeLN4pmiMYoPUGqP6Vvx3HFAMhd7fMUL6Z3KBYjL", contracts: Array(4)}
hapi.js:47 SOCKET UNHANDLED EVENT! Object {type: "unsub", data: Object}
hapi.js:47 SOCKET UNHANDLED EVENT! Object {type: "unsub", data: Object}
hapi.js:47 SOCKET UNHANDLED EVENT! Object {type: "unsub", data: Object}
hapi.js:47 SOCKET UNHANDLED EVENT! Object {type: "unsub", data: Object}
hapi.js:47 SOCKET UNHANDLED EVENT! Object {type: "unsub", data: Object}
hapi.js:47 SOCKET UNHANDLED EVENT! Object {type: "unsub", data: Object}
hapi.js:47 SOCKET UNHANDLED EVENT! Object {type: "unsub", data: Object}
hapi.js:47 SOCKET UNHANDLED EVENT! Object {type: "unsub", data: Object}
hapi.js:47 SOCKET UNHANDLED EVENT! Object {type: "unsub", data: Object}
hapi.js:47 SOCKET UNHANDLED EVENT! Object {type: "unsub", data: Object}
hapi.js:47 SOCKET UNHANDLED EVENT! Object {type: "unsub", data: Object}
hapi.js:47 SOCKET UNHANDLED EVENT! Object {type: "unsub", data: Object}
hapi.js:47 SOCKET UNHANDLED EVENT! Object {type: "sub", data: Object}
hapi.js:47 SOCKET UNHANDLED EVENT! Object {type: "sub", data: Object}
hapi.js:47 SOCKET UNHANDLED EVENT! Object {type: "sub", data: Object}

Steps to reproduce:

  1. Window 1: Open Chrome window, clear app data
  2. Window 2: Another window in private window mode
  3. Window 1: Create user bob
  4. Window 2: Create user john
  5. Window 1: Create a group and invite john
  6. Window 2: Check mail and accept invite
  7. Window 1: Check out my profile, select the group I created, then click the GroupIncome icon in the upper left to nav to root, i.e. http://localhost:8000/simple/
  8. Window 2: observe the above strange error

Oddly enough the errors happen in Window 2 each time when I click on the GroupIncome logo in Window 1! Weird!

Solution

Not sure, but one is needed. This behavior was observed while testing #251.

EDIT: See first comment below — this issue is now about properly handling unsub events.

taoeffect commented 7 years ago

OK, so PR #251 partially addresses this now by using <router-link> instead of <a> for the logo to link to the home page / dashboard.

Edited this issue to now make it about actually handling this event.