mediadc icon indicating copy to clipboard operation
mediadc copied to clipboard

Settings list is empty & Internal Server Error

Open kevinkuan1969 opened this issue 3 years ago • 10 comments
trafficstars

Nextcloud 22.2.3 Python 3.8.10 Ubuntu 20.14 MySQL 8.0.28 PHP 7.43

An unhandled exception has been thrown: OCP\AppFramework\Db\DoesNotExistException: Did expect one result but found none when executing: query "SELECT * FROM *PREFIX*mediadc_settings WHERE name = :dcValue1"; in /var/www/nextcloud/lib/public/AppFramework/Db/QBMapper.php:283

kevinkuan1969 avatar Feb 16 '22 01:02 kevinkuan1969

Is for me reproducible under a fresh nextcloud installation. Error occurs after trying to log on after installing mediadc.

ibib avatar Feb 16 '22 21:02 ibib

@kevinkuan1969 @ibib Hi! Yea, it's my flaw.

To fix it follow the next steps, before waiting for the next update (I'll re-release 0.1.9 soon):

  1. Disable MediaDC via GUI or CLI (occ app:disable mediadc)
  2. Update file /lib/Service/UtilsService.php like in the commit.
  3. Connect to your database via GUI or CLI and execute some queries to the Nextcloud database:
    • drop database table *prefix*_mediadc_settings (DROP TABLE oc_mediadc_settings;)
    • delete mediadc migration from *prefix*_migrations (DELETE FROM oc_migrations WHERE app='mediadc';)
  4. Enable MediaDC via GUI or CLI (occ app:enable mediadc)

The problem should be resolved and the mediadc_settings table should be filled with data now.

Let us know if it helps or not.

andrey18106 avatar Feb 17 '22 09:02 andrey18106

I had the same issue and could solve it with the steps, from @andrey18106

daufveila avatar Feb 17 '22 12:02 daufveila

Thanks @andrey18106 and it works.

kevinkuan1969 avatar Feb 17 '22 15:02 kevinkuan1969

I have the same issue here with the v0.1.9, even on fresh install and database cleanup

I'm on Nextcloud 22.2.5 Python 3.8.10 Ubuntu 20.04.4 LTS PHP : 7.4.25 MariaDB : 10.5.12

Here's a pastebin with the error i get when launching occ with mediadc enabled https://pastebin.com/mD2j0gnm

DasGreff avatar Mar 04 '22 08:03 DasGreff

@DasGreff Yea, it seems like something another causing an issue. Unfortunately, because of the war in Ukraine, I could investigate this later, as soon as it is possible, but for now, as for a quick view - looks like Dependency Injection not working for some reason. Are you using Nextcloud Docker or manual installation?

Try to install MediaDC manually by cloning this repository into your Nextcloud apps folder:

  1. Delete mediadc (installed from store).
  2. git clone https://github.com/andrey18106/mediadc.git --depth 1 -b main /path/to/nextcloud/apps/mediadc
  3. php -f /path/to/nextcloud/occ app:enable mediadc

andrey18106 avatar Mar 04 '22 17:03 andrey18106

It's a manual instalation of Nextcloud inside an LXC caontainer

I had the same issue instaling mediadc by cloning it, i rolled back to v 0.1.8

@andrey18106 hope you are safe, take care of yourself first, this can wait

DasGreff avatar Mar 04 '22 17:03 DasGreff

@DasGreff Thanks, I'm safe for now.

Just a little question, why in your error logs, collectorService written from the small letter - of course, it can't find it, because there is CollectorService in a capital case.

Can you describe your configuration in more detail, to have an overall understanding, of why it could happen?

With MediaDC v0.1.8 it works fine?

andrey18106 avatar Mar 04 '22 18:03 andrey18106

Yes it works fine with v0.1.8

I installed Nextcloud with the archive file downloadable on nextcloud site on my ubuntu which is a lxd container I then installed MediaDC app with the appstore within the nextcloud app

If you'll need more info, i will provide them

DasGreff avatar Mar 08 '22 15:03 DasGreff

Hi, just one more datapoint, I get a similar error on version 0.1.9 on Hetzner's Storage Share 24.0.5 (which is their branded nextcloud [fork?]). Unfortunately it seems there's no way to access the server logs.

PAStheLoD avatar Oct 23 '22 17:10 PAStheLoD

Is this still a current issue?

bigcat88 avatar Dec 20 '22 22:12 bigcat88

@kevinkuan1969 @ibib Hi! Yea, it's my flaw.

To fix it follow the next steps, before waiting for the next update (I'll re-release 0.1.9 soon):

1. Disable MediaDC via GUI or CLI (`occ app:disable mediadc`)

2. Update file `/lib/Service/UtilsService.php` like in the commit.

3. Connect to your database via GUI or CLI and execute some queries to the Nextcloud database:
   
   * drop database table `*prefix*_mediadc_settings` (`DROP TABLE oc_mediadc_settings;`)
   * delete mediadc migration from `*prefix*_migrations` (`DELETE FROM oc_migrations WHERE app='mediadc';`)

4. Enable MediaDC via GUI or CLI (`occ app:enable mediadc`)

The problem should be resolved and the mediadc_settings table should be filled with data now.

Let us know if it helps or not.

Update form 0.2.0 to 0.3.1 on Nextcloud 25.0.2, and flow this step . MediaDC web page can open but task not work , always show pending, When use version 0.2.0 task run only take a few seconds.

SpyFax avatar Dec 21 '22 01:12 SpyFax

@SpyFax MediaDC starting from 0.3.0 version requires cloud_py_api app to be installed and enabled first. After that you can just re-enable MediaDC to properly update settings and download pre-compiled python binary, then it should work. Let us know if it works or not.

andrey18106 avatar Dec 21 '22 10:12 andrey18106

@SpyFax MediaDC starting from 0.3.0 version requires cloud_py_api app to be installed and enabled first. After that you can just re-enable MediaDC to properly update settings and download pre-compiled python binary, then it should work. Let us know if it works or not.

I had install cloud_py_api first, then error message showing in log file. like Did expect one result but found none when executing: query "SELECT * FROM *PREFIX*mediadc_settings WHERE name = :dcValue1"; , I tried delete database table and re-enable MediaDC, then MediaDC page can open, but restart an old task or create new task both forzen at pending status.

SpyFax avatar Dec 22 '22 06:12 SpyFax

@SpyFax Check Nextcloud appdata folder, where delete mediadc/binaries/main file if it exists and re-enable MediaDC - python binary should be downloaded correctly.

andrey18106 avatar Dec 22 '22 10:12 andrey18106

@SpyFax Check Nextcloud appdata folder, where delete mediadc/binaries/main file if it exists and re-enable MediaDC - python binary should be downloaded correctly.

There is not have folder name binaries, but when I update to mediadc 0.3.2, it auto download some thing in python folder like this image

Then I tried to re-enable MediaDC and create new task, it still forzen at pending status. image

SpyFax avatar Jan 04 '23 02:01 SpyFax

@SpyFax binaries folder is in nextcloud appdata folder (/var/www/nextcloud/data/appdata_ncinstanceid/mediadc/binaries). Please, verify it and try again. Python folder - it's a source that you can use instead of pre-compiled binaries, but you need to manully install all required packages, check out instruction for that in wiki 0.3.0 notice

andrey18106 avatar Jan 04 '23 12:01 andrey18106

@SpyFax binaries folder is in nextcloud appdata folder (/var/www/nextcloud/data/appdata_ncinstanceid/mediadc/binaries). Please, verify it and try again. Python folder - it's a source that you can use instead of pre-compiled binaries, but you need to manully install all required packages, check out instruction for that in wiki 0.3.0 notice

Thanks, after re-download a main file that about 223M, task seem working now

$ ls -alh /var/www/nextcloud/data/appdata_ocaad8s3ujca/mediadc/binaries/
total 223M
drwxr-xr-x 2 www-data www-data 4.0K Jan 16 16:30 .
drwxr-xr-x 4 www-data www-data 4.0K Jan 16 16:13 ..
-rwxr-xr-x 1 www-data www-data 223M Jan 16 16:30 main

SpyFax avatar Jan 16 '23 09:01 SpyFax

Closing as stale and resolved.

If have any questions feel free to create a new issue.

andrey18106 avatar Jan 31 '23 20:01 andrey18106

@andrey18106 I tried to install MediaDC manually via occ and I still see "Internal Server Error".

$ php -f /var/www/html/occ app:enable mediadc
mediadc 0.3.9 enabled

I am running NextCloud AIO v29.0.3.

kanwarplaha avatar Jul 16 '24 04:07 kanwarplaha