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

Settings list is empty & Internal Server Error #53

Closed
kevinkuan1969 opened this issue Feb 16, 2022 · 20 comments
Closed

Settings list is empty & Internal Server Error #53

kevinkuan1969 opened this issue Feb 16, 2022 · 20 comments
Labels
bug Something isn't working question Further information is requested solution Solution found and present.

Comments

@kevinkuan1969
Copy link

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

@ibib
Copy link

ibib commented Feb 16, 2022

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

@andrey18106 andrey18106 added the bug Something isn't working label Feb 17, 2022
@andrey18106
Copy link
Member

andrey18106 commented Feb 17, 2022

@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 andrey18106 reopened this Feb 17, 2022
@daufveila
Copy link

daufveila commented Feb 17, 2022

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

@andrey18106 andrey18106 added the solution Solution found and present. label Feb 17, 2022
@kevinkuan1969
Copy link
Author

Thanks @andrey18106 and it works.

@andrey18106 andrey18106 pinned this issue Feb 17, 2022
@DasGreff
Copy link

DasGreff commented Mar 4, 2022

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

@andrey18106
Copy link
Member

@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

@DasGreff
Copy link

DasGreff commented Mar 4, 2022

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

@andrey18106
Copy link
Member

@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?

@DasGreff
Copy link

DasGreff commented Mar 8, 2022

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

@PAStheLoD
Copy link

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.

andrey18106 added a commit that referenced this issue Oct 27, 2022
commit d8c3be9
Author: Nextcloud bot <[email protected]>
Date:   Thu Oct 27 03:00:36 2022 +0000

    [tx-robot] updated from transifex

    Signed-off-by: Nextcloud bot <[email protected]>

commit d6408fe
Author: Nextcloud bot <[email protected]>
Date:   Wed Oct 26 03:01:38 2022 +0000

    [tx-robot] updated from transifex

    Signed-off-by: Nextcloud bot <[email protected]>

commit 8acc2a1
Author: rakekniven <[email protected]>
Date:   Wed Oct 26 01:22:17 2022 +0200

    l10n: Adapted grammar (#77)

    "Successfully" is a filler word.

    Reported at Transifex.

    Signed-off-by: rakekniven <[email protected]>

commit 746fba3
Author: Nextcloud bot <[email protected]>
Date:   Tue Oct 25 03:05:43 2022 +0000

    [tx-robot] updated from transifex

    Signed-off-by: Nextcloud bot <[email protected]>

commit 21f8aaf
Author: Nextcloud bot <[email protected]>
Date:   Mon Oct 24 03:01:13 2022 +0000

    [tx-robot] updated from transifex

    Signed-off-by: Nextcloud bot <[email protected]>

commit 24556ea
Author: rakekniven <[email protected]>
Date:   Sun Oct 23 17:41:34 2022 +0200

    l10n: Fixes (#76)

    * l10n: Fixed typo

    Reported at Transifex.

    Signed-off-by: rakekniven <[email protected]>

    * l10n: Changed casing

    Reported at Transifex.

    Signed-off-by: rakekniven <[email protected]>

    * l10n: Fixed typo and changed grammar

    Reported at Transifex.

    Signed-off-by: rakekniven <[email protected]>

    * l10n: Changed grammar

    Reported at Transifex.

    Signed-off-by: rakekniven <[email protected]>

    Signed-off-by: rakekniven <[email protected]>

commit 285f7f8
Author: Nextcloud bot <[email protected]>
Date:   Sun Oct 23 03:01:00 2022 +0000

    [tx-robot] updated from transifex

    Signed-off-by: Nextcloud bot <[email protected]>

commit 6dbad13
Author: Nextcloud bot <[email protected]>
Date:   Sat Oct 22 03:02:10 2022 +0000

    [tx-robot] updated from transifex

    Signed-off-by: Nextcloud bot <[email protected]>

commit a3fb56e
Author: Nextcloud bot <[email protected]>
Date:   Fri Oct 21 09:54:02 2022 +0000

    [tx-robot] updated from transifex

    Signed-off-by: Nextcloud bot <[email protected]>

commit defee7e
Author: Andrey Borysenko <[email protected]>
Date:   Mon Oct 17 16:43:28 2022 +0300

    Added Transifex config

commit dbdd0bb
Author: Andrey Borysenko <[email protected]>
Date:   Mon Mar 21 18:23:55 2022 +0200

    Added notice. Added CoD. Turned off cron schedule for stale workflow

commit 959be6c
Author: Andrey Borysenko <[email protected]>
Date:   Thu Feb 17 11:24:22 2022 +0200

    Fix #53

commit a7f1cc2
Author: Andrey Borysenko <[email protected]>
Date:   Tue Feb 15 01:12:54 2022 +0200

    Revert Python version check

commit c093b3c
Author: Andrey Borysenko <[email protected]>
Date:   Mon Feb 14 17:16:51 2022 +0200

    MediaDC 0.1.9 (#52)
@bigcat88
Copy link
Collaborator

Is this still a current issue?

@bigcat88 bigcat88 added the question Further information is requested label Dec 20, 2022
@SpyFax
Copy link

SpyFax commented Dec 21, 2022

@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.

@andrey18106
Copy link
Member

@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.

@SpyFax
Copy link

SpyFax commented Dec 22, 2022

@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.

@andrey18106
Copy link
Member

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

@SpyFax
Copy link

SpyFax commented Jan 4, 2023

@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

@andrey18106
Copy link
Member

@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

@SpyFax
Copy link

SpyFax commented Jan 16, 2023

@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

@andrey18106
Copy link
Member

Closing as stale and resolved.

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

@kanwarplaha
Copy link

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working question Further information is requested solution Solution found and present.
Projects
None yet
Development

No branches or pull requests

9 participants