Skip to content
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

PlaySMS configuration is not working #414

Open
EasyNetDev opened this issue Jan 19, 2021 · 3 comments
Open

PlaySMS configuration is not working #414

EasyNetDev opened this issue Jan 19, 2021 · 3 comments

Comments

@EasyNetDev
Copy link

Hi,

I've tried this app for NextCloud 20.0.5, but after selecting playsms as SMS provider and adding URL, user and pass I go an error:

sudo -u www-data php /var/www/nextcloud/occ twofactorauth:gateway:configure sms
Please choose a SMS provider (websms, playsms, clockworksms, puzzelsms, ecallsms, voipms, huawei_e3531, spryng, sms77io, ovh, clickatellcentral, clicksend): playsms
Please enter your PlaySMS URL: https://playsms.MyDomain.com
Please enter your PlaySMS username: YYYYYYYYY
Please enter your PlaySMS password: XXXXXXXXXXXXXXXXXXX
An unhandled exception has been thrown:
TypeError: Return value of "OCA\TwoFactorGateway\Command\Configure::execute()" must be of the type int, "null" returned. in /var/www/nextcloud/apps/mail/vendor/symfony/console/Command/Command.php:261
Stack trace:
#0 /var/www/nextcloud/apps/mail/vendor/symfony/console/Application.php(920): Symfony\Component\Console\Command\Command->run()
#1 /var/www/nextcloud/apps/mail/vendor/symfony/console/Application.php(266): Symfony\Component\Console\Application->doRunCommand()
#2 /var/www/nextcloud/apps/mail/vendor/symfony/console/Application.php(142): Symfony\Component\Console\Application->doRun()
#3 /var/www/nextcloud/lib/private/Console/Application.php(215): Symfony\Component\Console\Application->run()
#4 /var/www/nextcloud/console.php(100): OC\Console\Application->run()
#5 /var/www/nextcloud/occ(11): require_once('/var/www/nextcl...')
#6 {main}root@NextCloud-01:/var/www/nextcloud# mcedit /var/www/nextcloud/apps/mail/vendor/symfony/console/Command/Command.php

Also for PlaySMS I know that is necessary a hash to access the platform.

@ChristophWurst
Copy link
Member

The Configure command has to return an int from all paths.

@EasyNetDev
Copy link
Author

Hi,

Checking the code I'm noticing this:

    /**
     * Executes the current command.
     *
     * This method is not abstract because you can use this class
     * as a concrete class. In this case, instead of defining the
     * execute() method, you set the code to execute by passing
     * a Closure to the setCode() method.
     *
     * @return int 0 if everything went fine, or an exit code
     *
     * @throws LogicException When this abstract method is not implemented
     *
     * @see setCode()
     */
    protected function execute(InputInterface $input, OutputInterface $output)
    {
        throw new LogicException('You must override the execute() method in the concrete command class.');
    }

This function is extremely simple function and it doesn't return anything.

@ChristophWurst
Copy link
Member

@return int 0 if everything went fine, or an exit code

Here you go. This is documented behavior in Symfony 4.4 if you don't trust me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants