ssbc / patchbay

An alternative Secure Scuttlebutt client interface that is fully compatible with Patchwork
http://www.scuttlebutt.nz
386 stars 78 forks source link

Patchbay (8.0.1) fails to launch after update #344

Closed georgeowell closed 4 years ago

georgeowell commented 5 years ago

Operating system: Ubuntu 18.04 (GNOME 3)

After updating Patchbay to patchbay-Linux-8.0.1-x86_64 via AppImage (from Patchbay-linux-7.15.1-x86_64), I launched Patchbay and interacted with Ahoy and then was able to access the Scuttleverse as expected.

The next time I opened Patchbay, I was greeted by the Ahoy labelled window that was totally blank (white) which seemed to have hung. Nothing happened, even after five minutes so I closed Patchbay.

Now neither Patchbay or Patchwork (Patchwork-3.11.6-linux-x86_64) will launch or any older versions I try. When I launch any of these AppImages using the terminal, I get the following errors:

patchbay-Linux-8.0.1-x86_64

Screenshot from 2019-06-03 19-25-16

'/home/leo/Downloads/patchbay-Linux-8.0.1-x86_64.AppImage' 
# AHOY: (main)     starting UI
SyntaxError: Unexpected string in JSON at position 38
    at JSON.parse (<anonymous>)
    at exports.parse (/tmp/.mount_patchbE6IdzR/resources/app.asar/node_modules/rc/lib/utils.js:15:17)
    at addConfigFile (/tmp/.mount_patchbE6IdzR/resources/app.asar/node_modules/rc/index.js:30:20)
    at Array.forEach (<anonymous>)
    at module.exports (/tmp/.mount_patchbE6IdzR/resources/app.asar/node_modules/rc/index.js:43:36)
    at module.exports (/tmp/.mount_patchbE6IdzR/resources/app.asar/node_modules/ssb-config/inject.js:6:12)
    at State.watch (/tmp/.mount_patchbE6IdzR/resources/app.asar/node_modules/ssb-ahoy/views/config/state.js:37:20)
    at watch (/tmp/.mount_patchbE6IdzR/resources/app.asar/node_modules/mutant/watch.js:7:5)
    at State (/tmp/.mount_patchbE6IdzR/resources/app.asar/node_modules/ssb-ahoy/views/config/state.js:36:3)
    at module.exports (/tmp/.mount_patchbE6IdzR/resources/app.asar/node_modules/ssb-ahoy/views/config/index.js:14:17)
^C# AHOY: (main)     quitting

Patchbay-linux-7.15.1-x86_64

'/home/user/Downloads/Patchbay-linux-7.15.1-x86_64.AppImage' 
installed: X-AppImage-BuildId=3fdbca80-dcaa-11a8-1089-c949320ceefa image: X-AppImage-BuildId=3fdbca80-dcaa-11a8-1089-c949320ceefa
STARTING electron
STARTING SBOT
LOADING config
SyntaxError: Unexpected string in JSON at position 38
    at JSON.parse (<anonymous>)
    at exports.parse (/tmp/.mount_PatchbNDyIG3/app/resources/app.asar/node_modules/rc/lib/utils.js:15:17)
    at addConfigFile (/tmp/.mount_PatchbNDyIG3/app/resources/app.asar/node_modules/rc/index.js:30:20)
    at Array.forEach (<anonymous>)
    at module.exports (/tmp/.mount_PatchbNDyIG3/app/resources/app.asar/node_modules/rc/index.js:43:36)
    at module.exports (/tmp/.mount_PatchbNDyIG3/app/resources/app.asar/node_modules/ssb-config/inject.js:15:16)
    at Object.nest [as load] (/tmp/.mount_PatchbNDyIG3/app/resources/app.asar/config.js:18:16)
    at Object.<anonymous> (/tmp/.mount_PatchbNDyIG3/app/resources/app.asar/server.js:32:55)
    at Object.<anonymous> (/tmp/.mount_PatchbNDyIG3/app/resources/app.asar/server.js:39:3)
    at Module._compile (module.js:642:30)

Patchwork-3.11.6-linux-x86_64

'/home/user/Downloads/ssb-patchwork-3.12.0-x86_64.AppImage' 
SyntaxError: Unexpected string in JSON at position 38
    at JSON.parse (<anonymous>)
    at exports.parse (/tmp/.mount_ssb-paXyaKhW/resources/app.asar/node_modules/rc/lib/utils.js:15:17)
    at addConfigFile (/tmp/.mount_ssb-paXyaKhW/resources/app.asar/node_modules/rc/index.js:30:20)
    at Array.forEach (<anonymous>)
    at module.exports (/tmp/.mount_ssb-paXyaKhW/resources/app.asar/node_modules/rc/index.js:43:36)
    at module.exports (/tmp/.mount_ssb-paXyaKhW/resources/app.asar/node_modules/ssb-config/inject.js:6:12)
    at setupContext (/tmp/.mount_ssb-paXyaKhW/resources/app.asar/index.js:170:43)
    at App.electron.app.on (/tmp/.mount_ssb-paXyaKhW/resources/app.asar/index.js:52:3)
    at App.emit (events.js:187:15)

sbot 0.0.3

sbot server
undefined:5
}  "friendPub": {
   ^

SyntaxError: Unexpected string in JSON at position 38
    at JSON.parse (<anonymous>)
    at exports.parse (/usr/local/lib/node_modules/scuttlebot/node_modules/rc/lib/utils.js:15:17)
    at addConfigFile (/usr/local/lib/node_modules/scuttlebot/node_modules/rc/index.js:30:20)
    at Array.forEach (<anonymous>)
    at module.exports (/usr/local/lib/node_modules/scuttlebot/node_modules/rc/index.js:43:36)
    at module.exports (/usr/local/lib/node_modules/scuttlebot/node_modules/ssb-config/inject.js:15:10)
    at Object.<anonymous> (/usr/local/lib/node_modules/scuttlebot/bin.js:25:42)
    at Module._compile (module.js:652:30)
    at Object.Module._extensions..js (module.js:663:10)
    at Module.load (module.js:565:32)

Anyone got any debugging advice? Looks like some sort of issue with Ahoy. Currently unable to access SSB at all :cry:

Opened an issue on Patchwork tracker also as it effects it: https://github.com/ssbc/patchwork/issues/1071

Happy0 commented 5 years ago

See if you open your ~/.ssb/config file? Is the JSON in there malformed?

You can run it through this thing to check: https://jsonlint.com/

georgeowell commented 5 years ago

See if you open your ~/.ssb/config file? Is the JSON in there malformed?

You can run it through this thing to check: https://jsonlint.com/

There was actually a comma missing in there which I have now corrected. Doesn't seem to have made any difference to the original problem though :disappointed:

This is what ~/.ssb/config looks like now:

{
  "friends": {
    "hops": 2
  },
}  "friendPub": {
    "hops": 3
  },
  "gossip": {
    "friends": true,
    "global": true
  }
}

Should I try emptying that file?

georgeowell commented 5 years ago

Interesting! So I just did that and it worked!

The sbot log was a good hint:

sbot server
undefined:5
}  "friendPub": {
   ^

When I take out the new friendPub setting, everything works as usual. This is is my ~/.ssb/config now:

{
    "friends": {
        "hops": 2
    },
    "gossip": {
        "friends": true,
        "global": true
    }
}
georgeowell commented 5 years ago

Could someone else test if this happens for them if they mess with the pub privacy slider in Patchbay?

Happy0 commented 5 years ago

@georgeowell - i wasn't able to reproduce it by doing that.

@mixmix - has the 'ahoy' screen always prevented you from launching the app if you accidentally malform your config? or was there a release that didn't happen with?

wondering if you mouse slipped after clicking 'edit config' or something, haha

mixmix commented 5 years ago

I remember madding ahoy not save config if it says malformed, not sure if it blocks you from launching. Might need to check that logic.

On Fri, 7 Jun 2019, 18:56 Gordon Martin, notifications@github.com wrote:

@georgeowell https://github.com/georgeowell - i wasn't able to reproduce it by doing that.

@mixmix https://github.com/mixmix - has the 'ahoy' screen always prevented you from launching the app if you accidentally malform your config? or was there a release that didn't happen with?

wondering if you mouse slipped after clicking 'edit config' or something, haha

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/ssbc/patchbay/issues/344?email_source=notifications&email_token=AAUK3HVKZC727PUR4DFMGTDPZIBABA5CNFSM4HSNM2LKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODXFAKDA#issuecomment-499778828, or mute the thread https://github.com/notifications/unsubscribe-auth/AAUK3HRFJKQU3KJRVCUZFJ3PZIBABANCNFSM4HSNM2LA .

beroal commented 5 years ago

This is what ~/.ssb/config looks like now:

{
  "friends": {
    "hops": 2
  },
}  "friendPub": {
    "hops": 3
  },
  "gossip": {
    "friends": true,
    "global": true
  }
}

Emm, the curly bracket before "friendPub" signals the end of data. So this file is syntactically incorrect. Is it just me seeing this?

stale[bot] commented 4 years ago

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