Issue after update to Grocy 4.2

Salut!
This is a continuation of my previous post about issues with updating Grocy from 4.03 to 4.1.0
Today I’ve tried to update Grocy from 4.03 to 4.2.0 and nothing has changed in regards to the result (There’s still error 500 - crs error - see below)
So it looks like I’m stuck with 4.03.
@MokuJinJin @kanhu have you already tried the update to 4.2? did it work for you?

I did install a second instance of grocy and that works fine.
I thought of exporting the database from 4.03 and import it into 4.2 but I don’t know (yet) if there is a doable way to backup and restore the complete database.
It would certainly be easier if the update would work.
I’ve invested a lot of time building my database and starting from scratch is not an option for me right now.

I’ve just noticed that those issue on Git . So it looks like other people also still can’t upgrade.

I don’t use grocy (but I think I will). There is this issue on github talking about backup and restore

Since you have installed a second instance, try copying all the content of /data folder from the older one to the new one. You may have to stop phpfpm before doing it as mentioned in the issue and restart it after that. And don’t forget to give the copied files the proper permissions and ownership.
Good luck

1 Like

Salut,

I’ve tried it too.
Same result.
Then I tried to install fresh 4.2 and try to connect with android app, and no luck, it won’t connect.

Update doesn’t work
With fresh install, android won’t connect.

Like you I’m stuck with 4.0.3

I just hope there will be no breaking change for a long time,enough time to wait an update to work.

1 Like

It’s a known issue that the Android app doesn’t work with Version 4.2. It will take some time until that works. See Git

Because of that it might be too early for me anyways to switch to 4.2 .
For now I will way for the Android app to be compatible because I need it.

thanks @jarod5001 . Maybe I’ll try that, but I fear that I somehow have to enter the Docker container for Grocy and mess around with data to copy back and forth. I have some knowledge of docker, but not that much. Since more people are affected by this update issue, maybe it will be fixed at some point in time, but if not, I guess I’ll have to try
the backup and restore thing if I want to upgrade.

Hi fellow Grocy users.
My Grocy has been broken for some time as well, i updated to 4.2 today and it was still broken. I tried creating a backup and restoring, but Grocy was still broken.

I looked at the nginx error log and it appears i was missing some autoload files. Since it is a php application which uses composer, i thought recreating the autoload files would fix it and it did. Somehow composer files were missing from the directory, so i downloaded them from the original git repository.
I have no idea, if what i did was the correct thing to do (regarding YunoHost), but at least Grocy is working again for me.

This solution is based on my experience with php applications, i lack knowledge about the inner workings of YunoHost, to be sure this will not create problems in the future. Make sure to create a backup just in case this should break something.

yunohost backup create --apps grocy

If you are interested in trying this as well, i will document the steps i took in the shell:

# switch to grocy user
su - grocy
# make sure we are in the right directory
cd
# setup composer (see https://getcomposer.org/download/)
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
php -r "if (hash_file('sha384', 'composer-setup.php') === 'dac665fdc30fdd8ec78b38b9800061b4150413ff2e3b6f88543c636f7cd84f6db9189d43a81e5503cda447da73c7e5b6') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"
php composer-setup.php
rm composer-setup.php
# get composer.json and composer.lock from git repository
wget https://raw.githubusercontent.com/grocy/grocy/master/composer.lock
wget https://raw.githubusercontent.com/grocy/grocy/master/composer.json
# install dependencies/update autoload files
php8.2 composer.phar install

After this your Grocy installation should be working again.
The android app has not yet been updated and spits out a warning, but the changelog of Grocy does not list serious api changes, so i guess ignoring the warning will do no harm: Changelog & Release History | Grocy