arj03 / ssb-browser-demo

A secure scuttlebutt client interface running in the browser
Other
58 stars 11 forks source link

Cannot read property 'on' of undefined #293

Open KyleMaas opened 3 years ago

KyleMaas commented 3 years ago

I keep getting a series of these:

Uncaught TypeError: Cannot read property 'on' of undefined
    at Object.exports.init (bundle-ui.js:132020)
    at Object.module.exports.initSSB (bundle-ui.js:133341)
    at Object.module.exports.getSSB (bundle-ui.js:133405)
    at bundle-ui.js:163021

And it pretty well prevents me from doing anything in the tab, such as loading more messages. The relevant line is the second one here:

const s = require('sodium-browserify')
s.events.on('sodium-browserify:wasm loaded', function() {

The problem is that s.events is not defined at this point.

KyleMaas commented 3 years ago

Problem cleared up after refreshing the tab. But it would be nice to know why it happened in the first place.