New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Thunderbird 102 Flatpak not working #50
Comments
I need more details:
|
Addon version : 1.0.0 (10 November 2022)
Calendars are mostly synced via caldav (no addon used), as well as one
local calendar.
…On 11/11/2022 20.19, balbusm wrote:
I need more details:
1. What version of the addon are you using?
2. How do you integrate with your calendars (protocol, addon used to sync your calendar)?
|
Looks that you don't have evolution data server installed. |
On Fedora 37
The dataserver is installed (version 3.46.1).
I wonder if the flatpak for some reason cannot find the dataserver. I
will poke around and see if maybe it is a flatpak permission issue.
…On 13/11/2022 02.12, balbusm wrote:
Looks that you don't have evolution data server installed.
You didn't specify distro, but basically you need this (example for Debian):
https://packages.debian.org/buster/evolution-data-server
|
Try version 1.0.1. |
I can confirm that libecal is missing (though it is present on the
host). I assume the flatpak runtime used by thunderbird does not include
it and that causes the issues.
Just including egs as a dependency would be out of the question for the
thunderbird flatpak due to dependencies needed, but I will test around a
bit and see if I can find a solution.
…On 13/11/2022 12.47, balbusm wrote:
Try version 1.0.1.
It doesn't fix the issue but you should get more verbose error message.
My assumption is that addon fails to find library libecal-2.0.so (it's part of the evolution-data-server).
You can try to find location of above library and check if it's accessible (`ldconfig -p` might be helpful).
Description where Linux looks for libraries:
https://unix.stackexchange.com/questions/22926/where-do-executables-look-for-shared-objects-at-runtime
|
This appears to still be an issue in May of 2023. I'm on 102 via flatpak and the extension still doesn't talk to EDS, even with additional permissions granted via flatseal. |
I guess it's related to the problem described here and here Try this:
|
@balbusm I did try that, it doesn't work: |
Haven't actively tinkered with this in quite a while after not being
able to add libecal, libglib, and libical to the build process of the
flatpak.
However manually copying them into my current instance results in the
following error, which I believe to be different from the first one if
memory serves right:
```
flatpak run org.mozilla.Thunderbird
[ImapModuleLoader] Using nsImapService.cpp
[NntpModuleLoader] Using NntpService.jsm
[Pop3ModuleLoader] Using Pop3Service.jsm
[calBackendLoader] Using Thunderbird's ical.js backend
JavaScript error:
jar:file:///home/<snip>/extensions/%7Be6696d02-466a-11e3-a162-04e36188709b%7D.xpi!/api/edsCalendar.js,
line 96: Error: Cannot load edsCalendarClient
<snip>
JavaScript error:
jar:file:///home/<snip>/extensions/%7Be6696d02-466a-11e3-a162-04e36188709b%7D.xpi!/api/edsCalendar.js,
line 96: Error: Cannot load edsCalendarClient
JavaScript error: undefined, line 0: Error: An unexpected error occurred
```
Dbus permissions were given to talk on:
org.gnome.evolution.dataserver.Calendar8
org.gnome.evolution.dataserver.Subprocess.Backend
org.gnome.evolution.dataserver.Sources5
org.gnome.evolution.dataserver.AddressBook9
|
I got the following error, when given the
And I can find
I am on a fedora silverblue based image, specifically |
I think flatpak probably do not expose libraries like This might require a minor extension to the Specifically, I think the following code would work (with function tryLoadLib(libName) {
const libPaths = [
"", // do not specify path
"/run/host/usr/lib64/" // flatpak lib path
]
// try to find lib in all the lib paths
for (libPath of libPaths) {
try {
let lib = ctypes.open(libPath + libName);
LOG("Opened " + libName);
return lib;
} catch (err) {
return null;
}
}
} I am not sure whether we need to include more path in the search, specifically like Finally, I don't think using ctype in an extension is ideal, as it is very deprecated. But I also don't see a better way to achieve this functionality, unless thunderbird wants to implement it themselves. |
@czhang03, can you create a fork so that we can test it? I assume we can try it by downloading a zip from your repository and install it manually. I think I could try to implement your changes, as you documented them quite well with references, but I'm afraid I can easily start wasting my time when things don't work. I'd assume there may be something else I'd have forgotten, as I have zero knowledge about flatpak's internal working or MailExtensions, and could easily waste time :/ To be clear, does Thunderbird need additional permissions for this to work? If yes, is it possible to provide the |
Thanks @vendillah , I don't have much time at the moment, but I am happy to test this ASAP. Probably that will be somewhere around the end of Feburary. |
I am just writing down some security implications to this change. Give a flatpak app Thus, the fix proposed above can only be a temporary hack. I think the proper way is still to ask thunderbird package
This integration with |
Hm, so at the risk of sounding not so serious: I somehow made it work in the last days (since my previous post), without noticing. I recently upgraded from Zorin OS 16 to Zorin OS 17, hence I've been "fixing" my OS (workflow). There was a gnome extension that integrated the todo list in the shell. I figured I hadn't installed another package required for evolution data server? I'm not sure. I think I ran the following command as described in Task Widget's installation guide. sudo apt install gir1.2-edataserver-1.2 gir1.2-ecal-2.0 gir1.2-ical-3.0 I had restarted my computer to check if it worked. It didn't. I opened Thunderbird and didn't see anything change. Maybe the change took effect after another (shell/system) restart? I don't know what else it could have been. After that anyway, I no longer bothered really, until I noticed some dots in my calendar. Of course, this is only relevant to those who run a debian based system. I am not that technical. I'm just wondering if by chance it contains the library that this extension is searching for. Also @czhang03, is there some persmission I should check? Honestly, I generally don't know the security implications of changing flatpak permissions, so I try to not touch it at all, but I may have changed a setting a long time ago that makes this possible. Feel free to ask questions or ignore this completely. |
I've been having the same issue on Fedora Silverblue and I know I have the evolution data server installed. Any chance you could check your flatseal permssions for thunderbird and see if they're different from the defaults? I would really like to make it work. |
By habit, I kept looking at the agenda of Thunderbird, only occasionally Gnome's Calendar and Shell's calendar. It appears that the syncing is no longer working, and it's hard to say when it stopped. I only noticed recently when I had removed some event, and they were still present in Gnome's Calendar. Reversely, google meets had been added in Thunderbird that didn't show up anymore. I checked Flatseal, and I didn't see any changed parameters. (None of them has a blue warning triangle symbol.) I wish I could simply export the settings, but I can take screenshots if you desire to be sure. In meanwhile, I enabled and disabled the extension in Thunderbird without success. I haven't yet tried installing and uninstalling the data-server, simply because I definitely wouldn't want to do that every time to sync my agenda. It's just so strange that it worked suddenly and then it suddenly doesn't anymore -_-
I'm curious myself what changed that it stopped again. Did Thunderbird update? System packages? The extension? I will give an update if I discover how to get it working again. |
I would also like to get this working, if possible. I'm using Betterbird (Flatpak), not Thunderbird, but I wouldn't think that would make much of a difference. I tried making a symlink I'm getting the same error message that @czhang03 posted (#50 (comment)). I do have Anyone have any ideas on how to make this work, or has anyone made any progress on resolving this, by chance? |
@GalacticSun flatpak app uses a different If you want to make this work, you can try the patch I suggested: #50 (comment) , and build it yourself to see if it works. I no longer need this feature, nor do I want to maintain it, but I am happy to debug it with you. |
@czhang03 Thanks. I'd rather not have to build it myself, to be honest - not really sure how to do that. Is it hard to do? Would any further Flatpak updates then override my build? Also, are you sure your patch works okay? What about manually moving |
I have no idea whether my patch works, since I have never tried it. As I have mentioned, I no longer have a usecase for this app. Now that I think about it, you can grant To do that, you will need to either hard-code the #!/bin/bash
PATH=/run/host/usr/lib64/:$PATH && thunderbird and launch it via |
@czhang03 When you say adding my I'd prefer to do it via Flatseal if possible, so I tried adding this to the "Environment" section in Flatseal: Also, would the |
@GalacticSun I don't think |
@czhang03 Thanks. Okay, I tried the following, none of which worked, unfortunately:
Still getting the following error each time I try to run Betterbird:
Full error message:
I also tried the bash script method you suggested but I get this error (and I am running the
Not sure what else to try as my knowledge of the Flatpak system is limited. Update: Interesting side-note, however, is that at some point during my testing with all of this, all my calendar data appears to have been deleted in EDS, since my Gnome calendar applet now shows no events. That's disappointing. It's still in Betterbird, though, thankfully. Something must have communicated with EDS at some point, I would imagine, for it to have deleted all those events from EDS / Gnome calendar. |
@GalacticSun I didn't expect these results. Can you make sure that you enable the # this will put you into a bash shell in the sandbox
> flatpak run --command=bash eu.betterbird.Betterbird
# check the sandbox usr dir, I don't expect any result
[📦 eu.betterbird.Betterbird ~]$ find /usr -name libecal-2.0.so*
# check the host usr dir, I expect the three libaries listed above
[📦 eu.betterbird.Betterbird ~]$ find /run/host/usr/ -name libecal-2.0.so*
# check if the path varaible is correctly set
[📦 eu.betterbird.Betterbird ~]$ echo $PATH If this troubleshoot don't work, I would just try to see if I can come up with a fix on my machine. Thank you for your cooperation. |
@czhang03 Thanks. Where do I enable the |
@GalacticSun You can do it like so in flatseal: This enables read-only access to system executables, which should be enough. Alternatively, you can also toggle |
@czhang03 Thanks. Okay, I enabled
However, the error message still displays when launching Betterbird, and no events have appeared in EDS/Gnome mini calendar applet: I also tried toggling the |
Update: Actually my EDS / Gnome calendar events weren't all deleted. In my testing zeal, I forgot that I'd turned off "Show calendar events" in the Cinnamon applet options and the dots disappeared, but now they're back. But the main problem still remains: events are still not being synced between Betterbird/Thunderbird and EDS. Any other ideas or suggestions to make this work? |
This is unexpected, as you have seen, the path is loaded correctly, and the required library is indeed in the path, yet it is not found by the extension. IIRC, last time I read the source code, the code indeed tries to find the library in path. I don't know what changed or what went wrong. I am sorry, I am way too busy recently to do debug this further. I probably will try to circle back to this when I have more time. |
@czhang03 Thanks, that's okay, I really appreciate your help. I would have not been able to get this far on my own since I just don't know the Flatpak system very well. I will try again, maybe I messed up a step. Thanks again! |
This addon does not work in the Thunderbird Flatpak.
Thunderbird: 102.4.2
Flatpak: 1.14.0
Gnome: 43.0
Output:
error.log
The text was updated successfully, but these errors were encountered: