sillsdev / chorus

End-user collaboration library via 3-way xml merging and hg dvcs under the hood
6 stars 26 forks source link

Outdated Mercurial (version 3.0.1) causes "SSL: TLSV1_ALERT_PROTOCOL_VERSION" in Linux Flatpak install #331

Open Marcool04 opened 10 months ago

Marcool04 commented 10 months ago

Hi, I have been using FieldWork Language Explorer for some time on an Archlinux machine, first via a windows virtual machine, and now with a Flatpak installation on Archlinux. I also have my own mercurial installation on a server of mine, but I am having issues with the send/receive function of FLEx, that is implemented - unless I'm very much mistaken - through chorus, hence me posting here (please let me know if this is not the right way to report this).

I have the following output on failure to sync:

Syncing...
Started at 2024-01-30 15:46:55Z
Local User: mark
LanguageForge User: flex
Repository URI: http://hg.archraspberrypi.tk/fieldwork_language_explorer
Local Directory: [PROJECT-PATH]/tungag

Executing: recover 
standerr: no interrupted transaction available

Executing: addremove -s 100 -I **.wav
Executing: parents --template "changeset:{rev}:{node|short}
branch:{branches}
user:{author}
date:{date|rfc822date}
tag:{tags}
summary:{desc}
parent:{p1rev}:{p1node}"
standout: changeset:126:dc2ebed055e6
branch:7500002.7000072
user:mark
date:Sun, 21 Jan 2024 13:17:20 +0100
tag:tip
summary:[FLExBridge: 1.0.0] sync
parent:125:021330251315b7e38bdec4a8972b39a86660e079

changeset:126:dc2ebed055e6
branch:7500002.7000072
user:mark
date:Sun, 21 Jan 2024 13:17:20 +0100
tag:tip
summary:[FLExBridge: 1.0.0] sync
parent:125:021330251315b7e38bdec4a8972b39a86660e079
Executing and caching: log -r0 --template "{node}" 
standout: a62f6a643784668b70be7f081c1206ed5fe3db88

Executing and caching: log -r126 --template "{node}" 
standout: dc2ebed055e6a4760ead4036486d890eeda7dc74

Using cached result: log -r0 --template "{node}" 
standout: a62f6a643784668b70be7f081c1206ed5fe3db88

Executing and caching: log -r125 --template "{node}" 
standout: 021330251315b7e38bdec4a8972b39a86660e079

Executing: parents --template "changeset:{rev}:{node|short}
branch:{branches}
user:{author}
date:{date|rfc822date}
tag:{tags}
summary:{desc}
parent:{p1rev}:{p1node}"
standout: changeset:126:dc2ebed055e6
branch:7500002.7000072
user:mark
date:Sun, 21 Jan 2024 13:17:20 +0100
tag:tip
summary:[FLExBridge: 1.0.0] sync
parent:125:021330251315b7e38bdec4a8972b39a86660e079

changeset:126:dc2ebed055e6
branch:7500002.7000072
user:mark
date:Sun, 21 Jan 2024 13:17:20 +0100
tag:tip
summary:[FLExBridge: 1.0.0] sync
parent:125:021330251315b7e38bdec4a8972b39a86660e079
Executing and caching: log -r0 --template "{node}" 
standout: a62f6a643784668b70be7f081c1206ed5fe3db88

Executing and caching: log -r126 --template "{node}" 
standout: dc2ebed055e6a4760ead4036486d890eeda7dc74

Using cached result: log -r0 --template "{node}" 
standout: a62f6a643784668b70be7f081c1206ed5fe3db88

Executing and caching: log -r125 --template "{node}" 
standout: 021330251315b7e38bdec4a8972b39a86660e079

