Missing composer.json in 4.16.0?

Hi,
I just started the automatic Update to 4.16.0 from within the Matomo Backend.
I was greeted with the message that composer was not installed and how I could install it.

But when I tried php composer.phar install I was told:

Composer could not find a composer.json file in /var/www/html
To initialize a project, please create a composer.json file. See https://getcomposer.org/basic-usage

There was no composer.json file anywhere. So I looked into the GIT repo and found it. I manually created the file withe the content from GIT and now the installation/update worked fine.

I looked into the Matomo.zip downloaded from the Matomo Website, and there was no composer.json either.
What am I missing? Why is composer.json needed but not included?

Hi @Thomas_Oliver_Moll
Maybe @innocraft , the project maintainer can have a check on this?

@heurteph-ei was this just a ping towards @innocraft, or am I supposed to contact them?

Hello @Thomas_Oliver_Moll composer isn’t necessary when installing using our built packages. Can you please try to re-upload the built release for 4.16 (Backing up your config file and then copying it into the config file). Please let us know how it goes.

What do you mean by “build package” and “re-upload”

All I did was to press the button for automatic update when prompted in the backend?

I got my installation working now, so I don’t know why I should change anything, now after I fixed it.

I just wanted to let you know, that the automatic update tried and failed to use composer without me changing any settings.

You say composer is not needed - but the automatic update thoght otherwise.

But I do wonder why noone else had this problem.

1 Like

I have the same problem. I am using Matomo with docker and I have no Idea how I can solve this issue. When I follow the instruction of the website to install composer in the docker I get also the message with the missing composer.json
How did you solve this?
Thanks
GĂĽnter

As I said, I naively downloaded the composer.json from the matomo GIT-Repo and manually copied it into the document root of my Docker.

The update tool suggests 2 steps:
First to download composer via curl
Then to install it

The first step worked without problem
The second one worked after putting the composer.json from git

I’m not at my computer right now, if necessary I can provide links to the file later.

There, found it

https://raw.githubusercontent.com/matomo-org/matomo/5.x-dev/composer.json

I just logged into my container
sudo docker exec -it matomo_app ash

and pulled the file with wget
wget https://raw.githubusercontent.com/matomo-org/matomo/5.x-dev/composer.json

2 Likes

Hi Thomas!
Thank you, that helped me a lot!
GĂĽnter

1 Like

Hi,
I just realized that the archive cron job was non-functional. it just terminated without output and without error.
But that could be fixed after extracting the files matomo-latest.zip over the ones in my Docker Container and following the advice from the System-Check from within the Matomo GUI to remove a lot of files that are superfluous.

Not sure if all problems are fixed now, the archiving of last Weeks data will take a while. Just wanted to give you a heads up.

1 Like