Skip to content

Error: Class "phpseclib\File\X509" not found #978

Description

@kyteinsky

Describe the bug

It seems like phpseclib was updated to major version 3 from 2 so the namespace now is phpseclib3. X502 is stated as being largely unchanged, which is the only part used in this repo.
So the only change might be required is to add a 3 here:

use phpseclib\File\X509;

https://docs.nextcloud.com/server/latest/developer_manual/release_notes/critical_changes.html#phpseclib-3-0
https://phpseclib.com/docs/why#phpseclib-30-vs-phspeclib-10--20

Steps/Code to Reproduce

occ app_api:app:update --all

Expected Results

updates all apps

Actual Results

An unhandled exception has been thrown:
Error: Class "phpseclib\File\X509" not found in /var/www/html/apps-extra/app_api/lib/Fetcher/ExAppArchiveFetcher.php:138
Stack trace:
#0 /var/www/html/apps-extra/app_api/lib/Fetcher/ExAppArchiveFetcher.php(40): OCA\AppAPI\Fetcher\ExAppArchiveFetcher->checkExAppSignature(Array)
#1 /var/www/html/apps-extra/app_api/lib/Service/ExAppService.php(241): OCA\AppAPI\Fetcher\ExAppArchiveFetcher->downloadInfoXml(Array, '')
#2 /var/www/html/apps-extra/app_api/lib/Service/ExAppService.php(281): OCA\AppAPI\Service\ExAppService->getLatestExAppInfoFromAppstore('translate2', '')
#3 /var/www/html/apps-extra/app_api/lib/Command/ExApp/Update.php(99): OCA\AppAPI\Service\ExAppService->getAppInfo('translate2', NULL, NULL, Array)
#4 /var/www/html/apps-extra/app_api/lib/Command/ExApp/Update.php(84): OCA\AppAPI\Command\ExApp\Update->updateExApp(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput), 'translate2')
#5 /var/www/html/3rdparty/symfony/console/Command/Command.php(326): OCA\AppAPI\Command\ExApp\Update->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#6 /var/www/html/3rdparty/symfony/console/Application.php(1083): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#7 /var/www/html/3rdparty/symfony/console/Application.php(324): Symfony\Component\Console\Application->doRunCommand(Object(OCA\AppAPI\Command\ExApp\Update), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#8 /var/www/html/3rdparty/symfony/console/Application.php(175): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#9 /var/www/html/lib/private/Console/Application.php(210): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#10 /var/www/html/console.php(92): OC\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput))
#11 /var/www/html/occ(15): require_once('/var/www/html/c...')
#12 {main}

Setup configuration

app_api = 35.0.0-dev.1
nextcloud = 35.0.0.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingphpPull requests that update Php code

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions