mirror of
https://github.com/nextcloud/twofactor_gateway.git
synced 2026-04-25 17:15:53 +03:00
[GH-ISSUE #425] Nextcloud 21 incompatibility #91
Labels
No labels
0. to triage
1. to develop
3. to review
blocked
bug
discussion
duplicate
enhancement
enhancement
gateway:signal
gateway:signal
gateway:signal
gateway:sms
gateway:telegram
hacktoberfest
help wanted
invalid
needs info
php
pull-request
question
technical debt
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/twofactor_gateway-nextcloud#91
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @strites on GitHub (Feb 20, 2021).
Original GitHub issue: https://github.com/nextcloud/twofactor_gateway/issues/425
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)
@zauguin commented on GitHub (Feb 20, 2021):
The extension seems to work in Nextcloud 21 if you delete the
.../apps/twofactor_gateway/vendor/guzzlehttpdirectory.(It bundles a library guzzlehttp which is also bundled by Nextcloud 21, but in another version. The two versions interfere with one another, triggering the error. After removing the directory, both use the newer version from Nextcloud)
@strites commented on GitHub (Feb 21, 2021):
Thank you for the advice!
Indeed removing the guzlehttp directory made Telegram 2fa working again!
@strites commented on GitHub (Feb 21, 2021):
BUT
There is now a diarrhea of error logs about not being able to import the deleted folder
And 2fa is no more configurable in settings page
@ChristophWurst commented on GitHub (Feb 22, 2021):
Good observation: this has also causes issues in the past: https://github.com/nextcloud/twofactor_gateway/issues/349
@joekerna commented on GitHub (Mar 1, 2021):
I've removed the
guzzlehttpdirectory and logging in is working again.But my logfile is getting flooded with messages like:
@pcburcham commented on GitHub (Mar 4, 2021):
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.
@joekerna commented on GitHub (Mar 5, 2021):
In my case that's 154 lines of code... I'm scared!
@pcburcham commented on GitHub (Mar 5, 2021):
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.
@tetebueno commented on GitHub (Mar 6, 2021):
@pcburcham's approach worked for me (I'm using NC on Docker). Here's what I executed in order to follow his instructions:
Then enabled the app and that was it.
Hope it helps until this is fixed.
@boppy commented on GitHub (Apr 7, 2021):
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...
@tetebueno commented on GitHub (Apr 7, 2021):
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
custom_appsfolder under NC installation, then executed in the terminal: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
login/challenge/gateway_telegram).@tetebueno commented on GitHub (Apr 7, 2021):
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
occ twofactorauth:gateway:configure telegram.@boppy commented on GitHub (Apr 7, 2021):
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.
@tetebueno commented on GitHub (Apr 7, 2021):
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.
@doreks commented on GitHub (Apr 10, 2021):
hi!
im running NC into a docker. Im having the same issue, :
What would you recommend to solve it?
thanks for your support!
@boppy commented on GitHub (Apr 12, 2021):
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 note
The 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:
@boppy commented on GitHub (Apr 12, 2021):
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.
@rickgardner077 commented on GitHub (Apr 21, 2021):
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?
@nursoda commented on GitHub (Apr 21, 2021):
There are other 2FA ways that work already, but Gateway (SMS, Telegram, etc.) currently does not.
@ChristophWurst commented on GitHub (Apr 22, 2021):
I suggest that someone tests https://github.com/nextcloud/twofactor_gateway/pull/438 and then this can slowly move forward.
@matthias-pelger commented on GitHub (Apr 27, 2021):
Thanks for this. worked smoothly on an existing NC install!
Can I somehoe help you with something (logs?) to include this to the final version?
@boppy commented on GitHub (Apr 27, 2021):
@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.
@jandr commented on GitHub (May 19, 2021):
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.
@doreks commented on GitHub (Jun 15, 2021):
any idea to fix the issue and can use the app?
@nursoda commented on GitHub (Jun 15, 2021):
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.
@doreks commented on GitHub (Jun 16, 2021):
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.
thanks for your support
@boppy commented on GitHub (Jun 16, 2021):
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.
@ChristophWurst commented on GitHub (Jun 25, 2021):
Lack of time. I'm doing this now.