@narfk opened this Issue on February 2nd 2022

After triggering the automatic update a fatal error occurres

Expected Behavior

Upgrade to Matomo 4.7.0 with the well-known dialogue (Datebase update needed or similar)

Current Behavior

After the upgrade this dialog is displayed:

A fatal error occurred

Please contact the system administrator, or login to Matomo to learn more.

If you are Super User, but cannot login because of this error, you can still troubleshoot further. Follow these steps:
1) open the config/config.ini.php file and look for the salt value under [General].
2) edit this current URL you are viewing and add the following text (replacing salt_value_from_config by the salt value from the config file):

index.php?i_am_super_user=SALT&....

The upgrade is performed with a superuser!
According to the steps of the dialogue this happens:

A fatal error occurred

The following error just broke Matomo (v4.7.0):

File `../../CoreHome/vue/src/MenuDropdown/MenuDropdown.less` not found. in anonymous-file-0.less
in /srv/www/DocRoot/piwik/core/AssetManager/UIAssetMerger/StylesheetUIAssetMerger.php line 53            

Troubleshooting
Follow these steps to solve the issue or report it to the team:

    If you have just updated Matomo to the latest version, please try to restart your web server. This will clear the PHP opcache which may solve the problem.
    If this is the first time you see this error, please try refresh the page.
    If this error continues to happen, we appreciate if you send the error report to the Matomo team.

Further troubleshooting

If this error continues to happen, you may be able to fix this issue by disabling one or more of the Third-Party plugins. If you don't know which plugin is causing this error, we recommend to first disable any plugin not created by "Matomo" and not created by "InnoCraft". You can enable plugin again afterwards in the Plugins or Themes page under settings at any time.

CustomVariables     4.0.1   deactivate
InvalidateReports   4.0.1   deactivate
LoginTokenAuth  4.0.0   deactivate
MarketingCampaignsReporting     4.1.1   deactivate
Provider    4.0.3   deactivate

Possible Solution

No idea

Steps to Reproduce (for Bugs)

  1. Matomo 4.6.2
  2. Click automatich update to 4.7

Your Environment

  • Matomo Version: 4.6.2
  • Matomo Update History: 4.6.2,4.6.1,4.5.0,4.4.1,4.3.1,4.3.0-b3
  • PHP Version: 8.0.15
  • Memory limit: 2048M
  • Server Operating System: 5.10.76-linuxkit
  • PHP Disabled functions:
    pcntl_alarm, pcntl_fork, pcntl_waitpid, pcntl_wait, pcntl_wifexited, pcntl_wifstopped, pcntl_wifsignaled, pcntl_wifcontinued, pcntl_wexitstatus, pcntl_wtermsig, pcntl_wstopsig, pcntl_signal, pcntl_signal_dispatch, pcntl_get_last_error, pcntl_strerror, pcntl_sigprocmask, pcntl_sigwaitinfo, pcntl_sigtimedwait, pcntl_exec, pcntl_getpriority, pcntl_setpriority,
  • PHP INI max_execution_time: 30
  • PHP INI post_max_size: 32M
  • PHP INI max_input_vars: 10000
  • DB Prefix: piwik_
  • DB Charset: utf8mb4
  • MySQL Version: 8.0.28
  • Plugins Activated:
    API, Actions, Annotations, BulkTracking, Contents, CoreAdminHome, CoreConsole, CoreHome, CorePluginsAdmin, CoreUpdater, CoreVisualizations, CoreVue, CustomDimensions, CustomJsTracker, CustomVariables 4.0.1, DBStats, Dashboard, DevicePlugins, DevicesDetection, Diagnostics, Ecommerce, Events, GeoIp2, Goals, Heartbeat, ImageGraph, Insights, Installation, Intl, InvalidateReports 4.0.1, LanguagesManager, Live, Login, LoginTokenAuth 4.0.0, MarketingCampaignsReporting 4.1.1, Marketplace, Monolog, Morpheus, MultiSites, Overlay, PagePerformance, PrivacyManager, Provider 4.0.3, Proxy, Referrers, Resolution, SEO, ScheduledReports, SegmentEditor, SitesManager, Transitions, UserCountry, UserCountryMap, UserId, UserLanguage, UsersManager, VisitFrequency, VisitTime, VisitorInterest, VisitsSummary, WebsiteMeasurable
    *Plugins Deactivated:
    Feedback, IntranetMeasurable, MobileAppMeasurable, MobileMessaging, ProfessionalServices, RssWidget, TagManager, Tour, TwoFactorAuth, Widgetize
  • Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:96.0) Gecko/20100101 Firefox/96.0

Any advices?

@Globulopolis commented on February 2nd 2022 Contributor

I have this bug too.

How to fix:

  1. add an i_am_super_user variable with the salt from config as suggested, just to finish some actions.
  2. Thereafter download https://builds.matomo.org/matomo-latest.zip and unzip with replace over you current installation.
    Step 2 is required if matomo report any strange errors about any files while System Check. E.g. File integrity check.

PS! It's look like upgrade package isn't downloaded correctly by matomo updater. Because System Check was report me about strange file error with binary mode. I'm on Win7 and replace files from package via local copy from one logical drive to another.

@narfk commented on February 2nd 2022

With the variable i_am_super_user and the salt in the querystring the message 2 appears.

A fatal error occurred

The following error just broke Matomo (v4.7.0):

File `../../CoreHome/vue/src/MenuDropdown/MenuDropdown.less` not found. in anonymous-file-0.less
in /srv/www/DocRoot/piwik/core/AssetManager/UIAssetMerger/StylesheetUIAssetMerger.php line 53            

Troubleshooting
Follow these steps to solve the issue or report it to the team:

    If you have just updated Matomo to the latest version, please try to restart your web server. This will clear the PHP opcache which may solve the problem.
    If this is the first time you see this error, please try refresh the page.
    If this error continues to happen, we appreciate if you send the error report to the Matomo team.

Further troubleshooting

If this error continues to happen, you may be able to fix this issue by disabling one or more of the Third-Party plugins. If you don't know which plugin is causing this error, we recommend to first disable any plugin not created by "Matomo" and not created by "InnoCraft". You can enable plugin again afterwards in the Plugins or Themes page under settings at any time.

CustomVariables     4.0.1   deactivate
InvalidateReports   4.0.1   deactivate
LoginTokenAuth  4.0.0   deactivate
MarketingCampaignsReporting     4.1.1   deactivate
Provider    4.0.3   deactivate

Disabling the mentioned plugins does not help.
But thanks anyway

@Globulopolis commented on February 2nd 2022 Contributor

Disabling plugins will not help. Try to do step two as I'm mentioned above.

@narfk commented on February 2nd 2022

I have already tried this. This leads to the same result

@Globulopolis commented on February 2nd 2022 Contributor
@narfk commented on February 2nd 2022

i did ./console core:clear-caches before
Even the prive directories are ok:

  • Directories with write access:
    ✔ $DOC_ROOT/tmp ✔ $DOC_ROOT/tmp/assets ✔ $DOC_ROOT/tmp/cache ✔ $DOC_ROOT/tmp/climulti ✔ $DOC_ROOT/tmp/latest ✔ $DOC_ROOT/tmp/logs ✔ $DOC_ROOT/tmp/sessions ✔ $DOC_ROOT/tmp/tcpdf ✔ $DOC_ROOT/tmp/templates_c
@sgiehl commented on February 2nd 2022 Member

@narfk Did you check if the file plugins/CoreHome/vue/src/MenuDropdown/MenuDropdown.less exists on your install? Maybe it wasn't copied over correctly.

@courtens commented on February 2nd 2022

I had the same problem. MenuDropdown/MenuDropdown.less is missing. Where to get it: https://github.com/matomo-org/matomo/tree/4.x-dev/plugins/CoreHome/vue/src/MenuDropdown

That worked!

@MatomoForumNotifications commented on February 2nd 2022

This issue has been mentioned on Matomo forums. There might be relevant details there:

https://forum.matomo.org/t/update-to-matomo-v4-7-0-menudropdown-less-not-found/44623/2

@sgiehl commented on February 2nd 2022 Member

Hm... The file is definitely included in the last release zip. So I guess it might have been an issue with copying the file during the update.

@atom-box commented on February 2nd 2022

Confirming same solutionstrategy as @Globulopolis, et al, above.

  1. One directory was not copy after the update:
    Directory ../../CoreHome/vue/src/MenuDropdown/ was missing!

  2. After copying that directory from the latest.zip file or from https://github.com/matomo-org/matomo/tree/4.x-dev/plugins/CoreHome/vue/src/MenuDropdown to the server everything works fine.

@narfk commented on February 3rd 2022

I have tried to install 4.7.1 this morning.
After the automatic update i saw the same dialogues

A fatal error occurred

