You are reading content from Scuttlebutt
@Gordon %+v++VgnffhtFNJ0LkYqd0NQ+E5oHWZsDz2jS2ULOmwo=.sha256

Hullo @arj, pal.

I've began playing around with ssb-browser-core and I was wondering if you could give me a wee hand with something when you have time.

https://github.com/Happy0/ssb-chess-browser/blob/main/SsbClient.js#L37

Any idea why the ssbLoaded callback never gets called? In the console I have:

unreachable code after return statement
chess.js:73440:6
Promising hings chess.js:39:13
The character encoding of the HTML document was not declared. The document will render with garbled text in some browser configurations if the document contains characters from outside the US-ASCII range. The character encoding of the page must be declared in the document or in the transfer protocol. index.html
WindowController: Taking over

"giving back the hingmy that I promised" never gets printed

If you want to try it locally you could run:

npm run build
firefox example/index.html

(Or whatever browser you use in place of 'firefox.')

@Anders %xBHQTtt+wvpWTAfHJWpBy1FRS4RvH1iztLRTrqeoPJM=.sha256

Trying to debug this I see that the API can be much better, especially if there was a small example project one could fork. The problem was that the code expects a getSSB call to succeed before it will do the callback. This is best done with getSSBEventually. In browser-demo these are all over the place so I never saw this problem before.

So thanks for trying things out and reporting back.

Sidenote:

When I try to npm i the project npm gets angry and spits out this nice error :-)

npm ERR! npm ERR! npm ERR! npm ERR! npm ERR! npm ERR! npm ERR! npm ERR! npm ERR! npm ERR! npm ERR! npm ERR! npm ERR! npm ERR! npm ERR! npm ERR! npm ERR! npm ERR! npm ERR! npm ERR! npm ERR! npm ERR! npm ERR! npm ERR! npm ERR! npm ERR! npm ERR! npm ERR! npm ERR! npm ERR! npm ERR! npm ERR! npm ERR! npm ERR! npm ERR! npm ERR! npm ERR! npm ERR! npm ERR! npm ERR! npm ERR! npm ERR! npm ERR! npm ERR! npm ERR! npm ERR! npm ERR! npm ERR! npm ERR! npm ERR! npm ERR! npm ERR! npm ERR! npm ERR! npm ERR! npm ERR! npm ERR! npm ERR! npm ERR! npm ERR! npm ERR! npm ERR! npm ERR! npm ERR! npm ERR! npm ERR! npm ERR! npm ERR! npm ERR! npm ERR! npm ERR! npm ERR! npm ERR! npm ERR! npm ERR! npm ERR! npm ERR! npm ERR! npm ERR! npm ERR! npm ERR! npm ERR! npm ERR! npm ERR! npm ERR! npm ERR! npm ERR! npm ERR! npm ERR! npm ERR! npm ERR! npm ERR! npm ERR! npm ERR! npm ERR! npm ERR! npm ERR! npm ERR! npm ERR! npm ERR! npm ERR! npm ERR! npm ERR! npm ERR! npm ERR! npm ERR! npm ERR! npm ERR! npm ERR! npm ERR! npm ERR! npm ERR! npm ERR! npm ERR! npm ERR! npm ERR! npm ERR! npm ERR! npm ERR! npm ERR! npm ERR! npm ERR! npm ERR! npm ERR! npm ERR! npm ERR! npm ERR! npm ERR! npm ERR! npm ERR! npm ERR! npm ERR! npm ERR! npm ERR! npm ERR! npm ERR! npm ERR! npm ERR! npm ERR! npm ERR! npm ERR! npm ERR! npm ERR! npm ERR! npm ERR! npm ERR! npm ERR! npm ERR! npm ERR! npm ERR! npm ERR! npm ERR! npm ERR! npm ERR! npm ERR! npm ERR! npm ERR! npm ERR! npm ERR! npm ERR! npm ERR! npm ERR! npm ERR! npm ERR! npm ERR! npm ERR! npm ERR! npm ERR! npm ERR! npm ERR! npm ERR! npm ERR! npm ERR! npm ERR! npm ERR! npm ERR! npm ERR! npm ERR! npm ERR! npm ERR! npm ERR! npm ERR! npm ERR! npm ERR! npm ERR! npm ERR! npm ERR! npm ERR! npm ERR! npm ERR! npm ERR! npm ERR! npm ERR! npm ERR! npm ERR! npm ERR! npm ERR! npm ERR! npm ERR! npm ERR! npm ERR! npm ERR! npm ERR! npm ERR! npm ERR! npm ERR! npm ERR! npm ERR! npm ERR! npm ERR! npm ERR! npm ERR! npm ERR! npm ERR! npm ERR! npm ERR! npm ERR! npm ERR! path /home/arj/dev/ssb-chess-browser/node_modules/ssb-chess

Might be related to a really old version of core-js that is pulled in by depnest, not sure.

User has not chosen to be hosted publicly
User has not chosen to be hosted publicly
Join Scuttlebutt now