mikelustosa / Projeto-TInject

Projeto TInject
246 stars 132 forks source link

error sending message #76

Closed rodrigo-ogioni closed 5 months ago

rodrigo-ogioni commented 5 months ago

I disconnect, connect, close the application, open it again, nothing works

mikelustosa commented 5 months ago

Just restart after the first authentication. This will solve it. It's just instability in your region.

jesussales commented 5 months ago

the problem continue, in my case from Spain the error is

UjcTej1zGTO.js?_nc_x=Ij3Wp8lg5Kz:1532 Uncaught TypeError: this.findImpl is not a function at b. (UjcTej1zGTO.js?_nc_x=Ij3Wp8lg5Kz:1531:5481) at Generator.next () at h (_iGJBfP7INJ.js?_nc_x=Ij3Wp8lg5Kz:11:125) at g (_iGJBfP7INJ.js?_nc_x=Ij3Wp8lg5Kz:11:349) at _iGJBfP7INJ.js?_nc_x=Ij3Wp8lg5Kz:11:408 at new Promise () at b._serverQuery (_iGJBfP7INJ.js?_nc_x=Ij3Wp8lg5Kz:11:277) at f._query (UjcTej1zGTO.js?_nc_x=Ij3Wp8lg5Kz:1531:4997) at f.find (UjcTej1zGTO.js?_nc_x=Ij3Wp8lg5Kz:1531:3243) at :3:40

jesussales commented 5 months ago

here's my temporary solution until we find a better one it's still under testing, but hoping to work its basically overwriting Store.Chat.find to make sure the new chat is in store and avoiding to call findImpl

if (!window.Store.Chat.findTemp) { window.Store.Chat.findTemp = window.Store.Chat.find; } window.Store.Chat.find = async function (id) { try { return await window.Store.Chat.findTemp(id); } catch (err) { if (err && err.message && err.message.includes('findImpl')) { var tempChat = new window.Store.Chat.modelClass({ id }); window.Store.Chat.add(tempChat); return await window.Store.Chat.findTemp(id); } throw err; } }; this is me using my custom version of WAPI