flathub / org.zotero.Zotero

https://flathub.org/apps/details/org.zotero.Zotero
19 stars 15 forks source link

Proxy settings are ingored #157

Closed Mr-Spade closed 4 months ago

Mr-Spade commented 4 months ago

This flatpak app seems to ignore my system wide proxy settings and can therefore not connect to the internet. System: Ubuntu 22.04 DE: Gnome 42.9 Proxy set in Gnome settings / Network / Network Proxy

Since some webdav servers are not directly accessible in some regions (like mine, China), a proxy must be used to connect to them. Also, some zotero plugins that rely on google translate must use a proxy to work properly.

Also, proxy is needed if you need to access webdav servers through tor network.

Can I convince zotero somehow to use a specific proxy server or to obey the system proxy settings? Note that the chromium flatpak had the same issue before, but that was fixed. Maybe something similar needs to be done for zotero?

sebastian-de commented 4 months ago

Can you test if Zotero 7 beta picks up the correct proxy? See https://github.com/flathub/org.zotero.Zotero/issues/124#issuecomment-1799306027

My general feeling is that the old Firefox version used in Zotero 6 doesn't behave well when inside a flatpak.

Mr-Spade commented 4 months ago

Can you test if Zotero 7 beta picks up the correct proxy? See #124 (comment)

My general feeling is that the old Firefox version used in Zotero 6 doesn't behave well when inside a flatpak.

I tried flatpak's Zotero beta and the same problem still exists. Zotero beta also ignores system proxy settings.

sebastian-de commented 4 months ago

I tried flatpak's Zotero beta and the same problem still exists. Zotero beta also ignores system proxy settings.

OK, thanks for ruling that out. Looking at the links you provided, proxy support seems to be surprisingly complicated in flatpak. On the flatpak side the support seems to be incomplete: https://github.com/flatpak/xdg-desktop-portal/issues/554

Regarding the fix for Chromium: Even if I had the skill to write a patch for Firefox - since upstream Zotero releases are just repackaged Firefox binaries we can't apply patches during the flatpak build.

Maybe you can use the env workaround mentioned here?

Mr-Spade commented 4 months ago

Thanks for the reply, as far as I understand it, the system proxy setup automatically gives the no_proxy, https_proxy, http_proxy and all_proxy environment variables to the terminal, at least under gnome.

So, inspired by what you mentioned, I tried to start zotero by running the command flatpak run org.zotero.Zotero in the terminal (instead of via the .desktop desktop icon). At this point, zotero behaves all right and can use the system proxy. However, when I start zotero by clicking on the .desktop desktop icon, zotero will not have the above environment variables in its environment (which doesn't seem to make enough sense to me ......), and therefore cannot use the system proxy.

Starting from the terminal might be a compromise. If flatpak can finish improving the proxy settings, maybe zotero can use a more convenient way to introduce the system proxy settings, like manually set http_proxy variable via script. But until then, it may just have to wait. So it looks like this is an upstream issue.

Thanks again for your patience in replying!