jhass / nextcloud-keeweb

Integrate Keeweb into Nextcloud
Other
414 stars 49 forks source link

Doesn't work on YunoHost #143

Open ChrissW-R1 opened 4 years ago

ChrissW-R1 commented 4 years ago

Hi guys,

I can't get it working. Everytime I select the app on the tab or click on an KeePass Database file The server sends an empty response: image

I didn't find any option to solve this problem. The log contains no error at all.

Thanks for your help Chriss

maurerle commented 4 years ago

This seems to have something to do with your setup (probably reverse proxy configuration) as it is working on other setups running NC18.0.4. This is probably unrelated to NC18.0.4.

Can you provide further information about your setup?

farvardin commented 4 years ago

On Nextcloud 18.0.4, after installing Keeweb 0.6.2, all I get is this screen:

image

Nextcloud was installed using Yunohost, I don't know if it's related, but everything else (all other nextcloud apps) are working fine. I got this error on 2 differents servers.

maurerle commented 4 years ago

@farvardin this looks like the error you get when you use an unsupported php version.

farvardin commented 4 years ago

@maurerle Nextcloud says the PHP Version is 7.3.18 and MySQL version is 10.1.44 (on both servers)

image

maurerle commented 4 years ago

Then I don't know whats wrong here, maybe @jhass knows something? There is this issue #136 by other people running on YunoHost who run into this issue. In the meantime YunoHost upgraded it's Nextcloud to NC18, so it generelly should be supported now.

There must be something missing in the NC image provided by YunoHost.

farvardin commented 4 years ago

I can test further if you send me some commands to try

Limezy commented 4 years ago

Exactly the same issue here. Any idea ?

farvardin commented 4 years ago

@Limezy are you using yunohost or not?

Limezy commented 4 years ago

Yes I am !

djibux commented 4 years ago

I am experiencing the same issue reported by @farvardin Also running Yunohost.

maurerle commented 4 years ago

There is no new information from the issue-opener but people running YunoHost seem to run into the second issue here. Maybe this should be renamed to "Not working on YunoHost". Someone running YunoHost should investigate this a little further what package is missing there.

farvardin commented 4 years ago

I've looked at the nextcloud-keeweb source code but I'm not very aware what are really required to run it. I've also tried to trace the code displaying on my server (like on my first screenshot), but because of all those minified code, it's very difficult to find the relevant files.

I'm willing to install on my server any extra dependency which could be needed, if you can think of some.

ChrissW-R1 commented 4 years ago

This seems to have something to do with your setup (probably reverse proxy configuration) as it is working on other setups running NC18.0.4. This is probably unrelated to NC18.0.4.

Can you provide further information about your setup?

We're now on Nextcloud version 18.0.6 and the issue is still the same.

The server don't use a Reverse Proxy in this setup. We run an Apache HTTP server with PHP-FPM to use multiple PHP versions in one setup. The Nextcloud instance is powered by PHP 7.3.19.

YunoHost? No, I've never heard about it!

farvardin commented 4 years ago

I've installed a fresh vanilla Nextcloud instance on my desktop computer, it is running Apache, I've installed keeweb and everything works as expected.

The yunohost servers are running nginx. Is nextcloud-keeweb supposed to work both on apache and nginx?

@ChrissW-R1 have you tried on both firefox and chrome? How did you install nextcloud on your server? Is there a specific setup?

maurerle commented 4 years ago

Even though this is an issue with JS I can imagine that there is a php-extension missing or some other package missing on the server. Maybe @ChrissW-R1 can check what is different between his host and a newly setup NC. Then we could tell the YunoHost people what is missing?

I am using nc as docker-fpm behind NGINX, it should be no problem..

ChrissW-R1 commented 4 years ago

@ChrissW-R1 have you tried on both firefox and chrome? How did you install nextcloud on your server? Is there a specific setup?

I tested it now in Firefox, too: image And yes, it is still the same error: image

Even though this is an issue with JS I can imagine that there is a php-extension missing or some other package missing on the server. Maybe @ChrissW-R1 can check what is different between his host and a newly setup NC. Then we could tell the YunoHost people what is missing?

Possibly there is an missing PHP extension. Where could I find a list of necessary extensions, to compare it to the list of installed ones?

maurerle commented 4 years ago

Oh you have the first issue in this thread. This seems to be a misconfigured Apache/SSL certs, as the connection can not be secured. Maybe it is accessing the server in a weird way?

The users on YunoHost have the second one provided by farvardin which could be php related. List of php-packages can be found here to check: https://docs.nextcloud.com/server/19/admin_manual/installation/source_installation.html#prerequisites-for-manual-installation

ChrissW-R1 commented 4 years ago

Oh you have the first issue in this thread. This seems to be a misconfigured Apache/SSL certs, as the connection can not be secured. Maybe it is accessing the server in a weird way?

No. The SSL/TLS configuration works. The empty response was also transported in the right and secure way. Every other app and Nextcloud functions works as expected.

https://docs.nextcloud.com/server/19/admin_manual/installation/source_installation.html#prerequisites-for-manual-installation

I've checked the entire list. All extensions/modules are installed in the newest version.

maurerle commented 4 years ago

I wonder why it then says "Secure connection failed". But it is hard to debug as you are the only one with this specific problem :/

ChrissW-R1 commented 4 years ago

I wonder why it then says "Secure connection failed".

Me too. It looks as an "common error"

But it is hard to debug as you are the only one with this specific problem :/ Sure, but I've no good plan how I could help you with more information.

