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

Trello JSON Import Error #4818

Open
88fingerslukee opened this issue Jun 15, 2023 · 4 comments
Open

Trello JSON Import Error #4818

88fingerslukee opened this issue Jun 15, 2023 · 4 comments

Comments

@88fingerslukee
Copy link

I'm trying to do a JSON Trello Import and I Get the following error. Any ideas?

An unhandled exception has been thrown:
Error: Typed property OCA\Deck\Service\Importer\BoardImportService::$systemInstance must not be accessed before initialization in /var/www/nextcloud/apps/deck/lib/Service/Importer/BoardImportService.php:184
Stack trace:
#0 /var/www/nextcloud/apps/deck/lib/Service/Importer/BoardImportService.php(414): OCA\Deck\Service\Importer\BoardImportService->getImportSystem()
#1 /var/www/nextcloud/apps/deck/lib/Service/Importer/BoardImportService.php(398): OCA\Deck\Service\Importer\BoardImportService->getJsonSchemaPath()
#2 /var/www/nextcloud/apps/deck/lib/Service/Importer/BoardImportCommandService.php(91): OCA\Deck\Service\Importer\BoardImportService->validateConfig()
#3 /var/www/nextcloud/apps/deck/lib/Service/Importer/BoardImportService.php(430): OCA\Deck\Service\Importer\BoardImportCommandService->validateConfig()
#4 /var/www/nextcloud/apps/deck/lib/Service/Importer/BoardImportCommandService.php(176): OCA\Deck\Service\Importer\BoardImportService->bootstrap()
#5 /var/www/nextcloud/apps/deck/lib/Service/Importer/BoardImportCommandService.php(181): OCA\Deck\Service\Importer\BoardImportCommandService->bootstrap()
#6 /var/www/nextcloud/apps/deck/lib/Command/BoardImport.php(87): OCA\Deck\Service\Importer\BoardImportCommandService->import()
#7 /var/www/nextcloud/3rdparty/symfony/console/Command/Command.php(255): OCA\Deck\Command\BoardImport->execute()
#8 /var/www/nextcloud/3rdparty/symfony/console/Application.php(1009): Symfony\Component\Console\Command\Command->run()
#9 /var/www/nextcloud/3rdparty/symfony/console/Application.php(273): Symfony\Component\Console\Application->doRunCommand()
#10 /var/www/nextcloud/3rdparty/symfony/console/Application.php(149): Symfony\Component\Console\Application->doRun()
#11 /var/www/nextcloud/lib/private/Console/Application.php(211): Symfony\Component\Console\Application->run()
#12 /var/www/nextcloud/console.php(100): OC\Console\Application->run()
#13 /var/www/nextcloud/occ(11): require_once('...')

@solracsf
Copy link
Member

solracsf commented Jun 24, 2023

Can you edit /var/www/nextcloud/apps/deck/lib/Service/Importer/BoardImportService.php

And replace:

if (!is_object($this->systemInstance)) {

with

if (!is_object($this->systemInstance) || $this->systemInstance === null) {

And retry please?

@dewittlebook
Copy link

So I get the same issue (posted below is after the change and docker down/up was run):

Error: Typed property OCA\Deck\Service\Importer\BoardImportService::$systemInstance must not be accessed before initialization in /var/www/html/custom_apps/deck/lib/Service/Importer/BoardImportService.php:184
Stack trace:
#0 /var/www/html/custom_apps/deck/lib/Service/Importer/BoardImportService.php(414): OCA\Deck\Service\Importer\BoardImportService->getImportSystem()
#1 /var/www/html/custom_apps/deck/lib/Service/Importer/BoardImportService.php(398): OCA\Deck\Service\Importer\BoardImportService->getJsonSchemaPath()
#2 /var/www/html/custom_apps/deck/lib/Service/Importer/BoardImportCommandService.php(91): OCA\Deck\Service\Importer\BoardImportService->validateConfig()
#3 /var/www/html/custom_apps/deck/lib/Service/Importer/BoardImportService.php(430): OCA\Deck\Service\Importer\BoardImportCommandService->validateConfig()
#4 /var/www/html/custom_apps/deck/lib/Service/Importer/BoardImportCommandService.php(176): OCA\Deck\Service\Importer\BoardImportService->bootstrap()
#5 /var/www/html/custom_apps/deck/lib/Service/Importer/BoardImportCommandService.php(181): OCA\Deck\Service\Importer\BoardImportCommandService->bootstrap()
#6 /var/www/html/custom_apps/deck/lib/Command/BoardImport.php(87): OCA\Deck\Service\Importer\BoardImportCommandService->import()
#7 /var/www/html/3rdparty/symfony/console/Command/Command.php(298): OCA\Deck\Command\BoardImport->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#8 /var/www/html/3rdparty/symfony/console/Application.php(1040): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#9 /var/www/html/3rdparty/symfony/console/Application.php(301): Symfony\Component\Console\Application->doRunCommand(Object(OCA\Deck\Command\BoardImport), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#10 /var/www/html/3rdparty/symfony/console/Application.php(171): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#11 /var/www/html/lib/private/Console/Application.php(211): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#12 /var/www/html/console.php(100): OC\Console\Application->run()
#13 /var/www/html/occ(11): require_once('/var/www/html/c...')
#14 {main}

However, my ../deck directory is under ../custom_apps instead of just ../apps
I did try running it again after doing your recommended change and then again after after stopping and starting the stack again

It is also extremely likely that my config.json and data.json are incorrectly setup, but that is a different issue I think..

If it is relevant I am running inside of a docker container instead of bare metal

@ArkadRadz
Copy link

Just had the same issue.
What solved it for me was editing the following line 64 and changing it from:

	private ?ABoardImportService $systemInstance;

to:

	private ?ABoardImportService $systemInstance = null;

I also initially replaced the following line 186 but this did not fix the issue.

		if (!is_object($this->systemInstance)) {

with

                if (!is_object($this->systemInstance) || $this->systemInstance === null) {

For more info I'm using PHP 8.2.7 using the linuxserver.io nextcloud docker image. I did not restart the container after making the changes in the PHP script.

@dewittlebook
Copy link

That seems to have fixed it for me, I successfully imported a Trello JSON file, thanks all

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

No branches or pull requests

5 participants