Description
From chat, to be investigated:
Matouš Jan Fialka
8:07 pm
Hi. I ran into some serious troubles, see console output after I opened my another SB instance after few weeks… log. I tried: 1. reload several times, 2. reset client, reload several times, completely clear browser data, reload several times, still the same. I can see raw content of any page "blink" for a second and then I get empty or default page (index, SETTINGS, etc.) Can somebody help me with this, please?
Most suspisious are the messages about content not changed etc. If there are no data (closed all tabs, clear page data, ran in private window, etc.) how is that possible? And the weirdest thing is I can see the real content "blink" for a small amount of time and then either empty page is displayed or default page.
I am running one instance on "server" (should be the source of truth), one on my mobile phone (that is OK AFAIK, I hope, at least looks good), and the third one on this computer. Firefox is updated, etc.
(edited)
OK, I restarted the browser, no change, it is still happenning. There is only single tab opened with SB.
Matouš Jan Fialka
8:24 pm
Hm, there are also some conflicts too. At the beginning, when I erase everything possible from the browser and go to the SB URL, I see default index, I see it's syncing (the circular progress appears showing the percents) but that's all. Then it ends up in exactly the state as described above.
I also tried to force reindex, with no success at all. Interesting is that the TreeView plug shows itself, if invoked, but it does not show anything, it's empty. I have no idea how to debug it more, sorry. Just to add, running on Edge build on the "server" instance, @zef would know, we were solving something about Lua today.
(edited)
BTW, it's not the first time I ran into some weird issues with SB on upgrades etc. But this time it's quite bad, I must say, because in the cases before, I just, closed tab, reloaded few times, reset client etc., and it started to work again. This is, sadly, not the case. 😢
Idea: some race between the 3 clients?
Matouš Jan Fialka
8:41 pm
H, now I ran update of plugs on my mobile instance and lost it too. The same behaviour. So it may be something with core plugs not updated properly? I have no idea how to debug it on mobile Firefox at all (I do not run dev version, perhaps I should have)… 😭
Zef Hemel
8:42 pm
Ok this is very confusing. You're running in sync mode? Does this happen if you're not in sync mode?
And not have 3 clients at the same time?
You can probably try deleting all files under _plug/ on your server, reload and see if that changes something
Then if you're in a stable state, run Plugs: Update again
Matouš Jan Fialka
9:01 pm
@zef, give me a second, I think I got it.
@zef Yeah! One plug was empty .js file in the _plugs/ dir. Why? Dunno. I downloaded it manually via raw url from GH and now it seems the content continues to sync. BTW, everytime I add a plug, I need to download it manualy first to the _plugs/ dir. The Plugs: Update command does not yield any error. Also, I had bad times to see from the SB logs what's happenning, because the message "some page was requested" without any instance identification is really not helpful. 😃
Maybe, once new instance is deployed, it should be given unique identity to be later seen in the logs (and from it, of course, via some command or message).
@zef This is not good. All 3 instances, hopefully, run OK now, but the index file is rewritten with the default one and there is a conflict file with my original one (I use another file as index via SETTINGS).
Matouš Jan Fialka
9:16 pm
I think this case shows some rather big issues in (1) how syncing works, (2) that the primary instance (aka server) should be always source of truth until everything is really synced properly (I know that's very hard to achieve), (3) no file was touched by me from any instance, especially not the index file, and it got changed (may it happen to other file as well?) To explain why I run in sync mode (which is annoying if I lose my VPN to the server) - I had to, because there were even more serious issues when not running in the sync mode (corrupted page contents, I edited some page and ended up in a mess several times - maybe it's fixed but I haven't yet managed to even try again). (4) If something fails, such as that some plug could not be downloaded, I should know about it and notified, the sync on the instance should be rollbacked or something, dunno. I know very well these things are very hard and also understand why you would like to have only one mode. Let's do it, if it will be "bulletproof" afterwards. SilverBullet is marvelous, excellent piece of software, but these petite distractions can rise to huge outages (as I saw today). Is there anything we can do, together, about it? There are many experienced hackers here, perhaps they can review some core parts and identify the major flaws? Such a beautiful and extremely useful software as SilverBullet, with all the great ideas of yours, deserves perfect core functioning. (Sorry for the speach, I lost lot of time debugging the issue today, thank you for otherwise excellent software, I am great fan of SB, trust me).
Matouš Jan Fialka
9:25 pm
@zef If I could reproduce for example the (3), I would had filled and issue, but those things happened to me without any logic. But I've seen there are some issues on GH pending that sound quite familiar to those of mine.
Matouš Jan Fialka
9:33 pm
@zef I've just realized that SETTINGS.md on the server was overwritten with the default one as well and there was also a conflicting file with the original content, although both the two other instances are clearly still seeing the correct one (why???). I've corrected it manually on the server side and I hope it will not appear again.
Matouš Jan Fialka
9:40 pm
OK, it was the mobile instance that was thinking it has truth now. To fix it again I had to: (1) change SETTING.md on another instance (typed something in it), then it got synced and also the mobile got it right then. (2) Then I had to reload on index several times and now, as I hope, I have all 3 versions in sync again and can continue to use the great SB from 3 different places at once. 🥰
9:41
I have no real insight why all of this was happenning, it was real mess to me, but perhaps this lengthy report can help to improve things.