Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"⚠Cannot access the repository at the moment." when trying to update to 2.28.1 #1164

Closed
m-i-k-e-y opened this issue Jun 6, 2023 · 10 comments
Labels
bug Something isn't working

Comments

@m-i-k-e-y
Copy link

Describe the bug
I'm using 2.28.0 and wanted to update to 2.28.1, but I when I start the update I get
"⚠Cannot access the repository at the moment."

To Reproduce
Steps to reproduce the behavior:

  1. Go to admin panel
  2. Click on About
  3. Click update
  4. See error

Expected behavior
Update should be executed.

Screenshots
grafik

Please complete the following information:

  • Browser: Firefox 113.0.2 (64-Bit) on Windows 11
  • IMAP daemon: dovecot 2.3.13 on a fully patched Debian Bullsey
  • PHP version:
  • SnappyMail Version: 2.28.0
  • Mode: standalone (nginx 1.18.0/ php-fpm 7.4.33) on the same server as the IMAP daemon
@m-i-k-e-y
Copy link
Author

Sorry, I wasn't able to check nginx previously.

Just tried again and checked nginx logfile, but it does not contain much info:
2023/06/10 11:40:06 [error] 95187#95187: *24646 FastCGI sent in stderr: "PHP message: Extract to /var/www/snappymail" while reading response header from upstream, client: 193.81.26.55, server: [redacted], request: "POST /?admin/Json/&q[]=/0/ HTTP/2.0", upstream: "fastcgi://unix:/var/run/php/php7.4-fpm.sock:", host: "[redacted]"

@m-i-k-e-y
Copy link
Author

@the-djmaze
could you direct me to the file where to add the changes you made for logging?

@the-djmaze
Copy link
Owner

It's in the compiled snappymail/v/N.N.N/static/js/admin.js so javascript debug must be on in application.ini

@the-djmaze
Copy link
Owner

This could be related to #1075

@m-i-k-e-y
Copy link
Author

This could be related to #1075

I don't see any of the messages mentioned in #1075, neither in nginx logfile nor in php-fpm logfile.

DNS in general seems to be working (I'm using unbound):

dig snappymail.eu ANY

; <<>> DiG 9.16.37-Debian <<>> snappymail.eu ANY
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 30755
;; flags: qr rd ra ad; QUERY: 1, ANSWER: 6, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 1232
;; QUESTION SECTION:
;snappymail.eu. IN ANY

;; ANSWER SECTION:
snappymail.eu. 58064 IN A 84.22.110.35
snappymail.eu. 58064 IN RRSIG A 8 2 86400 20230622000000 20230601000000 26808 snappymail.eu. JmYCQcCjy7SMSDWdYnax0yrIO9nV1g0CcCQDGKG0vH6Fpy7M6CAm+jfF 6dh1oBiCznrc3uIoJGUCwDrRsLHFd7A4vJfMGQMP8iTE+qWTIuWsDRWl cMGTtUE1oPBCV+AxqWftscinm+J80Rg7nwIfWEh0NE5oxidw+GPwplRV nSc=
snappymail.eu. 58064 IN AAAA 2a02:2770:15:0:21a:4aff:feff:f9b6
snappymail.eu. 58064 IN RRSIG AAAA 8 2 86400 20230622000000 20230601000000 26808 snappymail.eu. YV+fSOm1VAl8KpRWbIryR6Uh0Ib+Mn0qfTs+g9vqFbbhQE9l1z9P+Wmn 15HbndxjzQNC2D7Jw64VL33POJyliFUVHEH9xiGwVmpxqNkZI4Bxbn44 5hITRbrOlX04wnONvZso8ntw6aajon4xVCsWvA3BOOL33zA0NGx2ME9Z pr4=
snappymail.eu. 86387 IN MX 0 snappymail.eu.
snappymail.eu. 86387 IN RRSIG MX 8 2 86400 20230622000000 20230601000000 26808 snappymail.eu. XLdt3k+WPhw+dZD+qK+99e8TkwAEr/z2h8fIJPnrDpw/6MTPPrPrjmDm 2ny7GQg86tpN3nNs9jc5DtWNoqlO0/tPuBGiIdzCWahkejFJ5mTBHJms qF/b8YaqX3fZpQeMC5jydDiTHHQjNIq5/12Rce1/SUstUgopCth1cDaf NlE=

;; Query time: 27 msec
;; SERVER: ::1#53(::1)
;; WHEN: Mon Jun 12 13:48:05 CEST 2023
;; MSG SIZE rcvd: 621

@m-i-k-e-y
Copy link
Author

It's in the compiled snappymail/v/N.N.N/static/js/admin.js so javascript debug must be on in application.ini

So I changed that file (hopefully I've did that correctly):

grep -B4 -A4 "PackageAdminStore.error(getNotification(iError));" /var/www/snappymail/snappymail/v/2.28.0/static/js/admin.js
Remote.request('AdminPackagesList', (iError, data) => {
PackageAdminStore.loading(false);
if (iError) {
PackageAdminStore.real(false);
PackageAdminStore.error(getNotification(iError));
} else {
PackageAdminStore.real(!!data.Result.Real);
PackageAdminStore.error(data.Result.Error);

I've removed the precompressed brotli and gzip versions of it and also replaced the minified version with the above change:

ll /var/www/snappymail/snappymail/v/2.28.0/static/js/admin*
-rw-r--r-- 1 www-data www-data 79711 Jun 10 11:54 /var/www/snappymail/snappymail/v/2.28.0/static/js/admin.js
ll /var/www/snappymail/snappymail/v/2.28.0/static/js/min/admin*
-rw-r--r-- 1 www-data www-data 79711 Jun 10 11:56 /var/www/snappymail/snappymail/v/2.28.0/static/js/min/admin.min.js

I've also enabled debugging for java script:

grep -A4 debug /var/www/snappymail/data/_data_/_default_/configs/application.ini
[debug]
; Special option required for development purposes
enable = On
javascript = On
css = Off

I then restarted nginx and php-fpm and cleared the bowser cache.

But still, I do not see more informations in the logfile of nginx than before when I hit the update button:

access log:
[redacted] - - [12/Jun/2023:14:36:21 +0200] "POST /?admin/Json/&q[]=/0/ HTTP/2.0" 200 279 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/114.0"

error log:
2023/06/12 14:36:21 [error] 1229577#1229577: *2469 FastCGI sent in stderr: "PHP message: Extract to /var/www/snappymail" while reading response header from upstream, client: [redacted], server: [redacted], request: "POST /?admin/Json/&q[]=/0/ HTTP/2.0", upstream: "fastcgi://unix:/var/run/php/php7.4-fpm.sock:", host: "[redacted]"

snappymail did not create any logfile of its own:
ll -R /var/www/snappymail/data/_data_/_default_/logs/
/var/www/snappymail/data/_data_/_default_/logs/:
total 12
drwx------ 3 www-data www-data 4096 May 12 2022 ./
drwx------ 9 www-data www-data 4096 Jun 12 14:36 ../
drwx------ 2 www-data www-data 4096 May 31 16:56 fail2ban/

/var/www/snappymail/data/_data_/_default_/logs/fail2ban:
total 20
drwx------ 2 www-data www-data 4096 May 31 16:56 ./
drwx------ 3 www-data www-data 4096 May 12 2022 ../
-rw-r--r-- 1 www-data www-data 112 May 12 2022 auth-2022-05-12.txt
-rw-r--r-- 1 www-data www-data 113 Sep 15 2022 auth-2022-09-15.txt
-rw------- 1 www-data www-data 150 May 31 16:56 auth-2023-05-31.txt

@m-i-k-e-y
Copy link
Author

m-i-k-e-y commented Jun 12, 2023

Hmm, I found now the in the developer console of Firefox:

grafik

either version 2.28.0 was downloaded instead of 2.28.1 or the update package is not built correctly? I'm just guessing here, so please bear with me.

@m-i-k-e-y
Copy link
Author

I found now where the debug output is logged to - syslog. And there I see the same message:
Jun 12 15:09:23 [redacted] snappymail: [2023-06-12 13:09:23.775][60e4f5b4] [NOTICE]: PharException: Extraction from phar "/var/www/snappymail/data/_data_/_default_/c76a3f92c359c759e55dbbfb6527ee48.tar.gz" failed: Cannot extract "snappymail/v/2.28.0/app/libraries/snappymail/dav/client.php" to "/var/www/snappymail/snappymail/v/2.28.0/app/libraries/snappymail/dav/client.php", path already exists in /var/www/snappymail/snappymail/v/2.28.0/app/libraries/snappymail/upgrade.php:208
Jun 12 15:09:23 [redacted] snappymail: Stack trace:
Jun 12 15:09:23 [redacted] snappymail: #0 /var/www/snappymail/snappymail/v/2.28.0/app/libraries/snappymail/upgrade.php(208): PharData->extractTo()
Jun 12 15:09:23 [redacted] snappymail: #1 /var/www/snappymail/snappymail/v/2.28.0/app/libraries/RainLoop/ActionsAdmin.php(316): SnappyMail\Upgrade::core()
Jun 12 15:09:23 [redacted] snappymail: #2 /var/www/snappymail/snappymail/v/2.28.0/app/libraries/RainLoop/ServiceActions.php(142): RainLoop\ActionsAdmin->DoAdminUpgradeCore()
Jun 12 15:09:23 [redacted] snappymail: #3 /var/www/snappymail/snappymail/v/2.28.0/app/libraries/RainLoop/Service.php(133): RainLoop\ServiceActions->ServiceJson()
Jun 12 15:09:23 [redacted] snappymail: #4 /var/www/snappymail/snappymail/v/2.28.0/app/libraries/RainLoop/Service.php(14): RainLoop\Service::RunResult()
Jun 12 15:09:23 [redacted] snappymail: #5 /var/www/snappymail/snappymail/v/2.28.0/include.php(143): RainLoop\Service::Handle()
Jun 12 15:09:23 [redacted] snappymail: #6 /var/www/snappymail/index.php(11): include('/var/www/snappy...')

@the-djmaze the-djmaze added the bug Something isn't working label Jun 13, 2023
@the-djmaze
Copy link
Owner

Fixed. It seems i've uploaded the wrong latest.tar.gz

@m-i-k-e-y
Copy link
Author

Confirmed. I could update now. Thanks @the-djmaze

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants