Active app in secondary app dir results in RuntimeException "image not found: image:default-app-icon"

Steps to reproduce

The steps are in line with the instructions given in https://doc.owncloud.org/server/10.0/admin_manual/installation/apps_management_installation.html#using-custom-app-directories

  1. Enable maintenance mode.
  2. Disable the apps that you want to move.
  3. Create a new apps directory and assign it the same user and group, and ownership permissions as the core apps directory.
  4. Move the apps from the old apps directory to the new apps directory.
  5. Add a new app directory in config/config.php.
  6. If you’re using a cache, such as Redis or Memcached, ensure that you clear the cache.
  7. Re-enable the apps.
  8. Disable maintenance mode.

Expected behaviour

The apps should function normally as they were installed in the core apps directory

Actual behaviour

The webpage shows an error message

Internal Server Error

The server encountered an internal error and was unable to complete your request.

Please contact the server administrator if this error reappears multiple times and include the technical details below in your report.

More details can be found in the server log

Technical details

  • Remote Address: client_ip
  • Request ID: OI4n7Z6ahQUfPx7CPenr

Server configuration

Operating system:
Debian 8.11

Web server:
Apache 2.4.10

Database:
MySQL 5.5.60-0+deb7u1

PHP version:
5.6.39+dfsg-0+deb8u1

ownCloud version: (see ownCloud admin page)
10.0.10

Updated from an older ownCloud or fresh install:
Updated from an older ownCloud: 9.0.5 -> 9.1.1 -> 10.0.7 -> 10.0.10

Where did you install ownCloud from:
From tarball

Signing status (ownCloud 9.0 and above):
No errors have been found.

The content of config/config.php:
{
“system”: {
“instanceid”: “52828dcf1ab2c”,
“passwordsalt”: “REMOVED SENSITIVE VALUE”,
“datadirectory”: “/srv/httpd/owncloud/owncloud-data”,
“dbtype”: “mysql”,
“version”: “10.0.10.4”,
“dbname”: “REMOVED SENSITIVE VALUE”,
“dbhost”: “REMOVED SENSITIVE VALUE”,
“dbtableprefix”: “oc_”,
“dbuser”: “REMOVED SENSITIVE VALUE”,
“dbpassword”: “REMOVED SENSITIVE VALUE”,
“installed”: true,
“theme”: “”,
“maintenance”: false,
“trusted_domains”: [
“REMOVED SENSITIVE VALUE”
],
“forcessl”: true,
“mail_smtpmode”: “smtp”,
“mail_smtpname”: “REMOVED SENSITIVE VALUE”,
“mail_smtppassword”: “REMOVED SENSITIVE VALUE”,
“mail_smtpsecure”: “tls”,
“mail_smtpauthtype”: “PLAIN”,
“mail_smtpauth”: 1,
“mail_smtphost”: “REMOVED SENSITIVE VALUE”,
“mail_smtpport”: “587”,
“mail_from_address”: “REMOVED SENSITIVE VALUE”,
“mail_domain”: “REMOVED SENSITIVE VALUE”,
“log_rotate_size”: 104857600,
“loglevel”: “2”,
“apps_paths”: [
{
“path”: “/srv/httpd/owncloud/htdocs/apps”,
“url”: “/apps”,
“writable”: false
},
{
“path”: “/srv/httpd/owncloud/owncloud-apps”,
“url”: “/apps2”,
“writable”: true
}
],
“secret”: “REMOVED SENSITIVE VALUE”,
“user_backends”: [
{
“class”: “OC_User_IMAP”,
“arguments”: [
“{localhost:143/imap/readonly}”
]
}
],
“trashbin_retention_obligation”: “auto”,
“memcache.local”: “\OC\Memcache\APCu”,
“ldapIgnoreNamingRules”: false,
“app.mail.imaplog.enabled”: false,
“updatechecker”: false,
“appstore.experimental.enabled”: false,
“overwrite.cli.url”: “REMOVED SENSITIVE VALUE”
}
}

List of activated apps:
Enabled:

  • activity: 2.4.1
  • calendar: 1.6.1
  • comments: 0.3.0
  • configreport: 0.1.1
  • contacts: 1.5.5
  • dav: 0.4.0
  • external: 1.2
  • federatedfilesharing: 0.3.1
  • federation: 0.1.0
  • files: 1.5.1
  • files_external: 0.7.1
  • files_sharing: 0.11.0
  • files_trashbin: 0.9.1
  • files_versions: 1.3.0
  • files_videoplayer: 0.9.8
  • firstrunwizard: 1.1
  • gallery: 16.1.1
  • market: 0.3.0
  • notifications: 0.3.5
  • provisioning_api: 0.5.0
  • systemtags: 0.3.0
  • tasks: 0.9.7
  • templateeditor: 0.4.0
  • updatenotification: 0.2.1
  • user_external: 0.4
  • user_ldap: 0.13.0
    Disabled:
  • encryption

Are you using external storage, if yes which one: local/smb/sftp/…
No

Are you using encryption: yes/no
No

Are you using an external user-backend, if yes which one: LDAP/ActiveDirectory/Webdav/…
user_ldap

LDAP configuration (delete this part if not used)

Client configuration

Browser:
FireFox/Edge/Chrome

Operating system:
Windows7/MacOs Mojave/High Sierra

Logs

Web server error log

“GET /owncloud/ HTTP/1.1” 302 -
“GET /owncloud/index.php/apps/files/ HTTP/1.1” 500 18929
“GET /owncloud/apps2/activity/css/style.css?v=70cea708a0ae7b98e17a7174f4e6fbf6 HTTP/1.1” 404 235
“GET /owncloud/apps2/activity/js/formatter.js?v=70cea708a0ae7b98e17a7174f4e6fbf6 HTTP/1.1” 404 237
“GET /owncloud/apps2/activity/js/activitymodel.js?v=70cea708a0ae7b98e17a7174f4e6fbf6 HTTP/1.1” 404 241
“GET /owncloud/apps2/activity/js/activitycollection.js?v=70cea708a0ae7b98e17a7174f4e6fbf6 HTTP/1.1” 404 246
“GET /owncloud/apps2/activity/js/filesplugin.js?v=70cea708a0ae7b98e17a7174f4e6fbf6 HTTP/1.1” 404 239
“GET /owncloud/apps2/activity/js/activitytabview.js?v=70cea708a0ae7b98e17a7174f4e6fbf6 HTTP/1.1” 404 243
“GET /owncloud/apps2/activity/js/formatter.js?v=70cea708a0ae7b98e17a7174f4e6fbf6 HTTP/1.1” 404 237
“GET /owncloud/apps2/activity/js/activitymodel.js?v=70cea708a0ae7b98e17a7174f4e6fbf6 HTTP/1.1” 404 241
“GET /owncloud/apps2/activity/js/activitycollection.js?v=70cea708a0ae7b98e17a7174f4e6fbf6 HTTP/1.1” 404 246
“GET /owncloud/apps2/activity/js/activitytabview.js?v=70cea708a0ae7b98e17a7174f4e6fbf6 HTTP/1.1” 404 243
“GET /owncloud/apps2/activity/js/filesplugin.js?v=70cea708a0ae7b98e17a7174f4e6fbf6 HTTP/1.1” 404 239
“GET /owncloud/index.php/apps/files/undefined/img/notifications.svg HTTP/1.1” 302 -
“GET /owncloud/ocs/v2.php/apps/notifications/api/v1/notifications?format=json HTTP/1.1” 200 108
“GET /owncloud/index.php/apps/gallery/config?extramediatypes=1 HTTP/1.1” 412 31
“GET /owncloud/index.php/apps/files/ HTTP/1.1” 500 18929
“GET /owncloud/index.php/apps/files/undefined/img/notifications.svg HTTP/1.1” 302 -
“GET /owncloud/index.php/apps/files/ HTTP/1.1” 500 18929

ownCloud log (data/owncloud.log)

{“reqId”:“pp4bXIHngFEQr759UtYo”,“level”:3,“time”:“2018-12-27T13:26:32+00:00”,“remoteAddr”:“client”,“user”:“istvan”,“app”:“index”,“method”:“GET”,“url”:"/owncloud/index.php/apps/files/",“message”:“Exception: {“Exception”:“RuntimeException”,“Message”:“image not found: image:default-app-icon webroot:\/owncloud serverroot:\/srv\/httpd\/owncloud\/owncloud-10.0.10”,“Code”:0,“Trace”:”#0 \/srv\/httpd\/owncloud\/owncloud-10.0.10\/lib\/private\/NavigationManager.php(176): OC\\URLGenerator->imagePath(‘core’, ‘default-app-ico…’)\n#1 \/srv\/httpd\/owncloud\/owncloud-10.0.10\/lib\/private\/NavigationManager.php(93): OC\\NavigationManager->init()\n#2 \/srv\/httpd\/owncloud\/owncloud-10.0.10\/lib\/private\/legacy\/app.php(673): OC\\NavigationManager->getAll()\n#3 \/srv\/httpd\/owncloud\/owncloud-10.0.10\/lib\/private\/TemplateLayout.php(75): OC_App::getNavigation()\n#4 \/srv\/httpd\/owncloud\/owncloud-10.0.10\/lib\/private\/legacy\/template.php(239): OC\\TemplateLayout->__construct(‘user’, ‘files’)\n#5 \/srv\/httpd\/owncloud\/owncloud-10.0.10\/lib\/public\/AppFramework\/Http\/TemplateResponse.php(149): OC_Template->fetchPage()\n#6 \/srv\/httpd\/owncloud\/owncloud-10.0.10\/lib\/private\/AppFramework\/Http\/Dispatcher.php(108): OCP\\AppFramework\\Http\\TemplateResponse->render()\n#7 \/srv\/httpd\/owncloud\/owncloud-10.0.10\/lib\/private\/AppFramework\/App.php(100): OC\\AppFramework\\Http\\Dispatcher->dispatch(Object(OCA\\Files\\Controller\\ViewController), ‘index’)\n#8 \/srv\/httpd\/owncloud\/owncloud-10.0.10\/lib\/private\/AppFramework\/Routing\/RouteActionHandler.php(46): OC\\AppFramework\\App::main(‘ViewController’, ‘index’, Object(OC\\AppFramework\\DependencyInjection\\DIContainer), Array)\n#9 [internal function]: OC\\AppFramework\\Routing\\RouteActionHandler->__invoke(Array)\n#10 \/srv\/httpd\/owncloud\/owncloud-10.0.10\/lib\/private\/Route\/Router.php(342): call_user_func(Object(OC\\AppFramework\\Routing\\RouteActionHandler), Array)\n#11 \/srv\/httpd\/owncloud\/owncloud-10.0.10\/lib\/base.php(909): OC\\Route\\Router->match(’\/apps\/files\/’)\n#12 \/srv\/httpd\/owncloud\/owncloud-10.0.10\/index.php(54): OC::handleRequest()\n#13 {main}",“File”:"\/srv\/httpd\/owncloud\/owncloud-10.0.10\/lib\/private\/URLGenerator.php",“Line”:173}"}

Browser log

ReferenceError: oc_appconfig is not defined[Learn More] shareconfigmodel.js:24:4

<owncloud_instance>/core/js/shareconfigmodel.js:24:4

<owncloud_instance>/core/js/shareconfigmodel.js:13:2
TypeError: link is undefined[Learn More] js.js:198:4
filePath
<owncloud_instance>/core/js/js.js:198:4

<owncloud_instance>/apps/files_videoplayer/js/viewer.js:4:131
Loading failed for the with source “<owncloud_instance>/apps2/activity/js/formatter.js?v=70cea708a0ae7b98e17a7174f4e6fbf6”. files:141:1
Loading failed for the with source “<owncloud_instance>/apps2/activity/js/activitymodel.js?v=70cea708a0ae7b98e17a7174f4e6fbf6”. files:142:1
Loading failed for the with source “<owncloud_instance>/apps2/activity/js/activitycollection.js?v=70cea708a0ae7b98e17a7174f4e6fbf6”. files:143:1
Loading failed for the with source “<owncloud_instance>/apps2/activity/js/activitytabview.js?v=70cea708a0ae7b98e17a7174f4e6fbf6”. files:144:1
Loading failed for the with source “<owncloud_instance>/apps2/activity/js/filesplugin.js?v=70cea708a0ae7b98e17a7174f4e6fbf6”. files:145:1
ReferenceError: oc_isadmin is not defined[Learn More] js.js:773:3
isUserAdmin
<owncloud_instance>/core/js/js.js:773:3
initialize
<owncloud_instance>/apps/systemtags/js/systemtagsinfoview.js:48:14
Backbone.View
<owncloud_instance>/core/vendor/backbone/backbone.js:1192:5
child
<owncloud_instance>/core/vendor/backbone/backbone.js:1852:34
child
<owncloud_instance>/core/vendor/backbone/backbone.js:1852:34
attach
<owncloud_instance>/apps/systemtags/js/filesplugin.js:34:32
attach
<owncloud_instance>/core/js/js.js:891:16
initialize
<owncloud_instance>/apps/files/js/filelist.js:356:4
FileList
<owncloud_instance>/apps/files/js/filelist.js:37:3
initialize
<owncloud_instance>/apps/files/js/app.js:82:20

<owncloud_instance>/apps/files/js/app.js:320:3
_.delay/<
<owncloud_instance>/core/vendor/underscore/underscore.js:768:14

Hey,

if a feature/functionality isn’t working as expected i would support such an issue to a bugtracker instead of a user support forum.

From what i know the bugtracker for ownCloud is available in https://github.com/owncloud/core/issues, maybe you can create a bugreport there and include the name of the apps you’re trying to move?

Hey Tom42,

Thank you for pointing me to the bugtracker. There I found a ticket which is related: https://github.com/owncloud/core/issues/33270

It seems the secondary app folder must be within the webfolder, which is not the case in my scenario. I did have a second app folder inside the webroot, but then I got integrity errors. I’ll revert my change and see what causes these integrity errors

1 Like

Hey,

great that you have found an existing bugreport and thanks for posting / linking it back for other readers.

Its quite strange that you’re getting integrity errors with this setup. I’m using the following on my own 10.0.10 installation without getting such messages:

  'apps_paths' =>
  array (
    0 =>
    array (
      'path' => '/var/www/owncloud/apps',
      'url' => '/apps',
      'writable' => false,
    ),
    1 =>
    array (
      'path' => '/var/www/owncloud/apps2',
      'url' => '/apps2',
      'writable' => true,
    ),
  ),

Well, the issue is solved. I did move the apps to the secondary apps folder as mentioned below. This time there were no integrity errors. I don’t know what caused these errors, but it had something to do with an ownCloud upgrade from 10.0.7 to 10.0.10 and the secondary apps folder was not copied into the ownCloud webroot during that upgrade. After plain copying the appsfolder into the new ownCloud webroot, the integrity errors appear.

Due to these integrity errors I assumed the secondary apps folder must reside outside the ownCloud webroot.

1 Like