nextcloud / social

🎉 Social can be used for work, or to connect to the fediverse!
https://apps.nextcloud.com/apps/social
GNU Affero General Public License v3.0
491 stars 59 forks source link

"Base table or view not found" issue after removal of tables #885

Open ghost opened 4 years ago

ghost commented 4 years ago

Describe the bug The issue may sound dumb, and maybe it actually is, but... Please help a beginner! I can't just create an empty table, it is forbidden by MariaDB. I have the latest stable NC version available at the moment (18.0.3). I used these commands as stated here: grep -rl social_a2_cache_documts apps/social/| xargs sed -i s/social_a2_cache_documts/social_a2_cache_docum/g grep -rl social_a2_request_queue apps/social/| xargs sed -i s/social_a2_request_queue/social_a2_req_queue/g grep -rl social_a2_stream_action apps/social/| xargs sed -i s/social_a2_stream_action/social_a2_stream_act/g

After applying the fix I headed to the app itself to check whether everything is working. It really launched, but the URL of the server appeared to be local (192.168.1.8) because I used to test the server on local network. I decided to finally change overwrite.cli.url to my domain and reinstall the app. Used 'sudo -u www-data php occ social:reset' to rest the app as stated in the README.md document. Flushing failed (sorry, can't get reference). I opened mariadb and removed all tables containing nextcloud.oc_sociala2 ( for wildcard) (as shown here). After deleting the app completely (disabling through the NC GUI and removing the folder with sudo rm -Rd apps/social), I clicked "Download and enable" only to observe the error

An error occured during the request. Unable to proceed.
An exception occurred while executing 'SELECT COUNT(*) AS `count` FROM `oc_social_a2_follows` `f`': SQLSTATE[42S02]: Base table or view not found: 1146 Table 'nextcloud.oc_social_a2_follows' doesn't exist

In desperate attempt to fix the issue, I issued a new command: sudo -u www-data php occ config:app:set --value 0.2.100 social installed_version. Alas, nothing changed. Then, I tried -u www-data php occ config:app:set --value 0.0.000 social installed_version as described here. Please help :smiley_cat: Also, have a great day!

Expected behavior Creation of the mentioned tables and appearance of my domain in the app.

Client details:

ghost commented 4 years ago
An error occured during the request. Unable to proceed.
There is no table with name 'nextcloud.oc_social_a2_stream_action' in the schema.

This error occurred after I destroyed the folder of the app inside nextcloud/apps and reinstalled it using git and make, as described in README.md

ghost commented 4 years ago

I tried the commands below from here, but...

wildcard@wildcard : /var/www/html/nextcloud $ sudo -u www-data php occ social:reset
There are no commands defined in the "social" namespace.
wildcard@wildcard : /var/www/html/nextcloud $ sudo -u www-data php occ social:reset --uninstall There are no commands defined in the "social" namespace.

ghost commented 4 years ago

Looks oddly similar to this issue, but the methods are not effective in my case (namespace is not installed, URL in setup looks like this: https://smth.something.owo/

ghost commented 4 years ago

I think I should add the tables, but what should be in them? Also, they are added the minute is enabled, right? Why doesn't it create new tables now, when I am reinstalling the app? Maybe I should change something in Nextcloud?

violoncelloCH commented 4 years ago

if you want to start fresh with the current social (v0.3) the command occ social:reset --uninstall could help