Storing changes in local repository...
Split up project file: tungag.fwdata
Writing the linguistics data....
Writing reversal data....
Writing morphology and syntax data....
Writing lexical data....
Writing text corpus data....
Writing wordform and punctuation data....
Writing discourse data....
Writing phonology data....
Writing the anthropology data....
Writing the other data....
Writing the general data....
Writing user-defined list data....
Writing language project data....
Copying settings files...
Finished splitting up project file: tungag.fwdata
Executing: status  -mau  -X "~~*.txt" -X "**.NewChorusNotes" -X "**.fwdata" -X "**.fwdata-replaced" -X "**.fwdata-x" -X "**.fwdb" -X "**.bad" -X "**.bak" -X "**.flextext" -X "**.fwbackup" -X "**.fwstub" -X "**.lint" -X "**.log" -X "**.orig" -X "**.oxekt" -X "**.oxes" -X "**.oxesa" -X "**.tmp" -X "**.xml" -X "**.zip" -X "**.fwdata.lock" -X "**.dupid" -X "Temp/**.*" -X "BackupSettings/**.*" -X "WritingSystemStore/trash/**.*" -X "WritingSystemStore/WritingSystemsToIgnore.xml.ChorusNotes" -X "OtherRepositories/**.*" -X "**.mpa" -X "**.mpe" -X "**.mpg" -X "**.mpeg" -X "**.mpv2" -X "**.mp2" -X "**.mp4" -X "**.mov" -X "**.wmv" -X "**.rm" -X "**.avi" -X "**.wvx" -X "**.m1v" 
standout: M CachedSettings/WritingSystemStore/lcm.ldml
M General/LanguageProject.langproj
M Linguistics/Lexicon/Lexicon_03.lexdb
M WritingSystemStore/lcm.ldml
? CachedSettings/ConfigurationSettings/Dictionary/Preview.css
? CachedSettings/SharedSettings/Mark.ulsx
? CachedSettings/SharedSettings/mark.ulsx
? ConfigurationSettings/Dictionary/Hybrid.fwdictconfig
? ConfigurationSettings/Dictionary/Lexeme.fwdictconfig
? ConfigurationSettings/Dictionary/Preview.css
? ConfigurationSettings/Dictionary/Root.fwdictconfig
? ConfigurationSettings/LexEntry.fwlayout
? ConfigurationSettings/ReversalIndex/en.fwdictconfig
? ConfigurationSettings/ReversalIndex/tpi.fwdictconfig
? SharedSettings/LexiconSettings.plsx
? SharedSettings/Mark.ulsx
? SharedSettings/mark.ulsx
? WritingSystemStore/lcm-fonipa.ldml

