magne4000 / quassel-webserver

A web server/client for Quassel
MIT License
210 stars 38 forks source link

Network creation fails due to undefined ircUsersAndChannels: TypeError: Cannot convert undefined or null to object #282

Open esainane opened 4 years ago

esainane commented 4 years ago

This happens on trying to commit (save) a new network.

Inspecting at the getBuffer frame, e[4].__obj.IrcUsersAndChannels is { __obj: undefined }, causing the following error once quassel-webserver tries to serialize it:

TypeError: Cannot convert undefined or null to object
    at Function.keys (<anonymous>)
    at A.toBuffer (//javascripts/libquassel.js:8:149046)
    at _.toBuffer (//javascripts/libquassel.js:8:151532)
    at A.toBuffer (//javascripts/libquassel.js:8:149172)
    at Object.toBuffer (//javascripts/libquassel.js:8:150219)
    at _.toBuffer (//javascripts/libquassel.js:8:151532)
    at T.toBuffer (//javascripts/libquassel.js:8:148040)
    at _.toBuffer (//javascripts/libquassel.js:8:151532)
    at Function.getBuffer (//javascripts/libquassel.js:8:219688)
    at f._transform (//javascripts/libquassel.js:8:219790) Possibly unhandled rejection: {}

I am not sure how to resolve this - possibly there is a missing ircUsersAndChannels: {users:[],channels:[]} somewhere, or the serialization of this field could be made optional?