Outline 1.0.2 for macOS does not persistently store servers, so if you quit Outline and open it again, your servers are not there anymore.
Issues like this, #98 or #93 should not pass the tests before getting into the Mac App Store.
@bjrnio, thanks for your feedback and sorry that you're experiencing this issue. We are aware of this problem and are trying to figure out ways to fix it; unfortunately it has been challenging to reproduce it in a development environment. I have some questions that could help us:
~/Library/Containers/org.outline.macos.client/Data/Library/Application\ Support/org.outline.macos.client/.I've been trying to reproduce it and it's not exactly as I though it was, but:
On a clean system:
I think it might have something to do with the "Quit" button on the menu, when I quitted Outline with CMD+Q, the issue went away, but it just might be a coincidence.
# Outline installed, servers gone:
$ ls ~/Library/Containers/org.outline.macos.client/Data/Library/Application\ Support/org.outline.macos.client/
ls: /Users/caretaker/Library/Containers/org.outline.macos.client/Data/Library/Application Support/org.outline.macos.client/: No such file or directory
macOS: 10.13.4
Outline: 1.0.2
Note 1: I tested it on two different Macbook models, both running 10.13.4 and Outline 1.0.2
Note 2: sorry if I'm not doing too much research, right now I'm pretty busy.
@bjrnio, thank you for following up; this is very useful. I'll try to reproduce and get back to you.
I was able to reproduce this issue. These are the steps I followed for a successful installation (macOS 10.13.2):
~/Library/Containers/org.outline.macos.client/Data/Library/Preferences/org.outline.macos.client.plist
.~/Library/Containers/org.outline.macos.client/Data/Library/Application\ Support/org.outline.macos.client/.Now, onto the issue.
cfprefsd is a daemon that provides preferences services for the CFPreferences and NSUserDefaults APIs. cfprefsd to enter an state in which it is unable to create the plist file.Issue reproduction steps:
cfprefsd into this state: quit Outline and delete ~/Library/Containers/org.outline.macos.client/Data/Library/Application\ Support/org.outline.macos.client.cfprefsd can get into this state, but this report suggest there is a bad interaction between the app sandbox and cfprefsd when deleting the container directory. May be releated to caching in cfprefsd.cfprefsd will fail to create the plist with the WebView's preferences. The logs will show the following error message when the app attempts to persist the WebView's preferences:attempt to set <private> for key in <private> in non-persistent preferences domain CFPrefsPlistSource<0x6000000e8200> (Domain: org.outline.macos.client, User: kCFPreferencesCurrentUser, ByHost: No, Container: (null), Contents Need Refresh: Yes)
As detailed in this post, the solution is to reboot the machine or kill the cfprefsd process via:
ps auwx | grep cfprefsd | grep -v grep | awk '{print $2}' | xargs sudo kill -2 and re-start the app.
Unfortunately, this is not the end of the story... I have noticed that the first time the app runs (after installation or after deleting the container directory), it is unable to create the local storage database files, even though the WebView's plist is created successfully. However, restarting it causes the servers to be persisted.
I have yet to find the root cause for this problem, but a potential solution could be to restart the app on first run to ensure the DB files can be created on subsequent runs. As for the issue with cfprefsd we could attempt to restart it, though that could be tricky given that our app is sandboxed and the command requires root access.
@bjrnio, quitting the app through cmd+Q and the menu yielded the same result in my testing. It seems unlikely to me that both of your machines would have the cfprefsd daemon in a bad state, so there may well be other factors at play.
If you have the time, could you please reproduce the successful installation instructions (that is, uninstall Outline, delete its container directory, and reboot the machine) to rule out other problems? Thanks.
Yeah sure!
I plan to reproduce both, success and failure on both machines this weekend, with a more rigorous procedure. I just don't have the time right now.
What I did to reproduce the issue, and subsequently fix it:
Outline.app and org.outline.macos.client, as well as some other Outline-related folders (running $ sudo find / -name "*outline*" yields to no related results).So it looks like what you said about first-run persistance.
I guess the difference of outcome of Cmd+Q was just me quitting Outline at step 4. and it _felt_ like it fixed it, because from 8. on, you can quit and open Outline.app no matter how many times, that servers persist.
As for the issue with cfprefsd we could attempt to restart it, though that could be tricky given that our app is sandboxed and the command requires root access.
Do not give Outline.app root access, please. Outline.app uses ElectronJS and with the current state of Electron's security, where it's having plenty RCE bugs found by the minute, I wouldn't use an app that runs on top of Electron with root permissions.
Thanks for following up, @bjrnio. I'll work on a fix for the first-time persistence issue.
The Outline macOS client is developed with Cordova, not Electron, but I agree with you in that it should not have root access.
This issue is still present in Outline version 1.1.1
It's been two months...anything? Fortunately our Outline deployment was a sort of dry run for this NGO client...I guess we'll be using Algo.
@bmy Sorry, I'm afraid we haven't produced a fix for this issue yet.
Now experiencing this with macOS outline manager too. Now both client and manager servers are gone.
Sad to say but this project is unreliable and unsuitable for prime time. Insane that this has Google (“Alphabet”) backing. In the morning I’ll move my NGO client – who relies on VPN and other tech in conflict affected and high risk areas – to Algo (we weren’t using Outline in production anyway, only testing it). I recommend that anyone reading this check Algo out.
On Sep 4, 2018, at 18:15, James Xu notifications@github.com wrote:
Now experiencing this with macOS outline manager too. Now both client and manager servers are gone.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
Oh man, still happening for me on Mojave. @ricardbejarano Thank you so much for helping us work through this.
I think the first/second run thing might be a red herring:
rm -fR ~/Library/Containers/org.outline.macos.client/Applications/Outline.app/Contents/MacOS/Outline/Applications/Outline.app/Contents/MacOS/OutlineRepeat the last few steps as often as you like, you'll always see the TOS - even though that just sets something in localStorage. Maybe there's something about what/how we persist following a connection that somehow - completely accidentally - works around the bug?
@alalamav FYI
So, I spent a few hours at this on Friday. There's something really weird going on with Web Storage: some weird sequence of actions is required in order to initialise Web Storage properly. I tried all sorts of things, e.g. reading and writing to multiple Web Storage buckets on startup but nothing I did reliably initialises the Web Storage database - you basically have to fiddle about with the app and connect/disconnect a few times in order for it to initialise. So weird, sorry.