Error 500 on login after upgrade from 10.11 to 10.15 BadFunctionCallException

Steps to reproduce

  1. Use docker-compose to start a new 10.11 instance
  2. Change the version in the docker-compose.yml file to 10.15
  3. Run docker-compose up -d to start the containers with the updated ownCloud instance
  4. Downgrade back to 10.11 (I did this because 10.15 wasn’t working and I wasn’t interested in troubleshooting)
  5. Run docker-compose up -d again to start the containers with the downgraded ownCloud instance
  6. Attempt to log in

Expected behaviour

Login with 10.11 proceeds normally.

Actual behaviour

I get a 500 error and cannot log in.

Notes:

I experienced this issue and SOLVED it. I saw that someone else also experienced the problem and was not helped. I will put my solution in this thread.

The solution I found:

I managed to find the server logs that described the login error, and I found BadFunctionCallException: creationTime is not a valid attribute

The only thing I had changed was my ownCloud server container, and NOT my Redis or MariaDB containers. So, after removing and recreating the ownCloud container, when I was still having problems, I concluded that the upgrade had migrated something in one of these containers, probably MariaDB.

I entered the MariaDB container, logged into the database, and selected the ownCloud database. Using SELECT * FROM oc_accounts LIMIT 1;, I could see a column called creation_time. I took a guess that creation_time was new, added during the upgrade. So I deleted the column with: alter table oc_accounts drop column creation_time;

After that, I was able to log in successfully.