-
Notifications
You must be signed in to change notification settings - Fork 63
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
Nextcloud 21 incompatibility #425
Comments
The extension seems to work in Nextcloud 21 if you delete the |
Thank you for the advice! |
BUT |
Good observation: this has also causes issues in the past: #349 |
I've removed the
|
If the log errors are driving anyone loopy, after deleting the guzzlehttp dir open /twofactor_gateway/vendor/composer and comment out guzzlehttp lines in autoload_classmap.php, autoload_files.php, autoload_namespaces.php, autoload_psr4.php, and autoload_static.php. In a couple of those files there is a reference to guzzlehttp that is associated with Telegram - just leave those uncommented. Alternatively, create a autoload_file.php.old backup and a new autoload_file.php of each file and remove the entries. It may be easier to do this, as you will find arrays that need commenting/removed. This took care of all of my log errors and enabled the app's config again. |
In my case that's 154 lines of code... I'm scared! |
LOL, it's quite a few but with each file backed up you should be ok. Just mind the commas when commenting or deleting arrays. |
@pcburcham's approach worked for me (I'm using NC on Docker). Here's what I executed in order to follow his instructions: rm -r /var/www/html/custom_apps/twofactor_gateway/vendor/guzzlehttp
sed -i -r "s/^.+'GuzzleHttp.+$//g" /var/www/html/custom_apps/twofactor_gateway/vendor/composer/autoload_classmap.php
sed -i -r "s/^.+'\/guzzlehttp.+$//g" /var/www/html/custom_apps/twofactor_gateway/vendor/composer/autoload_files.php
sed -i -r "s/^.+'GuzzleHttp.+$//g" /var/www/html/custom_apps/twofactor_gateway/vendor/composer/autoload_psr4.php
sed -i -r "s/^.+'\/guzzlehttp.+$//g" /var/www/html/custom_apps/twofactor_gateway/vendor/composer/autoload_static.php
sed -i -r "s/^.+'GuzzleHttp.+$//g" /var/www/html/custom_apps/twofactor_gateway/vendor/composer/autoload_static.php Then enabled the app and that was it. Hope it helps until this is fixed. |
Changed Telegram API Class to one not having a Guzzle requirement. Tested with NC 21.0.0 on PHP 8.0.3 (on Alpine Linux Docker Container). Fixes nextcloud#426 and nextcloud#425
Can (at least) one of you verify my PR in #438 is working? I tested it with a fresh installation but it would be nice, if you could verify... |
Hi, the PR didn't work for me. Here are the stepse I followed: I cloned the repo (checked out the branch), moved the project folder into the
It seems the update was detected considering what the output shows. When I get into NC I see the log messages mentioned here, the configuration for Telegram 2FA seems to have been reset and, when testing the functionality, I get an error message after inputting credentials and logging in (the URL is |
I've also tried installing from scratch but got the same flood of log messages and wasn't able to configure Telegram 2FA after running |
On a "scratch install"? I also tested a totally fresh install in a totally fresh Docker container and was able to successfully activate and configure the gateway... That's weird. I'll try to have a look tomorrow. |
Sorry, I checked and the existing configuration wasn't wiped, so, no, I wasn't able to test it from scratch. I could only test that, with existing configuration, doing an uprgade, things don't seem to work quite right. I'll try to clean everything, test again and let you know. |
hi!
What would you recommend to solve it? thanks for your support! |
I cannot reproduce a problem here... I just installed a nc20 on php 7.4, configured the app (+ telegram) with 0.17.0, updated to 0.18.0 and have no problems at all. I also ran an update to 21.0.1 - also worked flawlessly. Main noteThe config should not have to be wiped, because only the transport-class has been swapped, so config stays where it was - destroying BC is always bad ^^. What has to be wiped is the vendor folder of the old app. Best practice might be to rename the old app and install the new one (since config is in DB, no problem should arise). Like: cd apps
mv twofactor_gateway twofactor_gateway-0.17.0
git clone https://github.com/boppy/twofactor_gateway.git
cd twofactor_gateway
git checkout php8-nc21
composer install
npm install
npm run build |
You could either try what @tetebueno suggested in this response or you could wait until a version is released that has compatibility with Nextcloud 21. |
Stumbled on this thread from checking compatibility in my NC instance. So there is no easy way to enable 2FA on NC21 for the time being? Will there be an update or is there a different module to enable 2FA and upüdate to NC21? |
There are other 2FA ways that work already, but Gateway (SMS, Telegram, etc.) currently does not. |
I suggest that someone tests #438 and then this can slowly move forward. |
Thanks for this. worked smoothly on an existing NC install! |
@ChristophWurst Is there anything we/I can do to finalize this? I checked with a NC 20@PHP7.4 + update, a fresh NC 21@php8 and we now have two responses that it's working. Since there is no change beside the transport helping class, I do not see any drawback or BC brake that might appear. |
I have checked this on NC21 with PHP8.0, on an installation that was running version 0.17 of twofactor_gateway, and with the instructions stated, it worked for me. |
Changed Telegram API Class to one not having a Guzzle requirement. Tested with NC 21.0.0 on PHP 8.0.3 (on Alpine Linux Docker Container). Fixes nextcloud#426 and nextcloud#425
any idea to fix the issue and can use the app?
|
No fixed version has been released yet, not sure why. @ChristophWurst ? seyfahnis PR did fix the issues on master. But since a new build is created upon each PR, you may just use the latest, currently that would be https://github.com/nextcloud/twofactor_gateway/suites/2976746507/artifacts/67151078 . On my systems, I installed the version built right after seyfahnis merges, which is https://github.com/nextcloud/twofactor_gateway/suites/2969422777/artifacts/66939279. Mind that these PR builds come as .tar.gz.zip. If you want a fixed but nightlyish version, all you need to do is to download, unzip, ungzip/untar and move the unpacked directory to apps. |
thanks @nursoda is what I assumed... but of course this scenario of downtime is happening every time there is a version upgrade in NC and I do not know up to what point you can keep as valid application that causes an unavailability of the environment and of course, to fix the issues apply WA downloading packages, removing here, moving over there..... The point I would like to reason is , we know this app gives problems , shouldn't it be blocked from the app shop so users are not exposed to these problems until this is fixed? this is just a thought , of course I am open to any comments. |
The App-Store states that there is no NC 21 compatible version of this App. Also the pre-update routine points out that this app is incompatible to NC 21. If anyone ignores all this info and installs the app, I would assume that it is done intentionally. |
Lack of time. I'm doing this now. |
My nextcloud decided to upgrade to 21.
This extension is marked as incompatible.
Tried to enable it anyway.
Result: Nextcloud stopped completely working. Even OCC command broke with this output:
Solution was to move temporarily away the /var/www/nextcloud/apps/twofactor_gateway/ folder. Then Nextcloud worked again (and I could disable the app by settings page)
The text was updated successfully, but these errors were encountered: