cloud-py-api / app_api

Nextcloud AppAPI
https://apps.nextcloud.com/apps/app_api
GNU Affero General Public License v3.0
57 stars 5 forks source link

Error with apps supporting /init #255

Open red3333 opened 2 months ago

red3333 commented 2 months ago

Describe the bug

While trying to install and use ai_image_generator_bot, I fell on an error with the /init requests:

If I comment the test on getEnabled() part, the app installs and runs correctly (including downloading libraries). To be noted that if the libraries are already downloaded (cached), the /init process crashes, but a later /activate will work, as the app is already operational with all its libraries...

Steps/Code to Reproduce

install eg. ai_image_generator_bot after cleaning it persistent storage if present.

Expected Results

App installs, initializes and activates successfully.

Actual Results

The App is installs, but never initializes. The app is not working.

Setup configuration

Nextcloud 28.0.3 app_api 2.3.1

bigcat88 commented 2 months ago

I can't reproduce this.

ExApp first get enable state and after that "/init" step got started.

https://github.com/cloud-py-api/app_api/blob/f7eefb801b8350039b1f693dd0259377e080bf28/lib/Service/AppAPIService.php#L383-L408

Was there any logs messages related to this? ExApp %s initialization timed out (%sm)

bigcat88 commented 2 months ago

What you described - that behaviour was in previous AppAPI versions, but after that I simplified it to first enable ExApp and after that call "/init".

Still there can be errors somewhere, but if we find any, I'm willing to fix them.