patchbay icon indicating copy to clipboard operation
patchbay copied to clipboard

Patchbay stuck on loading screen on Windows 10

Open soapdog opened this issue 6 years ago • 16 comments

When launching Patchbay from master branch, I'm presented first with ssb-ahoy which appears to work without any glitch. I can select my identity and click the launch app button. The window is replaced with a Patchbay window with the "loading" string in the center of the screen. Then it gets stuck there.

Patchbay 2019-06-02 11 58 02

There are replication errors on the terminal

 # AHOY: (main)     starting UI
# AHOY: (ui)       SENDING  >> ahoy:step
# AHOY: (main)     clearing UI
# ---------------
# AHOY: (main)     starting Server
# AHOY: (main)     starting UI
ssb-friends: stream legacy api used
Error replicating with @FWHrnoH/YwtiVSng8MiWrb6ekZDX9R+i3XlXLlmtaiE=.ed25519:
   Error: parent stream is closing
    at PacketStream.stream (C:\Users\andre\prog\ssbc\patchbay\node_modules\ssb-server\node_modules\packet-stream\index.js:46:28)
    at Object.ws.remoteCall (C:\Users\andre\prog\ssbc\patchbay\node_modules\ssb-server\node_modules\muxrpc\stream.js:116:17)
    at C:\Users\andre\prog\ssbc\patchbay\node_modules\ssb-server\node_modules\muxrpc\index.js:46:15
    at remoteCall (C:\Users\andre\prog\ssbc\patchbay\node_modules\ssb-server\node_modules\muxrpc\api.js:40:19)
    at EventEmitter.obj.(anonymous function) [as createHistoryStream] (C:\Users\andre\prog\ssbc\patchbay\node_modules\ssb-server\node_modules\muxrpc\
api.js:25:18)
    at replicate (C:\Users\andre\prog\ssbc\patchbay\node_modules\ssb-replicate\legacy.js:291:13)
    at EventEmitter.fallback (C:\Users\andre\prog\ssbc\patchbay\node_modules\ssb-replicate\legacy.js:351:7)
    at Object.onceWrapper (events.js:273:13)
    at EventEmitter.emit (events.js:182:13)
    at C:\Users\andre\prog\ssbc\patchbay\node_modules\ssb-ebt\index.js:144:15
STARTING Patchbay UI
TypeError: Cannot read property 'stream' of undefined
    at api.sbot.pull.stream.sbot (C:\Users\andre\prog\ssbc\patchbay\node_modules\patchcore\contact\obs.js:68:49)
    at C:\Users\andre\prog\ssbc\patchbay\node_modules\patchcore\sbot.js:240:28
    at Array.watch (C:\Users\andre\prog\ssbc\patchbay\node_modules\mutant\once-true.js:8:7)
    at Function.Observable.observable.set (C:\Users\andre\prog\ssbc\patchbay\node_modules\mutant\value.js:12:25)
    at C:\Users\andre\prog\ssbc\patchbay\node_modules\patchcore\sbot.js:89:18
    at C:\Users\andre\prog\ssbc\patchbay\node_modules\ssb-client\client.js:79:5
    at next (C:\Users\andre\prog\ssbc\patchbay\node_modules\multiserver\compose.js:28:14)
    at C:\Users\andre\prog\ssbc\patchbay\node_modules\multiserver\compose.js:34:9
    at _cb (C:\Users\andre\prog\ssbc\patchbay\node_modules\multiserver\plugins\shs.js:31:11)
    at C:\Users\andre\prog\ssbc\patchbay\node_modules\secret-handshake\protocol.js:122:7
    at Object.cb (C:\Users\andre\prog\ssbc\patchbay\node_modules\secret-handshake\protocol.js:57:11)
    at drain (C:\Users\andre\prog\ssbc\patchbay\node_modules\pull-reader\index.js:39:14)
    at more (C:\Users\andre\prog\ssbc\patchbay\node_modules\pull-reader\index.js:55:13)
    at C:\Users\andre\prog\ssbc\patchbay\node_modules\pull-reader\index.js:66:9
    at C:\Users\andre\prog\ssbc\patchbay\node_modules\pull-reader\index.js:20:7
    at drain (C:\Users\andre\prog\ssbc\patchbay\node_modules\stream-to-pull-stream\index.js:141:18)
Error replicating with @5XaVcAJ5DklwuuIkjGz4lwm2rOnMHHovhNg7BFFnyJ8=.ed25519:
   Error: parent stream is closing

soapdog avatar Jun 02 '19 11:06 soapdog

I also had patchbay get stuck "loading..." without showing any errors... then it turned out sbot had crashed (in another tab)

dominictarr avatar Jun 04 '19 09:06 dominictarr

Been debugging this with @teq and it looks like it is indeed something to do with sbot crashing. The UI shows an error in the console- Cannot read property "stream" of undefined when trying to access api.sbot.pull.stream.sbot. That happens in patchcore/contact/obs.js. Unsure how to troubleshoot further- is there any additional debug logging we can enable for sbot to see what's going on inside it?

pospi avatar Jun 16 '19 02:06 pospi

@pospi that sometimes happens to patchfox as well, @mixmix had some cool code to reconnect sbot, maybe it could be used in this step as well. Any clue on how to fix this @mixmix ?

soapdog avatar Jun 17 '19 08:06 soapdog

Thanks @soapdog, it seems to be working at the moment, for me at least.

tariq-eden avatar Jun 17 '19 11:06 tariq-eden

that error about stream of undefined is on this code :

      api.sbot.pull.stream(sbot => sbot.friends.stream({ live: true })),

specifically that sbot.friends.stream

i.e. sbot.friends is undefined


I need to know more about how exactly you are each running your sbot (ssb-server). The main expected way to go is to let Patchbay run the ssb-server (i.e. please try doing this without deviating and running your own ssb-server from command line with unknown plugin versions, it makes support harder).

If it is ssb-server crashing, it's hard to say why. I think there's an ENV you can start with which does more heavy ssb-server logging but not sure if that's documented .. hmm check out https://www.npmjs.com/package/ssb-config for logging.level (you can set that in ssb-ahoy!)

Let me know how it goes @soapdog @dominictarr @pospi

mixmix avatar Jun 22 '19 01:06 mixmix

@mixmix I'm letting patchbay run its own server. I will download a recent copy and try again.

soapdog avatar Jul 09 '19 08:07 soapdog

@mixmix it is still happening on master branch. Somehow Patchbay is extremely slow on my machine (which is also slow). To be honest, everything is slow here but Patchbay is waaaay slower than other electron based apps. Things like going ssb-ahoy screen to patchbay main UI took couple minutes.

The main UI launched blank, it took minutes to paint decorations there and then it broke with

PS C:\Users\andre\prog\ssbc\patchbay> npm run start

> [email protected] start C:\Users\andre\prog\ssbc\patchbay
> electron index.js -- --title patchbay


 # AHOY: (main)     starting UI
# AHOY: (ui)       SENDING  >> ahoy:step
# AHOY: (main)     clearing UI
# ---------------
# AHOY: (main)     starting Server
# AHOY: (main)     starting UI
ssb-friends: stream legacy api used
ssb-friends#stream : bummer race condition, trying again!
ssb-friends#stream : bummer race condition, trying again!
ssb-friends#stream : bummer race condition, trying again!
ssb-friends#stream : bummer race condition, trying again!
ssb-friends#stream : bummer race condition, trying again!
ssb-friends#stream : bummer race condition, trying again!
STARTING Patchbay UI
TypeError: Cannot read property 'stream' of undefined
    at api.sbot.pull.stream.sbot (C:\Users\andre\prog\ssbc\patchbay\node_modules\patchcore\contact\obs.js:68:49)
    at C:\Users\andre\prog\ssbc\patchbay\node_modules\patchcore\sbot.js:240:28
    at watch (C:\Users\andre\prog\ssbc\patchbay\node_modules\mutant\once-true.js:8:7)
    at watch (C:\Users\andre\prog\ssbc\patchbay\node_modules\mutant\watch.js:7:5)
    at onceTrue (C:\Users\andre\prog\ssbc\patchbay\node_modules\mutant\once-true.js:4:17)
    at Object.stream (C:\Users\andre\prog\ssbc\patchbay\node_modules\patchcore\sbot.js:239:11)
    at Object.stream (C:\Users\andre\prog\ssbc\patchbay\node_modules\depject\apply.js:18:30)
    at loadCache (C:\Users\andre\prog\ssbc\patchbay\node_modules\patchcore\contact\obs.js:68:21)
    at get (C:\Users\andre\prog\ssbc\patchbay\node_modules\patchcore\contact\obs.js:125:7)
    at Object.following (C:\Users\andre\prog\ssbc\patchbay\node_modules\patchcore\contact\obs.js:32:45)
    at Object.following (C:\Users\andre\prog\ssbc\patchbay\node_modules\depject\apply.js:18:30)
    at Object.relationships (C:\Users\andre\prog\ssbc\patchbay\contact\html\relationships.js:27:42)
    at Object.relationships (C:\Users\andre\prog\ssbc\patchbay\node_modules\depject\apply.js:18:30)
    at Array.profilePage (C:\Users\andre\prog\ssbc\patchbay\app\page\profile.js:55:51)
    at Array.<anonymous> (C:\Users\andre\prog\ssbc\patchbay\node_modules\depject\apply.js:18:30)
    at Router (C:\Users\andre\prog\ssbc\patchbay\router\async\router.js:34:33)