Executing: status -d 
Adding files to be tracked ( -I "[PROJECT-PATH]/tungag/**.ChorusNotes" -I "[PROJECT-PATH]/tungag/FLExProject.ModelVersion" -I "[PROJECT-PATH]/tungag/FLExProject.CustomProperties" -I "[PROJECT-PATH]/tungag/do_not_share_project.txt" -I "[PROJECT-PATH]/tungag/.hgignore" -I "[PROJECT-PATH]/tungag/**.list" -I "[PROJECT-PATH]/tungag/**.style" -I "[PROJECT-PATH]/tungag/LinkedFiles/AudioVisual/**.*" -I "[PROJECT-PATH]/tungag/LinkedFiles/Others/**.*" -I "[PROJECT-PATH]/tungag/LinkedFiles/Pictures/**.*" -I "[PROJECT-PATH]/tungag/SupportingFiles/**.*" -I "[PROJECT-PATH]/tungag/CachedSettings/ConfigurationSettings/*.fwlayout" -I "[PROJECT-PATH]/tungag/CachedSettings/ConfigurationSettings/**.fwdictconfig" -I "[PROJECT-PATH]/tungag/CachedSettings/ConfigurationSettings/**Overrides.css" -I "[PROJECT-PATH]/tungag/CachedSettings/WritingSystemStore/*.ldml" -I "[PROJECT-PATH]/tungag/CachedSettings/SharedSettings/*.plsx" -I "[PROJECT-PATH]/tungag/Linguistics/Reversals/**.reversal" -I "[PROJECT-PATH]/tungag/Linguistics/Lexicon/*.lexdb" -I "[PROJECT-PATH]/tungag/Linguistics/TextCorpus/*.textincorpus" -I "[PROJECT-PATH]/tungag/Linguistics/Inventory/*.inventory" -I "[PROJECT-PATH]/tungag/Linguistics/Discourse/Charting.discourse" -I "[PROJECT-PATH]/tungag/Linguistics/**.featsys" -I "[PROJECT-PATH]/tungag/Linguistics/MorphologyAndSyntax/AnalyzingAgents.agents" -I "[PROJECT-PATH]/tungag/Linguistics/MorphologyAndSyntax/MorphAndSynData.morphdata" -I "[PROJECT-PATH]/tungag/Linguistics/Phonology/PhonologicalData.phondata" -I "[PROJECT-PATH]/tungag/Anthropology/DataNotebook.ntbk" -I "[PROJECT-PATH]/tungag/Other/ReferenceSystem.srs" -I "[PROJECT-PATH]/tungag/Other/*.ArchivedDraft" -I "[PROJECT-PATH]/tungag/Other/Translations.trans" -I "[PROJECT-PATH]/tungag/Other/Settings.ImportSetting" -I "[PROJECT-PATH]/tungag/Other/Books/*.bookannotations" -I "[PROJECT-PATH]/tungag/Other/Books/*.book" -I "[PROJECT-PATH]/tungag/General/FLExFilters.filter" -I "[PROJECT-PATH]/tungag/General/FLExAnnotations.annotation" -I "[PROJECT-PATH]/tungag/General/LanguageProject.langproj" -I "[PROJECT-PATH]/tungag/General/UnownedPictures.pictures" -I "[PROJECT-PATH]/tungag/General/VirtualOrdering.orderings" -I "[PROJECT-PATH]/tungag/**.ChorusRescuedFile" -X "[PROJECT-PATH]/tungag/~~*.txt" -X "[PROJECT-PATH]/tungag/**.NewChorusNotes" -X "[PROJECT-PATH]/tungag/**.fwdata" -X "[PROJECT-PATH]/tungag/**.fwdata-replaced" -X "[PROJECT-PATH]/tungag/**.fwdata-x" -X "[PROJECT-PATH]/tungag/**.fwdb" -X "[PROJECT-PATH]/tungag/**.bad" -X "[PROJECT-PATH]/tungag/**.bak" -X "[PROJECT-PATH]/tungag/**.flextext" -X "[PROJECT-PATH]/tungag/**.fwbackup" -X "[PROJECT-PATH]/tungag/**.fwstub" -X "[PROJECT-PATH]/tungag/**.lint" -X "[PROJECT-PATH]/tungag/**.log" -X "[PROJECT-PATH]/tungag/**.orig" -X "[PROJECT-PATH]/tungag/**.oxekt" -X "[PROJECT-PATH]/tungag/**.oxes" -X "[PROJECT-PATH]/tungag/**.oxesa" -X "[PROJECT-PATH]/tungag/**.tmp" -X "[PROJECT-PATH]/tungag/**.xml" -X "[PROJECT-PATH]/tungag/**.zip" -X "[PROJECT-PATH]/tungag/**.fwdata.lock" -X "[PROJECT-PATH]/tungag/**.dupid" -X "[PROJECT-PATH]/tungag/Temp/**.*" -X "[PROJECT-PATH]/tungag/BackupSettings/**.*" -X "[PROJECT-PATH]/tungag/WritingSystemStore/trash/**.*" -X "[PROJECT-PATH]/tungag/WritingSystemStore/WritingSystemsToIgnore.xml.ChorusNotes" -X "[PROJECT-PATH]/tungag/OtherRepositories/**.*" -X "[PROJECT-PATH]/tungag/**.mpa" -X "[PROJECT-PATH]/tungag/**.mpe" -X "[PROJECT-PATH]/tungag/**.mpg" -X "[PROJECT-PATH]/tungag/**.mpeg" -X "[PROJECT-PATH]/tungag/**.mpv2" -X "[PROJECT-PATH]/tungag/**.mp2" -X "[PROJECT-PATH]/tungag/**.mp4" -X "[PROJECT-PATH]/tungag/**.mov" -X "[PROJECT-PATH]/tungag/**.wmv" -X "[PROJECT-PATH]/tungag/**.rm" -X "[PROJECT-PATH]/tungag/**.avi" -X "[PROJECT-PATH]/tungag/**.wvx" -X "[PROJECT-PATH]/tungag/**.m1v"
Executing: add  -I "[PROJECT-PATH]/tungag/**.ChorusNotes" -I "[PROJECT-PATH]/tungag/FLExProject.ModelVersion" -I "[PROJECT-PATH]/tungag/FLExProject.CustomProperties" -I "[PROJECT-PATH]/tungag/do_not_share_project.txt" -I "[PROJECT-PATH]/tungag/.hgignore" -I "[PROJECT-PATH]/tungag/**.list" -I "[PROJECT-PATH]/tungag/**.style" -I "[PROJECT-PATH]/tungag/LinkedFiles/AudioVisual/**.*" -I "[PROJECT-PATH]/tungag/LinkedFiles/Others/**.*" -I "[PROJECT-PATH]/tungag/LinkedFiles/Pictures/**.*" -I "[PROJECT-PATH]/tungag/SupportingFiles/**.*" -I "[PROJECT-PATH]/tungag/CachedSettings/ConfigurationSettings/*.fwlayout" -I "[PROJECT-PATH]/tungag/CachedSettings/ConfigurationSettings/**.fwdictconfig" -I "[PROJECT-PATH]/tungag/CachedSettings/ConfigurationSettings/**Overrides.css" -I "[PROJECT-PATH]/tungag/CachedSettings/WritingSystemStore/*.ldml" -I "[PROJECT-PATH]/tungag/CachedSettings/SharedSettings/*.plsx" -I "[PROJECT-PATH]/tungag/Linguistics/Reversals/**.reversal" -I "[PROJECT-PATH]/tungag/Linguistics/Lexicon/*.lexdb" -I "[PROJECT-PATH]/tungag/Linguistics/TextCorpus/*.textincorpus" -I "[PROJECT-PATH]/tungag/Linguistics/Inventory/*.inventory" -I "[PROJECT-PATH]/tungag/Linguistics/Discourse/Charting.discourse" -I "[PROJECT-PATH]/tungag/Linguistics/**.featsys" -I "[PROJECT-PATH]/tungag/Linguistics/MorphologyAndSyntax/AnalyzingAgents.agents" -I "[PROJECT-PATH]/tungag/Linguistics/MorphologyAndSyntax/MorphAndSynData.morphdata" -I "[PROJECT-PATH]/tungag/Linguistics/Phonology/PhonologicalData.phondata" -I "[PROJECT-PATH]/tungag/Anthropology/DataNotebook.ntbk" -I "[PROJECT-PATH]/tungag/Other/ReferenceSystem.srs" -I "[PROJECT-PATH]/tungag/Other/*.ArchivedDraft" -I "[PROJECT-PATH]/tungag/Other/Translations.trans" -I "[PROJECT-PATH]/tungag/Other/Settings.ImportSetting" -I "[PROJECT-PATH]/tungag/Other/Books/*.bookannotations" -I "[PROJECT-PATH]/tungag/Other/Books/*.book" -I "[PROJECT-PATH]/tungag/General/FLExFilters.filter" -I "[PROJECT-PATH]/tungag/General/FLExAnnotations.annotation" -I "[PROJECT-PATH]/tungag/General/LanguageProject.langproj" -I "[PROJECT-PATH]/tungag/General/UnownedPictures.pictures" -I "[PROJECT-PATH]/tungag/General/VirtualOrdering.orderings" -I "[PROJECT-PATH]/tungag/**.ChorusRescuedFile" -X "[PROJECT-PATH]/tungag/~~*.txt" -X "[PROJECT-PATH]/tungag/**.NewChorusNotes" -X "[PROJECT-PATH]/tungag/**.fwdata" -X "[PROJECT-PATH]/tungag/**.fwdata-replaced" -X "[PROJECT-PATH]/tungag/**.fwdata-x" -X "[PROJECT-PATH]/tungag/**.fwdb" -X "[PROJECT-PATH]/tungag/**.bad" -X "[PROJECT-PATH]/tungag/**.bak" -X "[PROJECT-PATH]/tungag/**.flextext" -X "[PROJECT-PATH]/tungag/**.fwbackup" -X "[PROJECT-PATH]/tungag/**.fwstub" -X "[PROJECT-PATH]/tungag/**.lint" -X "[PROJECT-PATH]/tungag/**.log" -X "[PROJECT-PATH]/tungag/**.orig" -X "[PROJECT-PATH]/tungag/**.oxekt" -X "[PROJECT-PATH]/tungag/**.oxes" -X "[PROJECT-PATH]/tungag/**.oxesa" -X "[PROJECT-PATH]/tungag/**.tmp" -X "[PROJECT-PATH]/tungag/**.xml" -X "[PROJECT-PATH]/tungag/**.zip" -X "[PROJECT-PATH]/tungag/**.fwdata.lock" -X "[PROJECT-PATH]/tungag/**.dupid" -X "[PROJECT-PATH]/tungag/Temp/**.*" -X "[PROJECT-PATH]/tungag/BackupSettings/**.*" -X "[PROJECT-PATH]/tungag/WritingSystemStore/trash/**.*" -X "[PROJECT-PATH]/tungag/WritingSystemStore/WritingSystemsToIgnore.xml.ChorusNotes" -X "[PROJECT-PATH]/tungag/OtherRepositories/**.*" -X "[PROJECT-PATH]/tungag/**.mpa" -X "[PROJECT-PATH]/tungag/**.mpe" -X "[PROJECT-PATH]/tungag/**.mpg" -X "[PROJECT-PATH]/tungag/**.mpeg" -X "[PROJECT-PATH]/tungag/**.mpv2" -X "[PROJECT-PATH]/tungag/**.mp2" -X "[PROJECT-PATH]/tungag/**.mp4" -X "[PROJECT-PATH]/tungag/**.mov" -X "[PROJECT-PATH]/tungag/**.wmv" -X "[PROJECT-PATH]/tungag/**.rm" -X "[PROJECT-PATH]/tungag/**.avi" -X "[PROJECT-PATH]/tungag/**.wvx" -X "[PROJECT-PATH]/tungag/**.m1v" 
Committing "[FLExBridge: 1.0.0] sync"
mark committing with comment: [FLExBridge: 1.0.0] sync
Executing: ci -u "mark" -m "[FLExBridge: 1.0.0] sync" 

Executing: status --change tip
standout: M CachedSettings/WritingSystemStore/lcm.ldml
M General/LanguageProject.langproj
M Linguistics/Lexicon/Lexicon_03.lexdb
M WritingSystemStore/lcm.ldml

M CachedSettings/WritingSystemStore/lcm.ldml
M General/LanguageProject.langproj
M Linguistics/Lexicon/Lexicon_03.lexdb
M WritingSystemStore/lcm.ldml
Validating CachedSettings/WritingSystemStore/lcm.ldml
Validating General/LanguageProject.langproj
Validating Linguistics/Lexicon/Lexicon_03.lexdb
Validating WritingSystemStore/lcm.ldml
Executing: parents --template "changeset:{rev}:{node|short}
branch:{branches}
user:{author}
date:{date|rfc822date}
tag:{tags}
summary:{desc}
parent:{p1rev}:{p1node}"
standout: changeset:127:68a92d84c743
branch:7500002.7000072
user:mark
date:Tue, 30 Jan 2024 16:47:04 +0100
tag:tip
summary:[FLExBridge: 1.0.0] sync
parent:126:dc2ebed055e6a4760ead4036486d890eeda7dc74

changeset:127:68a92d84c743
branch:7500002.7000072
user:mark
date:Tue, 30 Jan 2024 16:47:04 +0100
tag:tip
summary:[FLExBridge: 1.0.0] sync
parent:126:dc2ebed055e6a4760ead4036486d890eeda7dc74
Executing and caching: log -r0 --template "{node}" 
standout: a62f6a643784668b70be7f081c1206ed5fe3db88

Executing and caching: log -r127 --template "{node}" 
standout: 68a92d84c743ff4c99f6f12d12ebddffa9e9ca34

Using cached result: log -r0 --template "{node}" 
standout: a62f6a643784668b70be7f081c1206ed5fe3db88

Executing and caching: log -r126 --template "{node}" 
standout: dc2ebed055e6a4760ead4036486d890eeda7dc74

Using cached result: log -r0 --template "{node}" 
standout: a62f6a643784668b70be7f081c1206ed5fe3db88

Connecting to hg.archraspberrypi.tk...
Using cached result: log -r0 --template "{node}" 
standout: a62f6a643784668b70be7f081c1206ed5fe3db88

Pinging hg.archraspberrypi.tk...
Ping took 36 milliseconds
Receiving any changes from hg.archraspberrypi.tk
(hg.archraspberrypi.tk is http://flex:********@hg.archraspberrypi.tk/fieldwork_language_explorer)
Initiating Normal Transport
Executing: tip --template "changeset:{rev}:{node|short}
branch:{branches}
user:{author}
date:{date|rfc822date}
tag:{tags}
summary:{desc}
"
standout: changeset:127:68a92d84c743
branch:7500002.7000072
user:mark
date:Tue, 30 Jan 2024 16:47:04 +0100
tag:tip
summary:[FLExBridge: 1.0.0] sync

changeset:127:68a92d84c743
branch:7500002.7000072
user:mark
date:Tue, 30 Jan 2024 16:47:04 +0100
tag:tip
summary:[FLExBridge: 1.0.0] sync
Using cached result: log -r0 --template "{node}" 
standout: a62f6a643784668b70be7f081c1206ed5fe3db88

Using cached result: log -r127 --template "{node}" 
standout: 68a92d84c743ff4c99f6f12d12ebddffa9e9ca34

Checking for proxy by trying to http-get http://proxycheck.palaso.org...
RobustNetworkOperation.Do()
Executing: pull "http://flex:********@hg.archraspberrypi.tk/fieldwork_language_explorer" 
standerr: abort: error: [SSL: TLSV1_ALERT_PROTOCOL_VERSION] tlsv1 alert protocol version (_ssl.c:727)

Executing: version
standout: Mercurial Distributed SCM (version 3.0.1)
(see http://mercurial.selenic.com for more information)

Copyright (C) 2005-2014 Matt Mackall and others
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Mercurial Distributed SCM (version 3.0.1)
(see http://mercurial.selenic.com for more information)

Copyright (C) 2005-2014 Matt Mackall and others
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Warning: Could not receive from hg.archraspberrypi.tk
Exception: abort: error: [SSL: TLSV1_ALERT_PROTOCOL_VERSION] tlsv1 alert protocol version (_ssl.c:727)

hg command was
pull "http://flex:********@hg.archraspberrypi.tk/fieldwork_language_explorer" 
hg version is Mercurial Distributed SCM (version 3.0.1)
(see http://mercurial.selenic.com for more information)

  at Chorus.VcsDrivers.Mercurial.HgRepository.PullFromTarget (System.String targetLabel, System.String targetUri) [0x00112] in <03c3e6c8d3114a508600fb24b8226210>:0 
  at Chorus.VcsDrivers.Mercurial.HgNormalTransport.Pull () [0x00000] in <03c3e6c8d3114a508600fb24b8226210>:0 
  at Chorus.VcsDrivers.Mercurial.HgRepository.Pull (Chorus.VcsDrivers.RepositoryAddress source, System.String targetUri) [0x00055] in <03c3e6c8d3114a508600fb24b8226210>:0 
  at Chorus.sync.Synchronizer.PullFromOneSource (Chorus.VcsDrivers.Mercurial.HgRepository repo, Chorus.VcsDrivers.RepositoryAddress source, System.Collections.Generic.Dictionary`2[TKey,TValue] connectionAttempt) [0x00102] in <03c3e6c8d3114a508600fb24b8226210>:0 
  at Chorus.sync.Synchronizer.PullFromOthers (Chorus.VcsDrivers.Mercurial.HgRepository repo, System.Collections.Generic.List`1[T] sourcesToTry, System.Collections.Generic.Dictionary`2[TKey,TValue] connectionAttempt) [0x0001e] in <03c3e6c8d3114a508600fb24b8226210>:0 
  at Chorus.sync.Synchronizer.SyncNow (Chorus.sync.SyncOptions options) [0x00081] in <03c3e6c8d3114a508600fb24b8226210>:0 
abort: error: [SSL: TLSV1_ALERT_PROTOCOL_VERSION] tlsv1 alert protocol version (_ssl.c:727)

hg command was
pull "http://flex:********@hg.archraspberrypi.tk/fieldwork_language_explorer" 
hg version is Mercurial Distributed SCM (version 3.0.1)
(see http://mercurial.selenic.com for more information)

Trivially, if I disable the redirect on my server from the http:// to https:// URL, then sync works fine. Also, if I allow deprecated TLSv1, it also works. However, I would rather avoid doing either of those, as they seem like bad solutions to what should be fixable on mercurial's end.

The mercurial version that is bundled in the Flatpak is obviously very very old... 3.0.1 dates back to June 2014, and we are now on 6.5.1! I understand there had probably been a lot of development going on both in Chorus and Fieldworks since then, and that this issue is likely not present in more recent version, but since they aren't available to the Flatpak installers such as myself, is there a way anybody can think of of working around this? I'm open to tinkering and testing stuff. Even rebuilding a flatpak or whatever.

Any help or suggestions would be much appreciated. Best regards, Mark.

hahn-kev commented 10 months ago

Hi Mark,

We ran into this issue recently when we switched over to https only when launching the new language depot. Sadly we are still using an old version of mercurial (upgrade to 6 is on the way though), however you can drop in version 3.3 and that should solve your issues. You can download the version we used here: https://github.com/sillsdev/Mercurial4Chorus/tree/v3.0.3.11/linux-x64/Mercurial as for Flatpak I'm not sure, I don't use linux so I don't know what that would take. Hopefully that works for you. You will have trouble if you try to update to 6.5 as there's some code changes in flex required for that new version, but 3.3 will work fine.

Marcool04 commented 10 months ago

Hi Kevin,

Thanks for the quick answer, for the information and for your suggestion. I tried that, and after a few tweeks I am now stuck on mercurial complaining about there not being a fixutf8 extension enabled in mercurial.ini. The ini file contains this:

[extensions]
eol=
hgext.graphlog=
convert=
# Set fixutf8 to the correct absolute path
#fixutf8=/usr/lib/flexbridge/MercurialExtensions/fixutf8/fixutf8.py

I tried un-commenting that line and setting it to the right path, both absolute on my filesystem, and relative to the flatpack root, or relative to the ini file and mercurial executable. No luck... It still says fixutf8 is not enabled in mercurial.ini.

I also tried to replace the MercurialExtensions folder from my install with the corresponding one in the 3.0.3.11 zip I downloaded from your indications. That didn't help either...

I realize it was probably a long shot to get it to work with just a drop in like this. I'll keep on flipping tls off then back on to sync FLEx data for now if I have to.

Thanks again, Regards, Mrak.

hahn-kev commented 10 months ago

where was the ini file you were modifying? I think there's one inside each repo under repo-name/.hg/hgrc (no .ini extension) this hgrc file overwrites any global config you have on your machine. FLEx writes that file out so I'm guessing that's where the bad path is coming from. I think the thinking was that we dont want FLEx to enable fixutf8 for all mercurial repos on your machine, just the ones for FLEx.

Marcool04 commented 10 months ago

So the mercurial.ini file I was modifying is the one that is here: https://github.com/sillsdev/Mercurial4Chorus/blob/v3.0.3.11/linux-x64/Mercurial/mercurial.ini, once I downloaded the zip for that version and unpacked it into the right place in the Flatpak app.

Indeed, there is an hgrc file in the FLEx project itself, it contains:

...
fixutf8 = /app/lib/flexbridge/MercurialExtensions/fixutf8/fixutf8.py

which is uncommented. Its unclear to me what the root of that path should be. As far as I understand it, Flatpak apps are run sandboxed, probably in a chroot with the /var/lib/flatpak/etc/etc/etc part mounted in /app or something like that. So that path should be correct... Maybe there's another hgrc file somewhere interfering?

marksvc commented 9 months ago

@Marcool04 It may be worth searching with find ~ -name .hgrc -o -name mercurial.ini on your machine, and in the flatpak environment with find /app -name .hgrc -o -name mercurial.ini to find possible other hits. (You can get into the flatpak environment with something like flatpak run org.sil.FieldWorks --command=bash)

I'm glad FieldWorks is working on Arch :).

Marcool04 commented 9 months ago

@marksvc Yeah I had tried something similar already... no luck. The only mercurial.ini is the one in the Mercurial folder itself in the source. I don't have mercurial installed on my laptop locally so nothing anywhere else.

I am glad it's working in Arch too :) Spent too long messing around with virtualbox and a windows-based installation before I realised you were offering a Flatpack which there was every reason should work here and it does! Keep up the good work, all contributors. Will be great when you can get the toolchain updated (Mercurial, and what not...) 👍️

Marcool04 commented 9 months ago

However... getting a shell inside the Flatpack helped me figure out the layout of things a bit better. It was the right mercurial.ini, but I had the wrong path for fixutf8, it should have been:

[extensions]
fixutf8=/app/lib/flexbridge/MercurialExtensions/fixutf8/fixutf8.py

This works now, the bridge starts fine, but I get another error when actually clicking on the "Internet" button:

Traceback (most recent call last):
File "/app/lib/flexbridge/Mercurial/hg", line 36, in <module>
mercurial.util.setbinary(fp)
File "/app/lib/flexbridge/Mercurial/mercurial/demandimport.py", line 106, in __getattribute__
self._load()
File "/app/lib/flexbridge/Mercurial/mercurial/demandimport.py", line 78, in _load
mod = _hgextimport(_import, head, globals, locals, None, level)
File "/app/lib/flexbridge/Mercurial/mercurial/demandimport.py", line 47, in _hgextimport
return importfunc(name, globals, *args)
File "/app/lib/flexbridge/Mercurial/mercurial/util.py", line 70, in <module>
statfiles = getattr(osutil, 'statfiles', platform.statfiles)
File "/app/lib/flexbridge/Mercurial/mercurial/demandimport.py", line 106, in __getattribute__
self._load()
File "/app/lib/flexbridge/Mercurial/mercurial/demandimport.py", line 78, in _load
mod = _hgextimport(_import, head, globals, locals, None, level)
File "/app/lib/flexbridge/Mercurial/mercurial/demandimport.py", line 47, in _hgextimport
return importfunc(name, globals, *args)
ImportError: /usr/lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.33' not found (required by /app/lib/flexbridge/Mercurial/mercurial/osutil.so)

which is obviously caused by mismatch between the version of glibc that is expected by my "plonked" Mercurial and the one which the Flatpak is running... So it's not possible to just drop that in there and hope it'll work unfortunately :/ Not sure this can be hacked around. The whole stack needs updating really or there's going to be an endless chain of version mismatches like this one. 🤷‍♂️