mirror of
https://github.com/nextcloud/twofactor_gateway.git
synced 2026-04-25 09:05:55 +03:00
[GH-ISSUE #288] Cannot configure the gateway #65
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#65
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 @renal31 on GitHub (Oct 26, 2019).
Original GitHub issue: https://github.com/nextcloud/twofactor_gateway/issues/288
Hi,
I just installed TwoFactor Gateway v0.14.1 on nextcloud server v17.0.0.
When I try to configure the SMS client, I get the following exception :
`> occ twofactorauth:gateway:configure sms
An unhandled exception has been thrown:
TypeError: Argument 1 passed to OCA\TwoFactorGateway\Service\Gateway\SMS\Provider\WebSmsConfig::setUser() must be of the type string, null given, called in /var/www/html/custom_apps/twofactor_gateway/lib/Command/Configure.php on line 122 and defined in /var/www/html/custom_apps/twofactor_gateway/lib/Service/Gateway/SMS/Provider/WebSmsConfig.php:52
Stack trace:
#0 /var/www/html/custom_apps/twofactor_gateway/lib/Command/Configure.php(122): OCA\TwoFactorGateway\Service\Gateway\SMS\Provider\WebSmsConfig->setUser(NULL)
#1 /var/www/html/custom_apps/twofactor_gateway/lib/Command/Configure.php(81): OCA\TwoFactorGateway\Command\Configure->configureSms(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#2 /var/www/html/3rdparty/symfony/console/Command/Command.php(255): OCA\TwoFactorGateway\Command\Configure->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#3 /var/www/html/3rdparty/symfony/console/Application.php(908): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#4 /var/www/html/3rdparty/symfony/console/Application.php(269): Symfony\Component\Console\Application->doRunCommand(Object(OCA\TwoFactorGateway\Command\Configure), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#5 /var/www/html/3rdparty/symfony/console/Application.php(145): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#6 /var/www/html/lib/private/Console/Application.php(213): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#7 /var/www/html/console.php(97): OC\Console\Application->run()
#8 /var/www/html/occ(11): require_once('/var/www/html/c...')
`
Is this something known ?
Thanks & regards,
Renaud
@ChristophWurst commented on GitHub (Nov 12, 2019):
Were you asked any questions? It should actually ask for a username. But that is somehow set to
null.@JonasOelke commented on GitHub (Apr 13, 2020):
Hey Guys! Hope you all had a nice eastern.
I am trying to configure Telegram but I am getting the same error. I am running Nextcloud 18.0.3 and twofactor_gateway 0.15.1.
I am running nextcloud in a Docker-Container connected to a mariadb-server on the host (not dockerized). As of the nextcloud docker image the PHP-Version is 7.3.16.
This is the output of
docker exec --user www-data [container-id] php occ twofactorauth:gateway:configure telegramTrying to configure the sms gateway outputs @renal31's error:
It looks like that the setBotToken()-Function (or for SMS the setUSer()-Function) is called before the actual user input. Anyone having an idea why the user input could be skipped?
Best wishes,
Jonas
@JonasOelke commented on GitHub (Apr 26, 2020):
@ChristophWurst Do you have any idea on this?
@ChristophWurst commented on GitHub (Apr 27, 2020):
Please also try with the latest version.
I do not have much time to look into this right now, unfortunately.
@ChristophWurst commented on GitHub (Apr 27, 2020):
Look through the old tickets. This rings a bell but I don't recall what the problem was.
@ChristophWurst commented on GitHub (Apr 27, 2020):
Oh I think it is due to Docker. The php shell does not detect an interactive prompt, hence questions can't be answered. You need to invoke the command through Docker and pipe stdin into the containerized process.