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

Seems like database not initialized properly. Try to re-enable the app #114

Open
deimjons opened this issue May 2, 2023 · 11 comments
Open
Labels

Comments

@deimjons
Copy link

deimjons commented May 2, 2023

Describe the bug
Hi. I used nextcloud in docker container. db - postgress, nextcloud from stable-fpm-alpine with ffmpeg, imagemagick, procps, samba-client, supervisor. I can't find cloud_py_api in nextcloud UI so I installed that manualy. NC version 25.0.6

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Perform some actions '...'
  3. See error

Expected behavior
App just not working. with media DC the same

Screenshots
Снимок экрана 2023-05-02 в 12 48 29

Desktop (please complete the following information):

  • OS [e.g. docker from stable-fpm-alpine]
  • CPU [architecture x86]
  • Nextcloud version [e.g. 25.0.6]
  • Database configuration (postgres:9-alpine)
  • app version, that using cloud_py_api
  • cloud_py_api version [e.g. 0.1.7]
  • cloud_py_api config and admin settings (can be obtained in bug report admin settings section)
@andrey18106
Copy link
Member

@deimjons Do you have viewer and serverinfo apps installed and enabled? Did you installed and enabled cloud_py_api first, then mediadc?

@deimjons
Copy link
Author

Thanks for the ideas on what I need to check. Now it is working well for me. Looks like serverinfo was disabled. Please add some information to cloud_py_api documentation/description that serverinfo and viewer required.

Information for the people who will have similar problem:

You need to check that these two default apps are enabled.
https://github.com/nextcloud/serverinfo
https://github.com/nextcloud/viewer

In my case, I didn't see these apps in nextcloud UI. Not in enabled, not in disabled. Maybe they have a different name in UI - I don't know.
I just enable both with OSS command app:enable. In my case, serverinfo was disabled.

  1. I uninstalled mediaDC and cloud_py_api.
  2. Then enable serverinfo via OSS command app:enable serverinfo . (same with viewer)
  3. After that I installed cloud_py_api. It started to work.
  4. And the last step, I installed mediadc (installation take some time).

@TheSimpleZ
Copy link

I'm experiencing the same thing, except I already have the serverinfo and viewer apps enabled.

I see the following error in the logs:

Exception: Repair step 'OCA\Cloud_Py_API\Migration\AppDataInitializationStep' can't be instantiated: Could not resolve OCA\Cloud_Py_API\Service\UtilsService! Class "OCA\Cloud_Py_API\Service\UtilsService" does not exist

Some info:
OS [Docker nextcloud aio official image]
CPU [architecture x86]
Nextcloud version [26.0.2 RC1]
Database configuration (default aio config)
app version, that using cloud_py_api: N/A
cloud_py_api version [0.1.7]
cloud_py_api config and admin settings (can be obtained in bug report admin settings section)

@Arbel-arad
Copy link

I'm experiencing the same thing, except I already have the serverinfo and viewer apps enabled.

I see the following error in the logs:

Exception: Repair step 'OCA\Cloud_Py_API\Migration\AppDataInitializationStep' can't be instantiated: Could not resolve OCA\Cloud_Py_API\Service\UtilsService! Class "OCA\Cloud_Py_API\Service\UtilsService" does not exist

Some info: OS [Docker nextcloud aio official image] CPU [architecture x86] Nextcloud version [26.0.2 RC1] Database configuration (default aio config) app version, that using cloud_py_api: N/A cloud_py_api version [0.1.7] cloud_py_api config and admin settings (can be obtained in bug report admin settings section)

i am getting the exact same problem.
(i was on the latest aio version, then updated to beta, still same results)

@Arbel-arad
Copy link

i figured out the solution.
there was a folder left from when i first tried to install mediaDC
/mnt/ncdata/appdata_oc5bwmghpu5h/mediadc
after deleting that and installing cloud python api again the settings page shows up!

@TheSimpleZ
Copy link

I also got it working. I did not fiddle with any folders. Simply update to the latest version (0.1.8)

@Arbel-arad
Copy link

it doesn't seem like the update works with the brokenfolder still in place.
anyway it's good that you got it working.

@rumexcrisp
Copy link

rumexcrisp commented Jul 5, 2023

I also had an issue with installing cloud_py_api and mediadc and resolved it by deleting false entries in my database due to what i think was a migration error on one of the last updates. I explained the steps i took in detail here.

@weasam
Copy link

weasam commented Jul 20, 2023

I also had this problem on nextcloud 27.0.0

I followed along with another post trying to fix it by delete some config of MediaDC, but don't do this
------WARNING!!! DON'T DO THIS BELOW-----
I Wrongly deleted the database
oc_mediadc_photos, oc_mediadc_settings, oc_mediadc_tasks, oc_mediadc_tasks_details, oc_mediadc_videos table in database, and cloud_py_api in oc_appconfig table in database
It will bring you and error
OC\DB\Exceptions\DbalException: An exception occurred while executing a query: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'weasam_ncloud2.oc_mediadc_tasks' doesn't exist
------WARNING!!! DON'T DO THIS ABOVE-----

install cloud_py_api first then install MediaDC
Fortunately I copy the table from another newly installed nextcloud instance, keep in mind to backup your database first

@cuthulino
Copy link

I get the following Exception when installing cloud-py:
Exception: Repair step 'OCA\Cloud_Py_API\Migration\AppUpdateStep' can't be instantiated: Could not resolve OCA\ServerInfo\DatabaseStatistics! Class "OCA\ServerInfo\DatabaseStatistics" does not exist

(serverinfo app enabled)

@weasam
Copy link

weasam commented Dec 11, 2023

I have new instance installed, MediaDC installation issue come up again. After I enable some php function in php.ini, it install successfully, because my HestiaCP panel disable some php function by default

php.ini

....
; http://php.net/disable-functions
disable_functions = pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,passthru,popen
;;;;;;;;;;;;;;;;;;;;;; Custom Enabled begin ;;;;;;;;;;;;;;;;;;;;;;;;
; Enabled by Weasam moved from disable_function
; required by nextcloud: pcntl_signal,pcntl_signal_dispatch,shell_exec,exec,system,proc_open,
;;;;;;;;;;;;;;;;;;;;;; Custom Enabled end ;;;;;;;;;;;;;;;;;;;;;;;;
......

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

No branches or pull requests

7 participants