cloud-py-api / mediadc

Nextcloud Media Duplicate Collector application
https://apps.nextcloud.com/apps/mediadc
GNU Affero General Public License v3.0
95 stars 8 forks source link

Enabling MediaDC fails #24

Closed Superharz closed 3 years ago

Superharz commented 3 years ago

Describe the bug Enabling MediaDC fails.

To Reproduce Steps to reproduce the behavior:

  1. Go to Apps
  2. Install MediaDC
  3. MediaDC is listed under Disabled Apps
  4. Clicking Enable does nothing. Multiple clicking brings the error: An error occured during the request. Unable to proceed
  5. See Nextcloud Log:

Expected behavior MediaDC is successfully enabled.

Screenshots grafik

Setup:

andrey18106 commented 3 years ago

@Superharz Hi, thanks for your bug report!

We have successfully reproduced this error, will figure out why it happens and provide a solution as soon as it becomes known.

andrey18106 commented 3 years ago

@Superharz Good catch. Figured out what's a problem.

I didn't know about custom app directories configuration.

Will be fixed in the next MediaDC update.

If you don't want to wait for an update, you can edit manually some files. Before that check your config file (nextcloud/config/config.php => 'apps_paths', if you haven't changed it there should be custom_apps directory for other apps)

In a file nextcloud/[your custom_apps directory according to config]/mediadc/lib/Migration/AppDataInitializationStep.php on line 53 change '/apps/' to your directory ('/custom_apps/'):

$data_file = getcwd() . '/apps/' . Application::APP_ID . "/lib/Migration/data/app_data_Version0001Date20210627153636.json"; to $data_file = getcwd() . '/custom_apps/' . Application::APP_ID . "/lib/Migration/data/app_data_Version0001Date20210627153636.json";

and in a file nextcloud/custom_apps/mediadc/lib/Service/PythonService.php on line 50 change:

$this->cwd = getcwd() . '/apps/' . Application::APP_ID . '/lib/Service/python'; to $this->cwd = getcwd() . '/custom_apps/' . Application::APP_ID . '/lib/Service/python';

Make sure that you have python3 and distutils installed (maybe needed additional docker configuration). If you find some other issues or questions, feel free to write here.

Superharz commented 3 years ago

Tried out your changes. Works like a charm. Thanks :)

Superharz commented 3 years ago

I had to manually install python and pip in the container. But now it works.