The app is loaded by open the path "/apps/keeweb/keeweb?config=config" in a subdocument below the heading bar. If I open the url directly in the browser I got the same error.

Thatoo commented 3 years ago

I face the same issue. Nextcloud 18 on YUnohost... I get the same screen than farvardin.

tantic commented 3 years ago

Hello, same for me with nextcloud 19.03, keeweb 0.6.3, PHP 7.3.19. Here are some messages in the console

nextcloud-keeweb

arnowelzel commented 3 years ago

@tantic The HTTP error 502 indicates that the webserver acts as a proxy and did not get a valid answer from the upstream which it wants to contact. So there is something broken with the server setup.

arnowelzel commented 3 years ago

It also seems, YunoHost has this problem with other applications as well, not just Nextcloud:

https://forum.yunohost.org/t/502-bad-gateway-after-trying-to-install-app-yunohost-3-3-2/6422 https://forum.yunohost.org/t/lutim-502-bad-gateway-suite-a-migration-yunohost-2-7-14-5-3-0-0-1/5132 https://forum.yunohost.org/t/all-services-hosted-by-yunohost-vm-return-502-connection-refused/7321

I use Keeweb 0.6.3 on Nextcloud 19.0.3 without any issue on a regular webserver based on Apache 2.4 and PHP 7.4 as FPM. So it may be a good idea to check what is so special with the YunoHost setup. I'll set up YunoHost on a VM and will check if I find out what's wrong.

tantic commented 3 years ago

Ok thanks for your answer, I'm gonna check the configuration of my yunohost instance and try to find the solution

euZebe commented 3 years ago

I had the same issue as @farvardin ; I solved it by downgrading keeweb as I had already did: https://github.com/jhass/nextcloud-keeweb/issues/136#issuecomment-591058354

farvardin commented 3 years ago

thanks a lot euZebe, I did what you recommended, it seems to work. What is strange is after I've untared the archive into /var/www/nextcloud/apps then I got a message on my nextcloud saying "upgrade to 18.0.7, gallery and keeweb will be desactivated". Then nextcloud performed a few tasks and I could use it again. I've reactivated keepass without upgrading it, and could access my keepass file, modify it and save it. The modification was correct on my desktop as well.

maurerle commented 3 years ago

@farvardin FYI this is because you are installing to the apps folder, which includes system apps. Installing from the store would install to custom_apps which is the folder you should untar the app too. Upgrading a system app results the nextcloud upgrade behavior.

Thatoo commented 3 years ago

A solution has been given in here to use last version of keeweb in nextcloud on Yunohost : https://github.com/YunoHost-Apps/nextcloud_ynh/issues/317#issuecomment-702596438

I have tested and it works. So it is possible to install keeweb from the store if you follow this solution.

Thatoo commented 1 year ago

The issue comes from the following line line in the nginx conf file include conf.d/yunohost_panel.conf.inc; and the issue comes from

:~ $ cat /etc/nginx/conf.d/yunohost_panel.conf.inc
# Insert YunoHost button + portal overlay
sub_filter </head> '<script type="text/javascript" src="/ynh_portal.js"></script><link type="text/css" rel="stylesheet" href="/ynh_overlay.css"><script type="text/javascript" src="/ynhtheme/custom_portal.js"></script><link type="text/css" rel="stylesheet" href="/ynhtheme/custom_overlay.css"></head>';
sub_filter_once on;
# Apply to other mime types than text/html
sub_filter_types application/xhtml+xml;
# Prevent YunoHost panel files from being blocked by specific app rules
location ~ (ynh_portal.js|ynh_overlay.css|ynh_userinfo.json|ynhtheme/custom_portal.js|ynhtheme/custom_overlay.css) {
}

and more precisely, if I comment the first line, the issue disappear. So all the problem comes from

sub_filter </head> '<script type="text/javascript" src="/ynh_portal.js"></script><link type="text/css" rel="stylesheet" href="/ynh_overlay.css"><script type="text/javascript" src="/ynhtheme/custom_portal.js"></script><link type="text/css" rel="stylesheet" href="/ynhtheme/custom_overlay.css"></head>';

Can't keeweb deal with it please? to allow all yunohost users to be able to use keeweb on nextcloud without any trick needed?

Thatoo commented 1 year ago

The content of ynh_portal.js is here : https://github.com/YunoHost/SSOwat/blob/dev/portal/assets/js/ynh_portal.js and the content of custom_portal.js is here : https://github.com/YunoHost/SSOwat/blob/dev/portal/assets/themes/default/custom_portal.js

Thatoo commented 1 year ago

It is a frustration for me using nextcloud on yunohost : keeweb doesn't work without the need of deactivating a nice yunohost feature... It would be nice to solve that.

arnowelzel commented 1 year ago

Can't keeweb deal with it please? to allow all yunohost users to be able to use keeweb on nextcloud without any trick needed?

If I would know how to this, it would do it. But so far I have no clue at all what is going on here - sorry. I even don't what all that YunoHost stuff is for.

Furthermore KeeWeb itself is not maintained any longer and I don't see that this will ever change, since that information was published in May 2022 but since then no one showed up who has the capabilities and time for the maintenance:

https://github.com/keeweb/keeweb/issues/2022

ndx1905-github commented 10 months ago

If anyone comes here, I had the same problem. Disabling the yunohost logo superimposed on the page solved the problem for me. Yunohost admin > tools > others > disable yunohost shortcut

Just in case, I've also restarted php-fpm with /etc/init.d/php8.1-fpm restart

kuba-orlik commented 7 months ago

@ndx1905-github thanks! That worked for me!