owncloud / twofactor_totp

🔑 Second factor TOTP (Google Authenticator) provider for ownCloud
GNU Affero General Public License v3.0
9 stars 9 forks source link

[QA] missing dependency on php-imagick #260

Open jnweiger opened 2 years ago

jnweiger commented 2 years ago

Seen with twofactor_totp 0.7.4 and core 10.9.1 on Ubuntu 20.04 where php-imagick is not installed.

Expected behaviour:

Manual workaround on Ubuntu:

apt install php-imagick; service apache2 restart

jnweiger commented 2 years ago

@phil-davis the dependancy as added by @prsnbrg gives the appropriate message with occ app:enable, but has no effect when enabling the app through the web UI. It just gets enabled and runs into this issue again.

As far as I can see: $dependencyAnalyzer->analyze() returns empty. Even though lib imagick is present in the dependencies. Does this analyze() use a weaker check than occ app:install?

phil-davis commented 2 years ago

@jnweiger when I enable the app from the webUI admin settings it does a call to https://github.com/owncloud/core/blob/master/settings/ajax/enableapp.php

That code calls OC_App::enable in the same way that the occ command calls OC_App::enable - and both should call checkAppDependencies with the same parameters. So I don't immediately see how there can be a difference.

On my local system I get:

$ php occ a:e twofactor_totp

In app.php line 1129:

  App "2-Factor Authentication" cannot be installed because the following dependencies are not fulfilled: The library imagick is not available.  

app:enable [-g|--groups GROUPS] [--] <app-id>

And: Screenshot 2022-04-06 at 20-01-11 Settings - ownCloud

So the app cannot be enabled via either method.

ilgio commented 1 year ago

I have same problem how do I resolve? Schermata 2022-11-11 alle 11 54 35

I updated owncloud to 10.11 but doesent work

jnweiger commented 1 year ago

@ilgio did you try the mentioned Manual workaround on Ubuntu:

apt install php-imagick; service apache2 restart

voroyam commented 1 year ago

Seen in oC 10.12.1. I installed the app via market app in the WebUI - no dependency warning. Why is the fix of this issue not in the release of the latest release?

jnweiger commented 1 year ago

This is unrelated to 10.12.1 - twofactor_totp is not in the minimal and not in the complete bundle.