Please contact the system administrator, or login to Matomo to learn more.
...

And after that the same error happend

A fatal error occurred

The following error just broke Matomo (v4.7.0):

File `../../CoreHome/vue/src/MenuDropdown/MenuDropdown.less` not found. in anonymous-file-0.less
in /srv/www/DocRoot/piwik/core/AssetManager/UIAssetMerger/StylesheetUIAssetMerger.php line 53            

Troubleshooting
Follow these steps to solve the issue or report it to the team:

    If you have just updated Matomo to the latest version, please try to restart your web server. This will clear the PHP opcache which may solve the problem.
    If this is the first time you see this error, please try refresh the page.
    If this error continues to happen, we appreciate if you send the error report to the Matomo team.
...

I have checked the vue Files. I seems the the directory was there - but somehow invisible (i didnt see it in finder but in the shell i've got the message that the directory is there).
So I downloaded the archive matomo.zip manually und put the whole vue/MenuDropdown-Folder in it's place.
This seems to work - a bit.

But:
We run Matomo with Git and Docker.
After checkin in version 4.7.1 and starting a container on another environment, the same error occurs

File `../../CoreHome/vue/src/MenuDropdown/MenuDropdown.less` not found. in anonymous-file-0.less
in /srv/www/DocRoot/piwik/core/AssetManager/UIAssetMerger/StylesheetUIAssetMerger.php line 53

In my opinion there is something wrong with menudropdown at all.

@MatomoForumNotifications commented on February 3rd 2022

This issue has been mentioned on Matomo forums. There might be relevant details there:

https://forum.matomo.org/t/4-6-2-4-7-1-update-error/44631/2

@level420 commented on February 3rd 2022

@tsteur this issue is assigned to milestone 4.7.1 but does not seem to be resolved there, right? But 4.7.1 is already released.

@tsteur commented on February 3rd 2022 Member

@level420 it's not resolved. Moved this now to 4.7.2

There's a chance it won't happen anymore with the 4.7.1 release but it's not clear yet

@MatomoForumNotifications commented on February 7th 2022

This issue has been mentioned on Matomo forums. There might be relevant details there:

https://forum.matomo.org/t/4-6-2-4-7-1-update-error/44631/9

@atom-box commented on February 7th 2022

We continue to get a few emails a day about this.

And I don't know if this Angular.js file error is related. A user reported these
failures to load plugins/CoreHome/angularjs/reporting-page/reportingpage.directive.html and two other files on February 4th:


Failed to load HTML file:
Please check your server configuration. You may want to whitelist "*.html" files from the "plugins" directory. The HTTP status code is 500 for URL "plugins/CoreHome/angularjs/reporting-page/reportingpage.directive.html"

Failed to load HTML file:
Please check your server configuration. You may want to whitelist "*.html" files from the "plugins" directory. The HTTP status code is 500 for URL "plugins/CoreHome/angularjs/period-selector/period-selector.directive.html"

Failed to load HTML file:
Please check your server configuration. You may want to whitelist "*.html" files from the "plugins" directory. The HTTP status code is 500 for URL "plugins/CoreHome/angularjs/widget-loader/widgetloader.directive.html"
@65Q2M89mBVP53sCK commented on February 9th 2022

Just a thought:
Could the case sensitiv / case insensitive be a problem
I develop with MacOS (case insensitive) in a Docker container and deploy to Ubuntu Case sensitive wit git and Docker.

after update in the docker container on ubuntu the problem does not occurs.

@65Q2M89mBVP53sCK commented on February 9th 2022

Oh yeah!

After update and manually replace in my macOS / Docker Environment:

/srv/www/DocRoot/piwik/plugins/CoreHome/vue/src/MenuDropdown
-rw-rw-r--  1 ipuser webapp  751 Feb  3 05:02 MenuDropdown.adapter.ts
-rw-rw-r--  1 ipuser webapp 1.7K Feb  3 05:02 MenuDropdown.less
-rw-rw-r--  1 ipuser webapp 3.3K Feb  3 05:02 MenuDropdown.vue

After checkin in Git and run it with ubuntu / Docker

/piwik/plugins/CoreHome/vue/src/Menudropdown
-rw-r--r-- 1 ipuser webapp  751 Feb  9 14:26 Menudropdown.adapter.ts
-rw-r--r-- 1 ipuser webapp 1.7K Feb  9 14:26 Menudropdown.less
-rw-r--r-- 1 ipuser webapp 3.3K Feb  9 14:26 Menudropdown.vue

After renaming it on Ubuntu it seems to work.

I do not understand why.
Maybe a git bug?

@65Q2M89mBVP53sCK commented on February 9th 2022

Here is my fix

Macos:

cd ./piwik/plugins/CoreHome/vue/src
mv MenuDropdown/ _MenuDropdown/
git commit
mv _MenuDropdown/ MenuDropdown/
git commit

After that (build and start on ubuntu) it works fine

@atom-box commented on February 10th 2022

The emails from users experiencing this bug mostly stopped after February 4th, when we got a half dozen or so.
We only got two new emails about it this week: today and two days ago.

@atom-box commented on February 15th 2022

Two users had this error so far this week.

First person:
File../../CoreHome/vue/src/MenuDropdown/MenuDropdown.lessnot found. in anonymous-file-0.less in C:\inetpub\wwwroot\matomo\core\AssetManager\UIAssetMerger\StylesheetUIAssetMerger.php 53 using PHP 7.3.7

Second person:
An exception has been thrown during the rendering of a template ("File../../CoreHome/vue/src/MenuDropdown/MenuDropdown.lessnot found. in anonymous-file-0.less"). in D:\htdocs\Public\piwik\plugins\CoreUpdater\templates\runUpdaterAndExit_welcome.twig 8 using PHP 7.4.1

@samjf commented on February 16th 2022 Contributor

I just experienced this error myself 🤔 I've run it a few times with the same result. I wonder if the packaged extraction utility it to blame.

@narfk commented on February 17th 2022

this works for me as well (Macos case insensitive)

cd ./piwik/plugins/CoreHome/vue/src
mv MenuDropdown/ _MenuDropdown/
git commit
mv _MenuDropdown/ MenuDropdown/
git commit
@atom-box commented on February 19th 2022

I am no longer seeing this error in our notifications inbox. I went back and here is a summary of when we received this error. Each integer represents one error received and the date in February it was received.:

Windows server: 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 10, 11, 15, 17
MacOS server: 3
Unix server: 2

(The Mac server was macOS 11.6.2 on a default apfs filesystem)
(The *nix server was Apache/2.4.52 (Unix) OpenSSL/1.1.1m PHP/8.1.2)

So maybe this is fixed in 4.7.1, because of the two notifications this week at least one was actually installing 4.7.0 not 4.7.1 (4.7.0 is expected to have the bug, right?)

@Tazzios commented on February 22nd 2022

Upgrade form 4.6.2 to 4.7.1 i also get the error. Copying the missing 'MenuDropdown' fodler fixed it.

Isn`t it a bit confusing that there is a folder 'DropdownMenu' and 'MenuDropdown' ?

@adamread-nmbgmr commented on February 25th 2022

I got the error upgrading on a Windows server. Evan's prompt solution got it going again:

Hi Adam,

Sorry about this glitch in the update. We thought it was fixed. I'm guessing your server is a Windows server? There may be a capitalization error in the path for "File ../../CoreHome/vue/src/MenuDropdown/MenuDropdown.less causing the not found error.

Please, when you have some time, leave a short message at the Issues Page so the developers can see that the problem has not gone away!

If you want to fix it before we do, here is the workaround:

  1. One directory is not copied during the update:
    directory ../../CoreHome/vue/src/MenuDropdown/

  2. You can copy that directory from the latest.zip file or from https://github.com/matomo-org/matomo/tree/4.x-dev/plugins/CoreHome/vue/src/MenuDropdown to your server everything should then work fine.

And again, please leave a comment at our Issues Page. Thank you for your patience while we update this code.

Sincerely,

--
Evan Genest
Web Support Technician
Matomo team
{#HS:1798077253-2049805#}
On Fri, Feb 25, 2022 at 11:39:34 NZDT, Adam Read <[adam.read@nmt.edu](mailto:adam.read@nmt.edu)> wrote:
An exception has been thrown during the rendering of a template ("File ../../CoreHome/vue/src/MenuDropdown/MenuDropdown.less not found. in anonymous-file-0.less"). in C:\inetpub\wwwroot\matomo\plugins\CoreUpdater\templates\runUpdaterAndExit_welcome.twig 8 using PHP 7.4.13

Got this error after clicking the button to automatically update. Not sure how to proceed.

@Tazzios commented on February 26th 2022

The problem indeed occurs only on my Windows install, 2 others on linux webhostings went fine.

@atom-box commented on March 10th 2022

From users we received these two reports today:

  1. User 1
    Fatal error in Matomo 4.8.0
    File ../../CoreHome/vue/src/MenuDropdown/MenuDropdown.less not found. in anonymous-file-0.less in C:...\core\AssetManager\UIAssetMerger\StylesheetUIAssetMerger.php 53 using PHP 8.0.0

  2. User 2 (a windows environment. It happened after upgrading)
    Fatal error in Matomo 4.8.0
    An exception has been thrown during the rendering of a template ("File ../../CoreHome/vue/src/MenuDropdown/MenuDropdown.less not found. in anonymous-file-0.less"). in D:...\piwik\plugins\CoreUpdater\templates\runUpdaterAndExit_welcome.twig 8 using PHP 7.4.16

Maybe related:
Handle case only file name updates on case insensitive file systems #18865

@narfk commented on March 11th 2022

As expected, the error also occurs with the 4.8.0 update.
Directory and its content "MenuDropdown" is missing after install the update.

@atom-box commented on March 13th 2022

@sgiehl Re-open?

@atom-box commented on March 14th 2022

A user reported:

Fatal error in Matomo 4.8.0
An exception has been thrown during the rendering of a template ("File ../../CoreHome/vue/src/MenuDropdown/MenuDropdown.less not found. in anonymous-file-0.less"). in C:...\htdocs\plugins\CoreUpdater\templates\runUpdaterAndExit_welcome.twig 8 using PHP 7.4.19

@atom-box commented on March 23rd 2022

A user reported:
Mar 22, 16:12 Hi folks, I did the auto upgrade and got:

File `../../CoreHome/vue/src/MenuDropdown/MenuDropdown.less` not found. in anonymous-file-0.less in D:\Websites\Piwik\core\AssetManager\UIAssetMerger\StylesheetUIAssetMerger.php 53 using PHP 7.4.1

-------------------------------------------------------------------------------------------- (Draws a line under that)

Downloaded the update and manually copied it into place, Matomo popped back up again.

@ksikierebolsa commented on March 24th 2022

Hello,

I have this issue after upgrading from 3.14.1 to 4.5.0:

` fatal error occurred

Please contact the system administrator, or login to Matomo to learn more.

If you are Super User, but cannot login because of this error, you can still troubleshoot further. Follow these steps:
1) open the config/config.ini.php file and look for the salt value under [General].
2) edit this current URL you are viewing and add the following text (replacing salt_value_from_config by the salt value from the config file):