TypeError: release is not a function
    at Immediate.doRelease (C:\Users\andre\prog\ssbc\patchbay\node_modules\mutant\once-true.js:15:5)
    at runCallback (timers.js:694:18)
    at tryOnImmediate (timers.js:665:5)
    at processImmediate (timers.js:647:5)
Error: async hook stack has become corrupted (actual: 10380, expected: 0)
 1: 00007FF753D01A6F
 2: 00007FF75299FFA5
 3: 00007FF753CFDD3E
 4: 00007FF753CFDBDD
 5: 00007FF752997091
 6: 00007FF752997495
 7: 00007FF753CFA985
 8: 00007FF753DE8E63
 9: 00007FF7529C1D50
10: 00007FF7529BE4FD
11: 00007FF751FC8824
12: 00007FF752034A86
13: 00007FF751FC8824
14: 00007FF751FF2277
15: 00007FF751FF27E8
16: 00007FF751FF3399
17: 00007FF75200F7B1
18: 00007FF75296A9EB
19: 00007FF751FAC4E4
20: 00007FF752548586
21: 00007FF751FABC41
22: 00007FF7506F13B8
23: 00007FF754D140A2
24: 00007FF90FCC7974
25: 00007FF91293A271
# AHOY: (main)     quitting
PS C:\Users\andre\prog\ssbc\patchbay>                                            

This is a fresh install, brand new node modules.

soapdog avatar Jul 09 '19 09:07 soapdog

Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward?

stale[bot] avatar Oct 07 '19 09:10 stale[bot]

Just a bump because this is still happening with a fresh install of master on Windows 10.

soapdog avatar Oct 17 '19 15:10 soapdog

Same issue for me.

DoubleCouponDay avatar Nov 24 '19 18:11 DoubleCouponDay

I posted on the Git-SSB repo for this as well, but I am also getting this issue. Specifically, the error that I'm getting is:

STARTING Patchbay UI
TypeError: Cannot read property 'socialValueStream' of undefined
    at api.sbot.pull.stream (C:\Users\User\AppData\Local\Programs\patchbay\resources\app.asar\node_modules\patchcore\about\obs.js:77:58)
    at C:\Users\User\AppData\Local\Programs\patchbay\resources\app.asar\node_modules\patchcore\sbot.js:240:28
    at Array.watch (C:\Users\User\AppData\Local\Programs\patchbay\resources\app.asar\node_modules\mutant\once-true.js:8:7)
    at Function.Observable.observable.set (C:\Users\User\AppData\Local\Programs\patchbay\resources\app.asar\node_modules\mutant\value.js:12:25)
    at C:\Users\User\AppData\Local\Programs\patchbay\resources\app.asar\node_modules\patchcore\sbot.js:89:18
    at C:\Users\User\AppData\Local\Programs\patchbay\resources\app.asar\node_modules\ssb-client\client.js:78:5
    at next (C:\Users\User\AppData\Local\Programs\patchbay\resources\app.asar\node_modules\multiserver\compose.js:28:14)
    at C:\Users\User\AppData\Local\Programs\patchbay\resources\app.asar\node_modules\multiserver\compose.js:34:9
    at _cb (C:\Users\User\AppData\Local\Programs\patchbay\resources\app.asar\node_modules\multiserver\plugins\shs.js:31:11)
    at C:\Users\User\AppData\Local\Programs\patchbay\resources\app.asar\node_modules\secret-handshake\protocol.js:123:7
    at Object.cb (C:\Users\User\AppData\Local\Programs\patchbay\resources\app.asar\node_modules\secret-handshake\protocol.js:57:11)
    at drain (C:\Users\User\AppData\Local\Programs\patchbay\resources\app.asar\node_modules\pull-reader\index.js:39:14)
    at more (C:\Users\User\AppData\Local\Programs\patchbay\resources\app.asar\node_modules\pull-reader\index.js:55:13)
    at C:\Users\User\AppData\Local\Programs\patchbay\resources\app.asar\node_modules\pull-reader\index.js:66:9
    at C:\Users\User\AppData\Local\Programs\patchbay\resources\app.asar\node_modules\pull-reader\index.js:20:7
    at drain (C:\Users\User\AppData\Local\Programs\patchbay\resources\app.asar\node_modules\stream-to-pull-stream\index.js:126:18)
Error replicating with @5XaVcAJ5DklwuuIkjGz4lwm2rOnMHHovhNg7BFFnyJ8=.ed25519:
   Error: parent stream is closing
    at PacketStream.stream (C:\Users\User\AppData\Local\Programs\patchbay\resources\app.asar\node_modules\ssb-server\node_modules\packet-stream\index.js:46:28)
    at Object.ws.remoteCall (C:\Users\User\AppData\Local\Programs\patchbay\resources\app.asar\node_modules\ssb-server\node_modules\muxrpc\stream.js:116:17)
    at C:\Users\User\AppData\Local\Programs\patchbay\resources\app.asar\node_modules\ssb-server\node_modules\muxrpc\index.js:46:15
    at remoteCall (C:\Users\User\AppData\Local\Programs\patchbay\resources\app.asar\node_modules\ssb-server\node_modules\muxrpc\api.js:40:19)
    at EventEmitter.obj.(anonymous function) [as createHistoryStream] (C:\Users\User\AppData\Local\Programs\patchbay\resources\app.asar\node_modules\ssb-server\node_modules\muxrpc\api.js:25:18)
    at replicate (C:\Users\User\AppData\Local\Programs\patchbay\resources\app.asar\node_modules\ssb-replicate\legacy.js:291:13)
    at EventEmitter.fallback (C:\Users\User\AppData\Local\Programs\patchbay\resources\app.asar\node_modules\ssb-replicate\legacy.js:351:7)
    at Object.onceWrapper (events.js:273:13)
    at EventEmitter.emit (events.js:182:13)
    at C:\Users\User\AppData\Local\Programs\patchbay\resources\app.asar\node_modules\ssb-ebt\index.js:129:15
# AHOY: (main)     quitting

skeetcha avatar Dec 10 '19 05:12 skeetcha

Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward?

stale[bot] avatar Mar 09 '20 05:03 stale[bot]

@mixmix I am also hitting this, using the latest (v8.1.0) Windows installer: ahoy works fine, but patchbay is getting stuck on "loading". First complained about a missing manifest.json file (in .ssb) which I manually added (this one), now I get the following stack trace:

TypeError: Cannot read property 'socialValueStream' of undefined
    at api.sbot.pull.stream (C:\Users\mail\AppData\Local\Programs\patchbay\resources\app.asar\node_modules\patchcore\about\obs.js:77:58)
    at C:\Users\mail\AppData\Local\Programs\patchbay\resources\app.asar\node_modules\patchcore\sbot.js:240:28
    at Array.watch (C:\Users\mail\AppData\Local\Programs\patchbay\resources\app.asar\node_modules\mutant\once-true.js:8:7)
    at Function.Observable.observable.set (C:\Users\mail\AppData\Local\Programs\patchbay\resources\app.asar\node_modules\mutant\value.js:12:25)
    at C:\Users\mail\AppData\Local\Programs\patchbay\resources\app.asar\node_modules\patchcore\sbot.js:89:18
    at C:\Users\mail\AppData\Local\Programs\patchbay\resources\app.asar\node_modules\ssb-client\client.js:78:5
    at next (C:\Users\mail\AppData\Local\Programs\patchbay\resources\app.asar\node_modules\multiserver\compose.js:28:14)
    at C:\Users\mail\AppData\Local\Programs\patchbay\resources\app.asar\node_modules\multiserver\compose.js:34:9
    at _cb (C:\Users\mail\AppData\Local\Programs\patchbay\resources\app.asar\node_modules\multiserver\plugins\shs.js:31:11)
    at C:\Users\mail\AppData\Local\Programs\patchbay\resources\app.asar\node_modules\secret-handshake\protocol.js:123:7
    at Object.cb (C:\Users\mail\AppData\Local\Programs\patchbay\resources\app.asar\node_modules\secret-handshake\protocol.js:57:11)
    at drain (C:\Users\mail\AppData\Local\Programs\patchbay\resources\app.asar\node_modules\pull-reader\index.js:39:14)
    at more (C:\Users\mail\AppData\Local\Programs\patchbay\resources\app.asar\node_modules\pull-reader\index.js:55:13)
    at C:\Users\mail\AppData\Local\Programs\patchbay\resources\app.asar\node_modules\pull-reader\index.js:66:9
    at C:\Users\mail\AppData\Local\Programs\patchbay\resources\app.asar\node_modules\pull-reader\index.js:20:7
    at drain (C:\Users\mail\AppData\Local\Programs\patchbay\resources\app.asar\node_modules\stream-to-pull-stream\index.js:126:18)
console.error @ base.html:19

Unless there is some other client that does not require a node installation and that has keyboard navigation, this issue is a blocker for me being able to use ssb again =(

AljoschaMeyer avatar Sep 04 '20 14:09 AljoschaMeyer

I'll have a look when I have time. I've been working slowly in a side branch which updates a bunch of modules, maybe that will magically fix this

mixmix avatar Sep 04 '20 17:09 mixmix

Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward?

stale[bot] avatar Dec 04 '20 22:12 stale[bot]

I think I am having this issue now

Salvakiya avatar Jan 13 '21 05:01 Salvakiya