Impoissble to activate App

Hello,
I try to dev my own app for nextcloud.

I follow tuto from nextcloud home page.
I copy/paste the folder in nextcloud/app.
I see my app in the list app, I try to activate and I have this error message:

Could not download app MyApp and nothing else.

How I can debug this ?

Thank you all

Hi @Iwios :wave:

Can you show your error message, please?

Do you install your app from occ command or install apps setting page?

From app setting page.

This is the complete error message:

{"reqId":"YBioz1GAPpoJVx0WYF6O","level":3,"time":"2023-12-05T23:59:07+00:00","remoteAddr":"176.X.X.X","user":"administrateur","app":"settings","method":"POST","url":"/settings/apps/enable","message":"could not enable apps","userAgent":"Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/118.0","version":"27.1.4.1","exception":{"Exception":"Exception","Message":"Could not download app MyApp","Code":0,"Trace":[{"file":"/var/www/html/nextcloud/apps/settings/lib/Controller/AppSettingsController.php","line":448,"function":"downloadApp","class":"OC\\Installer","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":230,"function":"enableApps","class":"OCA\\Settings\\Controller\\AppSettingsController","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":137,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/AppFramework/App.php","line":183,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/Route/Router.php","line":315,"function":"main","class":"OC\\AppFramework\\App","type":"::"},{"file":"/var/www/html/nextcloud/lib/base.php","line":1068,"function":"match","class":"OC\\Route\\Router","type":"->"},{"file":"/var/www/html/nextcloud/index.php","line":36,"function":"handleRequest","class":"OC","type":"::"}],"File":"/var/www/html/nextcloud/lib/private/Installer.php","Line":388,"message":"could not enable apps","exception":{},"CustomMessage":"could not enable apps"}}

Hmmm… I don’t get your log :no_mouth:

Your app is good for Nextcloud 27 (min or max) in the info.xml file?

Caution : You have to enable your app and not to install it from the app store.

Can you show the absolute path of your app folder, please?

Your app must be in the apps-extra or apps folder?

Yes info.xml was set to 27

I try occ app:enable MyApp and I have this return : App not found

Absolute path : /var/www/html/nextcloud/apps/

My app is in apps folder

Usually, your appid (app name) must be in lowercase and not PascalCase.

Can you show me the result of the occ app:list command, please?

1 Like

In the nextcloud tuto dev app, I found the app name need to be in CamelCase

Enabled:

  • activity: 2.19.0
  • calendar: 4.6.0
  • circles: 27.0.1
  • cloud_federation_api: 1.10.0
  • comments: 1.17.0
  • contacts: 5.4.2
  • contactsinteraction: 1.8.0
  • dashboard: 7.7.0
  • dav: 1.27.0
  • federatedfilesharing: 1.17.0
  • federation: 1.17.0
  • files: 1.22.0
  • files_pdfviewer: 2.8.0
  • files_reminders: 1.0.0
  • files_rightclick: 1.6.0
  • files_sharing: 1.19.0
  • files_trashbin: 1.17.0
  • files_versions: 1.20.0
  • firstrunwizard: 2.16.0
  • gestion: 2.4.1
  • logreader: 2.12.0
  • lookup_server_connector: 1.15.0
  • mail: 3.4.5
  • nextcloud_announcements: 1.16.0
  • notes: 4.8.1
  • notifications: 2.15.0
  • oauth2: 1.15.1
  • password_policy: 1.17.0
  • photos: 2.3.0
  • privacy: 1.11.0
  • provisioning_api: 1.17.0
  • recommendations: 1.6.0
  • related_resources: 1.2.0
  • richdocuments: 8.2.3
  • serverinfo: 1.17.0
  • settings: 1.9.0
  • sharebymail: 1.17.0
  • spreed: 17.1.3
  • support: 1.10.0
  • survey_client: 1.15.0
  • systemtags: 1.17.0
  • text: 3.8.0
  • theming: 2.2.0
  • twofactor_backupcodes: 1.16.0
  • updatenotification: 1.17.0
  • user_status: 1.7.0
  • viewer: 2.1.0
  • weather_status: 1.7.0
  • workflowengine: 2.9.0
    Disabled:
  • MyApp: 0.0.1
  • admin_audit: 1.17.0
  • bruteforcesettings: 2.7.0
  • encryption: 2.15.0
  • files_external: 1.19.0
  • suspicious_login: 5.0.0
  • twofactor_totp: 9.0.0
  • user_ldap: 1.17.0

Yes, your app name must be in CamelCase.

The app generated must be extracted.

image

And when you enter the app folder, you find your app folder written in lowercase and it’s very important

image

And usually, your <id> in the info.xml has to be in lowervase.

<?xml version="1.0"?>
<info xmlns:xsi= "http://www.w3.org/2001/XMLSchema-instance"
      xsi:noNamespaceSchemaLocation="https://apps.nextcloud.com/schema/apps/info.xsd">
    <!--
    SPDX-FileCopyrightText: zak39 <my-email@example.fr>
    SPDX-License-Identifier: CC0-1.0
    -->
    <id>myapp</id>
    <name>My App</name>
    <summary>Summary</summary>
    <description><![CDATA[Describe]]></description>
    <version>0.0.1</version>
    <licence>agpl</licence>
    <author mail="my-email@example.fr" >zak39</author>
    <namespace>MyApp</namespace>
    <category>tools</category>
    <bugs>https://localhost</bugs>
    <dependencies>
        <nextcloud min-version="27" max-version="27"/>
    </dependencies>
    <navigations>
        <navigation>
            <name>My App</name>
            <route>myapp.page.index</route>
        </navigation>
    </navigations>
</info>

Sorry misunderstanding the doc…

After change id, I’m able to activate the app.

Thank you @z4k for your helping

1 Like

You’re welcome :wink:

Maybe it’s necessary a rewrite or not… This new tutorial is still being tested if I get it.

I ping you @Daphne to take note of this topic :slight_smile: