Gajim - 2018-04-21

  1. jjrh Where does the configuration get loaded into app?
  2. jjrh Trying to figure out when to initialize the logger and still have access to a configuration variable.
  3. lovetox in
  4. lovetox i dont think you can make it much earlier
  5. lovetox actually in def _handle_local_options
  6. lovetox hm thats a problem
  7. lovetox we need this there so we can read the command line args
  8. lovetox though you can try and move the
  9. lovetox configpaths.gajimpaths.init(
  10. lovetox int the args handler method
  11. lovetox this should work in my opinion jjrh
  12. lovetox pep., what happend to programming muc?
  13. lovetox its down for me since a few days
  14. bot Philipp Hörist pushed 1 commit to branch _refs/heads/master_ of _gajim_ < >: *8e9c040a* < > Support http:upload:0
  15. bot Philipp Hörist closed an issue in _gajim_ < >: #8982: < Update HTTP Upload to `urn:xmpp:http:upload:0` >
  16. bot Philipp Hörist merged a merge request for _gajim/master_ < >: Support http:upload:0
  17. Maranda Okay resolved Prosody compulsion on trying to reconnect s2s wise when it's banned from doing it...
  18. Maranda it was causing heap growth and leaks on the long run
  19. lovetox i dont know what you are talking Maranda, but i feel happy for you 🐯
  20. bot Daniel modified an issue in _gajim_ < >: #9092: < History mishmash when contact is in roster of 2 accounts >
  21. Maranda lovetox, basically I have a "ban s2s after x hits" thing implemented, just that previously it did it only at authentication level, and Prosody just keeps attempting to re-establish a s2s like every 2 seconds
  22. Maranda lovetox, even if it was previously forbidden to either via sasl external or dialback
  23. Maranda so since creating a session is a rather expensive process that caused heap growth on the long run
  24. Maranda I just shortcircuited to ban at listener level and close the connection immediatly before a session is created.
  25. Maranda (if it was previously banned at auth already)
  26. bot Philipp Hörist proposed a new merge request for _gajim/master_ < >: Refactor configpaths
  27. bot Philipp Hörist updated a merge request for _gajim/master_ < >: Refactor configpaths
  28. bot Philipp Hörist pushed 1 commit to branch _refs/heads/master_ of _gajim_ < >:
  29. bot Philipp Hörist merged a merge request for _gajim/master_ < >: Refactor configpaths
  30. lovetox jjrh i refactored the configpaths
  31. lovetox so you can now just do "from gajim.common import configpaths" in the logging_helper module
  32. lovetox and then configpaths.get('whateverVar')
  33. mrDoctorWho how about not receiving ALL messages from a groupchat with omemo?
  34. mrDoctorWho how about not receiving ALL messages from a groupchat with mam?
  35. mrDoctorWho sorry, not omemo, mam
  36. mrDoctorWho I just came to report this
  37. mrDoctorWho Traceback (most recent call last):
  38. mrDoctorWho and this
  39. mrDoctorWho Traceback (most recent call last):
  40. bot Philipp Hörist pushed 2 commits to branch _refs/heads/master_ of _gajim_ < >: *0739eb9d* < > HistoryManager: Init configpaths only in standalone mode *b0fce17c* < > HistoryManager: Open window centered
  41. lovetox mrDoctorWho, for your first traceback, seems we got a invalid omemo message
  42. lovetox normally there should be a warning before that traceback that tells us more
  43. lovetox but yes we could fail more gracefullyhere
  44. bot Philipp Hörist pushed 2 commits to branch _refs/heads/master_ of _gajim-plugins_ < >: *ab38ee7b* < > [omemo] Fail with log output on invalid stanza *c134ae5b* < > [preview] Fix error when mime or size is not set
  45. lovetox and the second error i fixed just now
  46. bot Philipp Hörist pushed 1 commit to branch _refs/heads/master_ of _gajim-plugins_ < >: *dc6ef801* < > [preview] Update mainifest.ini
  47. bot Philipp Hörist pushed 1 commit to branch _refs/heads/master_ of _gajim_ < >: *72e69a59* < > Fix setting custom config root
  48. bot Philipp Hörist pushed 2 commits to branch _refs/heads/master_ of _gajim-plugins_ < >: *e6c1fee1* < > [preview] Dont use deprecated way to get path *7c785000* < > [omemo] Remove old DB migration
  49. jjrh lovetox, that's will get a variable stored in Config? I thought configpaths just had stuff like the user directory and whatnot?
  50. lovetox i thought thats what you needed, access to where the user dirs and gajim dirs are
  51. lovetox for what do you need to set a config value?
  52. jjrh So the user can specify a different logging config location
  53. jjrh aka let you specify a logging file whereever you want ~/gajim_dev/ - if that is unset we just use the default one.
  54. jjrh I could just forget that and use a commandline option which maybe is more appropriate?
  55. jjrh But I kinda like the option that I could configure in advanced a logging config without starting gajim with a commandline option.
  56. jjrh I'd probably do commandline option has priority, then setting in config, and then default logging. Might want to have a checkbox aswell somewhere more obvious too to allow people to check the box and have gajim use a more verbose logging config (so windows users can very easily turn on very verbose to send)
  57. jjrh I suppose I could just forget that and look in the gajim directory for a file and if that exists use that.
  58. jjrh but if I call logging_helper.init() in's _activate the config has been populated and I can do app.config.get('logging_configuration') but _activate /seems/ like the wrong place to do that. I'm also curious now where the config gets loaded since it's somewhere between _start and _activate
  59. lovetox thats what i wrote in the MR
  60. lovetox the user can specify his paths in the logging file that he puts into his user dir
  61. lovetox no need to save that in the gajim config
  62. lovetox if the file is present you use that, if not revert to default
  63. lovetox logging_helper.init() is called not in activate, its called after parsing command line arguments
  64. lovetox and i made it so, the configpaths are even determined before that
  65. lovetox so if logging.init() is called you already know all user dirs
  66. lovetox so you know where to put the default logging files
  67. jjrh Yep - I didn't know about getting that configpaths stuff before _start so last night I was trying pulling it from start - but yeah i'll go with that way for now.
  68. lovetox ok just to be clear, you dont have to modify in any way
  69. lovetox you just import configpaths in logging_helpers
  70. lovetox and can access any dir with configpaths.get()
  71. lovetox this only works if you have updated to the last commit i made today
  72. jjrh oh - okay i'll pull that in
  73. jjrh Yeah - last night I was mucking with to figure out how to get all the stuff I needed.
  74. jjrh any opposition to having a commandline argument to specify another location?
  75. lovetox you mean to overwrite the location you set in default logging file?
  76. lovetox no sounds good
  77. lovetox then you can easily redirect logs, without having to add a whole userlogging file
  78. jjrh Basically have it as --logging_config=..... > ~/.config/gajim/ > default logging
  79. lovetox so you want to overwrite the user logging file also with that? hm
  80. lovetox i guess why not
  81. jjrh Well not overwrite, just take priority. If you include that on the commandline we don't use the user directory logging file. Mainly useful for development where you might have a logging file tailored for what your doing without mucking around with the user profile or default logging config.
  82. lovetox ok just do it how you like, this is easily changed if we later want something else
  83. jjrh Yep.
  84. lovetox dont use _ in the cmdline arg though
  85. lovetox make it logging-config
  86. jjrh sure.
  87. jjrh - but I guess unrelated now, where/when does the user config get populated?
  88. lovetox with config you mean the config values?
  89. lovetox not the paths?
  90. jjrh yeah the user config
  91. lovetox when you first import from gajim.common import app
  92. lovetox there the Config object gets created
  93. lovetox hm not quite accurate
  94. lovetox the default config gets loaded there
  95. jjrh Yeah
  96. lovetox the user config gets loaded if you import gui_interface
  97. lovetox its in the top
  98. lovetox called optparser
  99. jjrh ahh
  100. jjrh yeah so it's in _activate
  101. lovetox yes
  102. lovetox but to be honest for logging i would not rely on user config stuff
  103. lovetox logging has to work and happen at the very first start, when basically nothing is initialized
  104. jjrh yep - this was more for my currorsity since I was scratching my head last night trying to figure out how all those pieces work
  105. lovetox so cmd line args are better
  106. jjrh Still getting my head around how GTK works. Gajim is the first time I have done any GUI programming
  107. jjrh just found - that's pretty nice. Little nicer than just straight pdb
  108. jjrh One of these days i'll get emacs to play nice with python.
  109. rom1dep lovetox: any update on the messagewindow work?
  110. bot Corship created an issue in _gajim_ < >: #9093: < Crash after long time not signing in >
  111. lovetox to be honest i dont use any of these debugging tools
  112. lovetox just put straigt print() whereever i need something
  113. lovetox though i should get into that, because i think it can make life easier
  114. bot Philipp Hörist closed an issue in _gajim_ < >: #9093: < Crash after long time not signing in >
  115. lovetox no sorry rom1dep
  116. jjrh lovetox, I'm the same way when I know the codebase well, but when i'm jumping into something foreign it's really handy to let you break during a function call and pull up a interpreter to look at variables, call functions, etc.
  117. jjrh run help(
  118. rom1dep lovetox: nah, I am the one sorry not to contribute in any meaningful way!
  119. lovetox im filled up with some refactoring work, cant add all the time new stuff, have to clean up the old codebase also from time to time
  120. rom1dep Which is actually the important stuff. As usual if you need a pair of hands to test something, let me know!
  121. Maranda +1 lovetox, refactor all the things
  122. Maranda I need to check a thing regarding verifying streams.. Now that I remember, after dinner
  123. mrDoctorWho lovetox, there is a lot of warnnigs regarding omemo plugin, but that exact traceback happened when gajim was just started, and this is what I see in the terminal before that traceback: 04/21/2018 17:31:09 (W) gajim.plugin_system.omemo OMEMO message without keys 04/21/2018 17:31:09 (W) gajim.plugin_system Error executing <bound method OmemoPlugin._message_received of <omemo.omemoplugin.OmemoPlugin object at 0x7fa74379f710>>
  124. mrDoctorWho /home/mrdoctorwho/gajim/lib/python3.6/site-packages/axolotl/protocol/ RuntimeWarning: Unexpected end-group tag: Not all data was converted preKeyWhisperMessage.ParseFromString(serialized[1:])
  125. lovetox yeah seems to be a invalid omemo message
  126. lovetox this "OMEMO message without keys"
  127. lovetox means someone send us a encrypted message, but didnt adress it to a device
  128. lovetox which is plain invalid
  129. lovetox log with -l gajim.plugin_system.omemo=DEBUG
  130. lovetox then you see who sent the message
  131. lovetox then we can put in a bugreport with the client the contact uses
  132. mrDoctorWho will do, thanks
  133. bot Philipp Hörist pushed 1 commit to branch _refs/heads/master_ of _gajim_ < >: *848c5cbd* < > More refactoring around paths - Remove old config dir migration - Remove some unused config paths - Rewrite configpaths.init() - Simplify creating paths in check_paths
  134. marmistrz test pack please ignore
  135. marmistrz test pack, just ignore
  136. marmistrz I've just experience a weird thing with message corrections
  137. marmistrz I sent a message to a contact
  138. marmistrz then I corrected it
  139. marmistrz (XEP-0308)
  140. marmistrz now I see two messages in Conversations, only one in Gajim
  141. marmistrz This works, only in private chats
  142. marmistrz This behavior occurs only in private chats
  143. marmistrz The remote contact confirms that they have received two messages instead of a single one (gajim)
  144. bot Philipp Hörist pushed 1 commit to branch _refs/heads/master_ of _gajim_ < >: *c0c16dbf* < > Dont change path names because plugins use them
  145. marmistrz And I also can't untrust any OMEMO key
  146. marmistrz Simply nothing happens when I try
  147. bot Philipp Hörist pushed 1 commit to branch _refs/heads/master_ of _gajim-plugins_ < >: *16e776f4* < > [omemo] Dont use deprecated way to get path
  148. lovetox marmistrz, seems like a issue of conversations or not?
  149. lovetox conversations doesnt correct messages in mucs for example
  150. lovetox so i guess this also counts for private messages
  151. marmistrz lovetox, gajim's IMHO
  152. marmistrz because the other gajim user reports the same
  153. lovetox yeah but conversations does not correct the message
  154. lovetox we cant force conversations to correct a message
  155. lovetox we can only suggest it
  156. lovetox and it ignores it in some circumstances
  157. lovetox nothing we can do
  158. lovetox about OMEMO, you can delete the fingerprint in the plugin conifg
  159. lovetox if it pops up on the next message again try to untrust it
  160. lovetox something is wrong there, dont know what
  161. bot Justin Hornosty updated a merge request for _gajim/master_ < >: Use logging YAML logging config files to provide more flexibility while still…
  162. jjrh Everything should be implemented now.
  163. marmistrz lovetox, but it's in a private conversation, not a MUC
  164. marmistrz and a friend's gajim show the same duplicate messages instead of being corrected
  165. marmistrz if your theory were true, the gajim friend would see the message corrected instead of a duplicate
  166. marmistrz (or do I misunderstand something about how XMPP works)
  167. marmistrz as a private conversation I mean a 1-1 chat between a roster contacts, there's no MUC involved here
  168. lovetox jjrh, please rebase your commits onto the current gajim master
  169. lovetox stuff changed in
  170. lovetox also please remove the old logging code
  171. lovetox also def create_log_dir() should not be necessary with new configpaths
  172. lovetox it creates this itself on start
  173. jjrh New as of like a couple hours ago?
  174. jjrh When I was testing that wasn't the case which is why I did that.
  175. jjrh ohh actually yeah something changed I guess I hadn't pulled in that change.
  176. marmistrz lovetox: does what I say make any sense?
  177. lovetox when i test this between two gajim accounts correcting works fine for me
  178. lovetox are you sure you only hitting once CTRL + uparrow
  179. marmistrz yes and the background changes.
  180. marmistrz I'll try capturing the actual traffic sent, is gajim -v enough for that?
  181. lovetox yes
  182. lovetox it actually is enough if you send one message and correct it
  183. lovetox and its enough if you capture it via xml console
  184. lovetox no need for logging
  185. marmistrz thanks, I'l chexk tomorrow
  186. bot Justin Hornosty updated a merge request for _gajim/master_ < >: Use logging YAML logging config files to provide more flexibility while still…
  187. jjrh ^ that was just the rebase.
  188. lovetox while you are changing things, some things that i also saw
  189. lovetox dont do a=1, instead a = 1
  190. lovetox add spaces between every operator
  191. jjrh Sure.
  192. jjrh lovetox, - yeah even with the new changes it's not creating the log paths, that happens later on.
  193. lovetox oh yeah ..
  194. lovetox true, yeah then you have to keep that in
  195. lovetox but dont import from checkpaths
  196. lovetox this can create problems, because checkpaths imports app
  197. lovetox so copy that method over for now
  198. lovetox its not pretty but i want this to be almost standalone
  199. lovetox hm or we could move this method into configpaths
  200. lovetox and import it from there
  201. bot Justin Hornosty updated a merge request for _gajim/master_ < >: Use logging YAML logging config files to provide more flexibility while still…
  202. jjrh oh - didn't see these new messages
  203. jjrh I gotta go do some stuff - i'll finish this up later. If we just use one log file we don't need a log path
  204. lovetox no we still need it
  205. lovetox because you have different profiles
  206. lovetox and if you dont set a path via configpaths, all profiles will log to the same file
  207. jjrh can't I just use: configpaths.get('MY_DATA')
  208. lovetox no because thats only the path to mydata, mydata is not different for different profiles
  209. lovetox what we want is that the profile is added to the logfile name
  210. lovetox so try to set it up like this
  211. lovetox ('LOG_FILE', 'log', PathLocation.DATA, PathType.FILE)
  212. lovetox then get the path with configpaths.get('LOG_FILE')
  213. lovetox this will add a log.profile file in the DATA path
  214. lovetox this also spares us creating directorys
  215. lovetox keeps log files separated
  216. lovetox also if the config file gets now way shorter because of removing most handlers
  217. lovetox try to put it into the logging_helpers file
  218. lovetox then everything is together, the default config is not meant to be edited by users so no need to keep it separated
  219. chameleonscales Hi, anyone here ? I got back to trying to install Gajim and I'm stuck at step 5 of the flatpack installation guide :
  220. chameleonscales when I type "" I get this : Warning: Could not update extra metadata for 'gajim_flatpak_repo': Remote listing for gajim_flatpak_repo not available; server has no summary file Check the URL passed to remote-add was valid
  221. chameleonscales it's the same error fwchat had the other day
  222. bot Philipp Hörist pushed 1 commit to branch _refs/heads/master_ of _gajim_ < >: *220bf358* < > Create some folders only on demand
  223. lovetox why are you typing that URL
  224. lovetox this is not in the instructions
  225. chameleonscales haha, seems I didn't press Ctrl+C hard enough
  226. chameleonscales I meant to paste this "flatpak --user remote-add --no-gpg-verify gajim_flatpak_repo ~/Gajim/gajim_flatpak_repo"
  227. lovetox so in what dir are you executing this?
  228. lovetox in your home dir?
  229. chameleonscales yes
  230. lovetox and is there a Gajim directory and iside a gajim_flatpak_repo dir?
  231. chameleonscales there is a gajim_flatpak dir but not with _repo
  232. lovetox flatpak --user remote-add --no-gpg-verify gajim_flatpak_repo ~/Gajim/gajim_flatpak
  233. lovetox then do this
  234. chameleonscales error: Remote gajim_flatpak_repo already exists
  235. chameleonscales I think I already executed this command the other day
  236. lovetox then remove it with
  237. chameleonscales (though I skipped step 4 when doing it)
  238. lovetox get the command from flatpak --help
  239. chameleonscales what am I looking for in --help ?
  240. lovetox the remote-remove command
  241. lovetox i will test now if this manual works on my machine
  242. chameleonscales ok I deleted it and re-added it
  243. chameleonscales but it said : Warning: Could not update extra metadata for 'gajim_flatpak_repo': Remote listing for gajim_flatpak_repo not available; server has no summary file Check the URL passed to remote-add was valid
  244. lovetox no idea sorry
  245. chameleonscales is the problem on my end only ?
  246. lovetox hm no some other people had the same problem
  247. lovetox it seems something in the manual is not clear enough
  248. chameleonscales there seems to be an inconsistency between step 4 and 5
  249. chameleonscales at step 4 it uses gajim_flat pak and at step 5 it uses gajim_flatpak_repo
  250. chameleonscales Maybe I'm wrong though
  251. chameleonscales I didn't pay much attention to that : "Replace install path ~/Gajim/gajim_flatpak with an install path of your choice."
  252. chameleonscales but I don't really know what I'm supposed to do about it
  253. chameleonscales I'll start over
  254. chameleonscales can I replace "~/Gajim/gajim_flatpak" by "/opt/Gajim" ?
  255. juniorjpdj probably yes
  256. chameleonscales ok
  257. chameleonscales so that would make step 4 like this, right ?
  258. chameleonscales flatpak-builder --repo=gajim_flatpak_repo /opt/Gajim ~/Gajim/org.gajim.Gajim.json
  259. chameleonscales huh, doesn't work anyway
  260. chameleonscales I'll use the default directory
  261. lovetox come back tomorrow, Daniel can help you probably
  262. chameleonscales if it doesn't work with the default dir I'll come back tomorrow
  263. chameleonscales yeah I'll come back tomorrow
  264. chameleonscales thanks lovetox
  265. chameleonscales btw how do you properly mention someone with xmpp ? Do we use an @ ?
  266. lovetox no
  267. lovetox just write the name
  268. chameleonscales ok, thanks
  269. chameleonscales do you know in which Time zone Daniel lives so I don't ask for help in the night for him ?
  270. chameleonscales also who's Daniel ?