Bug 55013 - App Center error during app installation when apache2 is restarted
App Center error during app installation when apache2 is restarted
Status: NEW
Product: UCS
Classification: Unclassified
Component: App Center
UCS 5.0
Other Linux
: P5 normal (vote)
: ---
Assigned To: App Center maintainers
App Center maintainers
:
Depends on: 22904
Blocks:
  Show dependency treegraph
 
Reported: 2022-07-19 17:06 CEST by Erik Damrose
Modified: 2023-02-03 13:06 CET (History)
2 users (show)

See Also:
What kind of report is it?: Bug Report
What type of bug is this?: 5: Major Usability: Impairs usability in key scenarios
Who will be affected by this bug?: 2: Will only affect a few installed domains
How will those affected feel about the bug?: 3: A User would likely not purchase the product
User Pain: 0.171
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional): Usability
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Erik Damrose univentionstaff 2022-07-19 17:06:14 CEST
Happens e.g. with kopano-core

When installing an app using the portal / appcenter umc module, the installation progress is interrupted when apache2 is restarted during the installation process, for example by a package postinst.

A popup notification is shown:

"An error occurred while connecting to the server, please try again later."

The popup can be exited by clicking on OK. In the background, the app installation continues. This leads to a bad user experience: If the popup is closed, the app center module session is not updated, so the option to install the app is still shown in the module. When trying to install the app again, it is not possible, because the wizard informs that it is already installed on the server. The app center module has to be closed and reopened.
The UCS 4.4 frontend can handle this installation and completes the app installation.

The failing request:
curl 'http://10.200.29.50/univention/command/appcenter/progress' \
  -H 'Accept: application/json; q=1.0, text/html; q=0.3; */*; q=0.1' \
  -H 'Accept-Language: en-US' \
  -H 'Cache-Control: no-cache' \
  -H 'Connection: keep-alive' \
  -H 'Content-Type: application/json' \
  -H 'Cookie: UMCSessionId=e558b0c6-61d9-4b57-b2ba-3db90b0d995c; UMCLang=en-US; _pk_id.14.d08f=2d2e693bcef55dc9.1658157405.; _pk_ses.14.d08f=1' \
  -H 'Origin: http://10.200.29.50' \
  -H 'Pragma: no-cache' \
  -H 'Referer: http://10.200.29.50/univention/management/?header=try-hide&overview=false&menu=false' \
  -H 'User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/101.0.4951.64 Safari/537.36' \
  -H 'X-Requested-With: XMLHttpRequest' \
  -H 'X-XSRF-Protection: e558b0c6-61d9-4b57-b2ba-3db90b0d995c' \
  --data-raw '{"options":{"progress_id":227996}}' \
  --compressed

Status shown in browser console:
(failed)net::ERR_CONNECTION_RESET
Comment 1 Florian Best univentionstaff 2022-07-19 20:38:06 CEST
For handling this situation we have base/univention-updater/script/{disable,enable}-apache2-umc.
Theese scripts have been changed slightly in UCS 5.0.
Comment 2 Philipp Hahn univentionstaff 2023-02-03 13:05:05 CET
(In reply to Florian Best from comment #1)
> For handling this situation we have base/univention-updater/script/{disable,enable}-apache2-umc.

which no longer work reliably with `systemd`: Removing the executable permissions will only lead to the service not being *started* again after it has been killed.

This {en,dis}able stuff now breaks the plain 5.0-3 installation.