rotdrop / nextcloud-app-dokuwiki

NextCloud "app" which embeds an existing DokuWiki instance into NextCloud. Intended for SSO.
GNU Affero General Public License v3.0
7 stars 5 forks source link

Could not download app dokuwikiembedded in nextcloud #2

Closed ion-lane closed 3 years ago

ion-lane commented 3 years ago

Hello! Please help me install dokuwikiembedded in nextcloud. I downloaded the app and unpacked it to ../nextcloud/apps/wiki/. Changed the version in info.xml max-version = "20" to 21. Run make. I had to install @ nextcloud / event-bus first.

# npm i -S @nextcloud/event-bus                                                                                                                                                            > core-js@3.12.0 postinstall /var/www/nextcloud/apps/wiki/node_modules/@nextcloud/event-bus/node_modules/core-js> node -e "try{require('./postinstall')}catch(e){}"

Thank you for using core-js ( https://github.com/zloirock/core-js ) for polyfilling JavaScript standard library!
The project needs your help! Please consider supporting of core-js on Open Collective or Patreon: 
> https://opencollective.com/core-js 
> https://www.patreon.com/zloirock 

Also, the author of core-js ( https://github.com/zloirock ) is looking for a good job -)

npm WARN dokuwikiembedded@0.0.2 license should be a valid SPDX license expression                               npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.3.2 (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.3.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.13 (node_modules/watchpack-chokidar2/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.13: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

+ @nextcloud/event-bus@2.0.0
added 3 packages from 7 contributors and audited 811 packages in 14.131s

66 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities
# make
npm install
npm WARN dokuwikiembedded@0.0.2 license should be a valid SPDX license expression                               npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.3.2 (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.3.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.13 (node_modules/watchpack-chokidar2/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.13: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

audited 811 packages in 10.307s                                                                                 
66 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities

npm run dev                                                                                                     
> dokuwikiembedded@0.0.2 dev /var/www/nextcloud/apps/wiki
> NODE_ENV=development webpack --progress --mode development --config webpack.config.js

10% building 0/0 modules 0 active(node:14138) DeprecationWarning: Tapable.plugin is deprecated. Use new API on `.hooks` instead
(Use `node --trace-deprecation ...` to show where the warning was created)
98% after emittingWebpack Bundle Analyzer saved report to /var/www/nextcloud/apps/wiki/report.html              Hash: 7fef1ce1a60ff3d47b08                                                                                      Version: webpack 4.46.0
Time: 15877ms
Built at: 05/06/2021 11:53:47 PM
                   Asset        Size          Chunks                   Chunk Names
             css/app.css  1010 bytes             app  [emitted]        app
         css/app.css.map    2.81 KiB             app  [emitted] [dev]  app
           css/popup.css  1010 bytes           popup  [emitted]        popup
       css/popup.css.map    4.46 KiB           popup  [emitted] [dev]  popup
    js/admin-settings.js     169 KiB  admin-settings  [emitted]        admin-settings
js/admin-settings.js.map     588 KiB  admin-settings  [emitted] [dev]  admin-settings
               js/app.js    93.4 KiB             app  [emitted]        app
           js/app.js.map     468 KiB             app  [emitted] [dev]  app
             js/popup.js     272 KiB           popup  [emitted]        popup
         js/popup.js.map     896 KiB           popup  [emitted] [dev]  popup
           js/refresh.js     169 KiB         refresh  [emitted]        refresh
       js/refresh.js.map     584 KiB         refresh  [emitted] [dev]  refresh
Entrypoint app = css/app.css js/app.js css/app.css.map js/app.js.map
Entrypoint popup = css/popup.css js/popup.js css/popup.css.map js/popup.js.map
Entrypoint refresh = js/refresh.js js/refresh.js.map
Entrypoint admin-settings = js/admin-settings.js js/admin-settings.js.map
[./appinfo/info.xml] 1.11 KiB {app} {popup} {refresh} {admin-settings} [built]
[./node_modules/webpack/buildin/global.js] (webpack)/buildin/global.js 472 bytes {popup} {refresh} {admin-settings} [built]
[./src/admin-settings.js] 2.53 KiB {admin-settings} [built]
[./src/ajax.js] 2.12 KiB {popup} {admin-settings} [built]
[./src/config.js] 1.45 KiB {app} {popup} {refresh} {admin-settings} [built]
[./src/doku-wiki-popup.js] 9.51 KiB {popup} [built]
[./src/doku-wiki.js] 3.07 KiB {app} {popup} [built]
[./src/generate-url.js] 1.11 KiB {popup} {refresh} {admin-settings} [built]
[./src/index.js] 1.83 KiB {app} [built]
[./src/nextcloud/OC/requesttoken.js] 1.57 KiB {popup} {refresh} {admin-settings} [built]
[./src/nextcloud/jquery/requesttoken.js] 1.11 KiB {popup} {refresh} {admin-settings} [built]
[./src/refresh.js] 2.26 KiB {refresh} [built]
[./style/doku-wiki-popup.css] 50 bytes {popup} [built]
[./style/doku-wiki.css] 50 bytes {app} {popup} [built]
    + 107 hidden modules
Child mini-css-extract-plugin node_modules/css-loader/dist/cjs.js!style/doku-wiki-popup.css:
    Entrypoint mini-css-extract-plugin = *
    [./node_modules/css-loader/dist/cjs.js!./style/doku-wiki-popup.css] 4.02 KiB {mini-css-extract-plugin} [built]
        + 2 hidden modules
Child mini-css-extract-plugin node_modules/css-loader/dist/cjs.js!style/doku-wiki.css:
    Entrypoint mini-css-extract-plugin = *
    [./node_modules/css-loader/dist/cjs.js!./style/doku-wiki.css] 5.62 KiB {mini-css-extract-plugin} [built]
        + 2 hidden modules

Then when I turned this app on nextcloud I got the error:

{"reqId":"YJP6vSkMBXsKbEA1qkDVrgAAUgQ","level":3,"time":"2021-05-06T14:18:37+00:00","remoteAddr":"10.0.0.9","user":"ivan","app":"settings","method":"POST","url":"/settings/apps/enable","message":{"Exception":"Exception","Message":"Could` not download app dokuwikiembedded","Code":0,"Trace":[{"file":"/var/www/nextcloud/apps/settings/lib/Controller/AppSettingsController.php","line":445,"function":"downloadApp","class":"OC\\Installer","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":218,"function":"enableApps","class":"OCA\\Settings\\Controller\\AppSettingsController","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":127,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/App.php","line":157,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/var/www/nextcloud/lib/private/Route/Router.php","line":302,"function":"main","class":"OC\\AppFramework\\App","type":"::"},{"file":"/var/www/nextcloud/lib/base.php","line":993,"function":"match","class":"OC\\Route\\Router","type":"->"},{"file":"/var/www/nextcloud/index.php","line":37,"function":"handleRequest","class":"OC","type":"::"}],"File":"/var/www/nextcloud/lib/private/Installer.php","Line":403,"CustomMessage":"--"},"userAgent":"Mozilla/5.0 (Linux; Android 10; Lenovo TB-X505X) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.105 Safari/537.36 OPR/63.3.3216.58675","version":"21.0.1.1"}

os: gentoo nextcloud 21.0.1 Node.js v14.16.1 npm: '6.14.12'

rotdrop commented 3 years ago

Hi, I did not try Nextcloud 21 yet, as the context in which I'm using this app is bound to v20 for other reasons.

However, the "download error" you are experience seemingly means that this app-installer tries to download the app from the app-store. This cannot work, as the app is (not yet, or even never) available from the app-store. This is a bit unexpected as you have extracted the app to the app-folder of your Nextcloud instance (at least it seems so?).

Are the permissions of NC-BASE/apps/wiki s.t. the web-server can find the app?

ion-lane commented 3 years ago

The apache user has directory permissions. There is an application in the nextcloud web interface. The occ command shows it too. But when I try to enable it shows:

# sudo -u apache php occ app:list
The process control (PCNTL) extensions are required in case you want to interrupt long running commands - see https://www.php.net/manual/en/book.pcntl.php
Enabled:
  ***
Disabled:
  ***
  - wiki
# sudo -u apache php occ app:enable wiki
The process control (PCNTL) extensions are required in case you want to interrupt long running commands - see https://www.php.net/manual/en/book.pcntl.php
App not found

And when i turn on the application in the web interface, it shows

Exception: Could not download app dokuwikiembedded

I'll try to check this application in NC20.

rotdrop commented 3 years ago

I'm currently trying to install it with a v21 cloud. There is no DokuWiki installed, but at least I can check if the app is installable.

rotdrop commented 3 years ago

Hi, just name the folder like the app-name, i.e. not "wiki", but "dokuwikiembedded". Don't known whether this is/was different or could be configured in another way.

Cheers,

Claus

ion-lane commented 3 years ago

It works! The application has been installed. Thank you for help.