I’m trying to check my app Testing branch through package_check.
The script is issuing an error 502 on the root install but I’m not able to reproduce it via my test VM.
Here is the check_process file:
;; Complete Test
# Comment ignored
# port="8083" (PORT)
# upgrade=0 from_commit=65c382d138596fcb32b4c97c39398815a1dcd4e8
;;; Upgrade options
# ; commit=65c382d138596fcb32b4c97c39398815a1dcd4e8
name=Name of this previous version
Here is the Yunohost log from package_check:
The log from package_check itself:
And here is the install log from my test VM:
Hope it’s not too much logs
Anyway, when I try to install my app with exactly the same settings as package check, it’s working perfectly as the app’s logon page is displayed and no 502 error is thrown.
Any idea of how I could investigate this error?
Thanks for your help!
Actually, that’s a common error, shown by Package check.
Package check will try to reach your app immediately after the installation, and that’s often to quickly after.
But, for an user on a slow device, it can happens as well.
So, a solution could be to add a sleep after the start of your service, here https://github.com/YunoHost-Apps/calibre_ynh/blob/master/scripts/install#L215.
But, the best thing to do is to have a look to this experimental helper, https://github.com/YunoHost-Apps/Experimental_helpers/blob/master/ynh_systemd_action/ynh_systemd_action.
This helper is meant to handle services, and also with the --line_match argument, you can define a line in the log which indicate that the service is fully started and ready to work.
That’s the best solution to fix that issue with Package check, and to enhance the user experience.
Package linter: SUCCESS
Installation in a sub path: SUCCESS
Deleting from a sub path: SUCCESS
Installation on the root: SUCCESS
Deleting from root: SUCCESS
Installation in private mode: SUCCESS
Installation in public mode: SUCCESS
Multi-instance installations: Not evaluated.
Malformed path: SUCCESS
Port already used: SUCCESS
Change URL: FAIL
I implemented ynh_systemd_action and it worked immediately!
Thanks a lot
I still have an issue with package_check:
Upgrade from previous commit fails due to following error:
Try to access by url...
Test url: sous.domain.tld/calibre
Real url: https://domain.tld/yunohost/sso/?r=aHR0cHM6Ly9zb3VzLmRvbWFpbi50bGQvY2FsaWJyZQ==
HTTP code: 200
Title of the page: YunoHost Portal
The connection attempt fall on the YunoHost portal.
But what I don’t understand is that both my manifest and my upgrade_option use is_public=0, meaning private install.
;; Complete Test
# First Run of complete test
password="a very long password"
;;; Upgrade options
name=First in progress release of the app 0.9~ynh1
If I set is_public=1 for upgrade option, it works, but it seems wrong to me.
is_public to 1, otherwise your app will be private.
I’m not sure I understand the way package_check perform this part of the test or its purpose in this case?
Should it not be checking the upgrade also in private mode? As per standard install where is_public is set to 0 but the test is successful nevertheless?
For the other tests, package_check is using
is_public to turn your app as publicly accessible in purpose of the test. Except for the private test of course. It doesn’t matter what’s the value of
is_public at the beginning of the check_process.
But, for this test, the values put in
manifest_arg will be used as they are. So the app is here installed as a private app then upgraded as private. So the app is still private and package_check can’t reach it.
OK, I understand now. I would recommend adding this explanation to the package_check manual as it is not very clear (or is it me? )
By the way: Quickest answers I have never had in any forum I asked a question, GG!