ssbc / scuttle-shell

A system tray app for running Secure Scuttlebutt and providing sbot features to your local system
54 stars 10 forks source link

Crashes on startup (OSX) #14

Closed cinnamon-bun closed 5 years ago

cinnamon-bun commented 5 years ago

Using OSX 10.11.6

Setup:

$ git clone <this repo>  // got commit e3b27dd3289da9446e01441a0ee92240ae4a08ba
$ npm install
$ npm run check

[INFO] App manifest path location: /Users/myname/Library/Application Support/Mozilla/NativeMessagingHosts/scuttleshell.json
[OK] Configuration appears correct
[INFO] App located at: /Users/myname/projects/ssb/scuttle-shell/host-app.js

Running:

$ npm run start

started sbot server v12.1.0
ssb-friends: stream legacy api used
NotFoundError: Key not found in database [startedAt]
    at /Users/myname/projects/ssb/scuttle-shell/node_modules/levelup/lib/levelup.js:160:15
    at /Users/myname/projects/ssb/scuttle-shell/node_modules/encoding-down/index.js:51:21
systrayhelper 0.0.3 (0953942245566bf358ba937af840947100380e15 built 2018-09-13T19:08:04Z)
panic: runtime error: index out of range

goroutine 34 [running]:
main.onReady.func2.1(0xc42001a1e0, 0xb, 0xc420018dc0, 0x14, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
    /Users/travis/gopath/src/github.com/ssbc/systrayhelper/tray.go:111 +0x187
main.onReady.func2.3(0xc42001a1e0, 0xb, 0xc420018dc0, 0x14, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
    /Users/travis/gopath/src/github.com/ssbc/systrayhelper/tray.go:152 +0x155
main.onReady.func2.4(0xc420166000, 0xc42018a0c0)
    /Users/travis/gopath/src/github.com/ssbc/systrayhelper/tray.go:177 +0x69
created by main.onReady.func2
    /Users/travis/gopath/src/github.com/ssbc/systrayhelper/tray.go:167 +0x344
scuttle-shell got exit: { code: 2, signal: null }

I commented out most of the plugins in server.js and ran again. The output was identical except it didn't have the NotFoundError: Key not found in database.

cryptix commented 5 years ago

Hmmm.... a bit strange. I think the Key not found in database is coming from ssb-unread. I think it’s not that critical but will look further into it.

The index out of range looks scary but shouldn’t be the reason here. I need to check if the node process shuts down if the systrayhelper dies but I don’t think so.

cryptix commented 5 years ago

This also shows on travis: https://travis-ci.org/ssbc/scuttle-shell/jobs/444124776#L157

The sbot server process somehow doesn't stay up (for 5 seconds)...!

Once it crashes the trayhlper also crashes with a way to verbose error, I'll fix that also.

cryptix commented 5 years ago

@cinnamon-bun I pushed a new version of the helper. It should at least not just crash but the menu of the trayhelper thing might be broken in that case.

cinnamon-bun commented 5 years ago

I tested the branch windowsInstall commit dda379b (on my Mac) and it worked! 🌟 Or at least nothing crashed and an icon appeared in the systray. I didn't verify that sbot was running successfully.

cryptix commented 5 years ago

That's nice to hear! Feel free to reopen this if it becomes a problem again.

ps: I also worked on simulating click events in the Xorg environment yesterday. Should help me in nailing down more of the actual API usage of the systray thingy, like changing the menu entries.