index.php?i_am_super_user=SALT&....`

I can solve this issue executing a core:clear-caches everytime that I have this issue, but this is not the main solution for our application. I checked also the CoreHome folder and it's missing de vue/ folder on it, I copied the entire folder on plugins/ but that generates a CoreHome problem in the entire URL and I can't see the graphics on my staging matomo.

The solution that I found was reinstalling the product each time to be able to connect and continue improving the solution.

My partner wants to use 4.5.0, but if we have this issue on the lastest version... I'm not sure to upgrade 4.5.0 to 4.9.0.

Any of you have another solution to solve this? That could be great for me :)

@sgiehl commented on March 29th 2022 Member

@ksikierebolsa the issue here might be unrelated to your problem. If you are able to see an error message in you log file, that might help to find a solution for your problem.

@narfk commented on April 14th 2022

In my environment the error does not occures with the current update (4.9.0)

@Tazzios commented on April 14th 2022

I confirm update from 4.7.1 to 4.9.0 on Windows IIS worked fine.

@justinvelluppillai commented on April 14th 2022 Contributor

The problem would only currently affect anyone upgrading from 4.6 to anything newer. It is because in Matomo 4.6 a file was renamed with a change to only case (MenuDropdown -> Menudropdown). This caused issues on Windows because the new file wasn't copied over and the old ended up being deleted by the updater. The fix we provided in a #18865 prevented the file from being deleted, but now further down the chain some of our tooling doesn't handle the case difference so there is a similar but different issue remaining there.

@atom-box commented on April 28th 2022

A user writes:

_"An exception has been thrown during the rendering of a template ("File ../../CoreHome/vue/src/MenuDropdown/MenuDropdown.less not found. in anonymous-file-0.less"). in C:........\plugins\CoreUpdater\templates\runUpdaterAndExitwelcome.twig 8 using PHP 7.4.2
Last time we had a similar problem, should have been fixed with 4.9.1., but isn't. Please fix it. Thanks!"

This Issue was closed on May 2nd 2022
Powered by GitHub Issue Mirror