TechnicPack / TechnicSolder

PHP web app that brings differential updates to the Technic Launcher and Technic Platform
https://docs.solder.io/
Other
169 stars 167 forks source link

Server Error while adding Mod Version, missing database table in sqlite #523

Closed RubenRME closed 8 years ago

RubenRME commented 8 years ago

I get an internal server error after trying to add a version for the mod. After inspecting the log I found this line

    [2015-12-28 09:01:15] production.ERROR: exception 'PDOException' with message 'SQLSTATE[HY000]: General error: 1 table modversions has no column named filesize' in <snip>/vendor/laravel/framework/src/Illuminate/Database/Connection.php:369

Obviously this was fixable by adding the table myself, though I found it quite worrying since this is the sqlite database that is bundled with Solder.

spannerman79 commented 8 years ago

All of your issues stem from #522

You are running on shared web hosting. Solder was never intended to be ran on a shared web hosting environment.

As a test i did a fresh new install of solder starting from scratch and I received no errors adding any mod versions as the changes you did in https://github.com/TechnicPack/TechnicSolder/issues/522#issuecomment-167577215 prevented the insert of the mod version into the table. You yourself caused your own issue.

@GenPage this is a non solder issue/shared web hosting issue and should be closed

GenPage commented 8 years ago

@spannerman79 Actually this is a bug, the job the applies new migrations to the sqlite database before committing did not run.

shaunoneil commented 8 years ago

I had the same issue - not on shared hosting. First time install, all went swimmingly until creating a version of a mod.

UI displayed an "Internal server error" message, with no details. Apache access.log shows POST /mod/add-version HTTP/1.1" 500 3230 "http://solder.mydomain.com/mod/view/1 Apache error.log shows nothing.

In app/storage/logs/ I have:

[2016-02-07 21:15:49] production.INFO: Found '/srv/mcrepo/mods/serverlist/serverlist-0001.zip' [] []
[2016-02-07 21:15:49] production.ERROR: exception 'PDOException' with message 'SQLSTATE[HY000]: General error: 1 table modversions has no column named filesize' in /srv/solder/vendor/laravel/framework/src/Illuminate/Database/Connection.php:369
Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[HY000]: General error: 1 table modversions has no column named filesize (SQL: insert into "modversions" ("mod_id", "version", "filesize", "md5", "updated_at", "created_at") values (1, 0001, 234, 41fc99e0fe6f4657c7664c3da4ec196d, 2016-02-07 21:15:49, 2016-02-07 21:15:49))' in /srv/solder/vendor/laravel/framework/src/Illuminate/Database/Connection.php:625

I solved this by issuing

php artisan down
php artisan migrate
php artisan up

It appears app/database-sample/production.sqlite was last modified 11 months ago, but the filesize feature was added 3 months ago. "filesize" really is missing from the modversions table if you set the server up per the "Getting started" docs.