Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError: "data is undefined" when trying to install an app #11074

Closed
ychaouche opened this issue Sep 5, 2018 · 3 comments
Closed

TypeError: "data is undefined" when trying to install an app #11074

ychaouche opened this issue Sep 5, 2018 · 3 comments
Labels
0. Needs triage Pending check for reproducibility or if it fits our roadmap bug

Comments

@ychaouche
Copy link

ychaouche commented Sep 5, 2018

EDIT :
I would like to add that installing an app from the command line works fine :

root@app-server[192.168.100.83] /var/www/nextcloud # chown root config/config.php
root@app-server[192.168.100.83] /var/www/nextcloud # /usr/bin/php occ app:install tasks
tasks installed
root@app-server[192.168.100.83] /var/www/nextcloud # /usr/bin/php occ app:list
Enabled:
  - activity: 2.6.1
  - audioplayer: 2.3.2
  - calendar: 1.6.1
  - comments: 1.3.0
  - dav: 1.4.7
  - deck: 0.4.1
  - federatedfilesharing: 1.3.1
  - federation: 1.3.0
  - files: 1.8.0
  - files_downloadactivity: 1.2.0
  - files_pdfviewer: 1.2.1
  - files_sharing: 1.5.0
  - files_texteditor: 2.5.1
  - files_trackdownloads: 1.2.2
  - files_trashbin: 1.3.0
  - files_versions: 1.6.0
  - files_videoplayer: 1.2.0
  - firstrunwizard: 2.2.1
  - gallery: 18.0.0
  - logreader: 2.0.0
  - lookup_server_connector: 1.1.0
  - mail: 0.8.3
  - mindmaps: 0.1.0
  - music: 0.9.0
  - nextcloud_announcements: 1.2.0
  - notifications: 2.1.2
  - oauth2: 1.1.1
  - ownpad: 0.6.8
  - password_policy: 1.3.0
  - provisioning_api: 1.3.0
  - quota_warning: 1.2.0
  - radio: 0.6.1
  - serverinfo: 1.3.0
  - sharebymail: 1.3.0
  - spreed: 3.2.5
  - survey_client: 1.1.0
  - systemtags: 1.3.0
  - theming: 1.4.5
  - twofactor_backupcodes: 1.2.3
  - unsplash: 1.1.1
  - updatenotification: 1.3.0
  - user_usage_report: 1.0.1
  - workflowengine: 1.3.0
Disabled:
  - admin_audit
  - encryption
  - files_external
  - tasks
  - user_external
  - user_ldap
root@app-server[192.168.100.83] /var/www/nextcloud # /usr/bin/php occ app:enable tasks
tasks enabled
root@app-server[192.168.100.83] /var/www/nextcloud # /usr/bin/php occ app:list
Enabled:
  - activity: 2.6.1
  - audioplayer: 2.3.2
  - calendar: 1.6.1
  - comments: 1.3.0
  - dav: 1.4.7
  - deck: 0.4.1
  - federatedfilesharing: 1.3.1
  - federation: 1.3.0
  - files: 1.8.0
  - files_downloadactivity: 1.2.0
  - files_pdfviewer: 1.2.1
  - files_sharing: 1.5.0
  - files_texteditor: 2.5.1
  - files_trackdownloads: 1.2.2
  - files_trashbin: 1.3.0
  - files_versions: 1.6.0
  - files_videoplayer: 1.2.0
  - firstrunwizard: 2.2.1
  - gallery: 18.0.0
  - logreader: 2.0.0
  - lookup_server_connector: 1.1.0
  - mail: 0.8.3
  - mindmaps: 0.1.0
  - music: 0.9.0
  - nextcloud_announcements: 1.2.0
  - notifications: 2.1.2
  - oauth2: 1.1.1
  - ownpad: 0.6.8
  - password_policy: 1.3.0
  - provisioning_api: 1.3.0
  - quota_warning: 1.2.0
  - radio: 0.6.1
  - serverinfo: 1.3.0
  - sharebymail: 1.3.0
  - spreed: 3.2.5
  - survey_client: 1.1.0
  - systemtags: 1.3.0
  - tasks: 0.9.6
  - theming: 1.4.5
  - twofactor_backupcodes: 1.2.3
  - unsplash: 1.1.1
  - updatenotification: 1.3.0
  - user_usage_report: 1.0.1
  - workflowengine: 1.3.0
Disabled:
  - admin_audit
  - encryption
  - files_external
  - user_external
  - user_ldap
root@app-server[192.168.100.83] /var/www/nextcloud # chown www-data config/config.php

** I should have done that under www-data but su says "This account is currently not available" so instead of figuring out how to do it (sudo isn't available in debian) I tried the dirty/hackish way. The file has been reverted back to www-data, no worries.

Steps to reproduce

  1. login as admin
  2. go to apps, select any category
  3. try to enable any app that isn't already enabled

Expected behaviour

app should be installed and enabled

Actual behaviour

image

Nothing happens. F12 (firebug) show the the following error message : TypeError: "data is undefined" merged-template-prepend.js:3727

_build > http://wee.eprs.dz/js/core/merged-template-prepend.js?v=c3ef6778-0:3970:5 > data: undefined

Here's the javascript function containing the problematic code (copied from the debugger):

		// From stackoverflow.com/questions/1408289/best-way-to-do-variable-interpolation-in-javascript
		_build: function(o){
			var data = this.elem.attr('type') === 'text/template' ? this.elem.html() : this.elem.get(0).outerHTML;
			try {
				return data.replace(/{([^{}]*)}/g,
					function (a, b) {
						var r = o[b];
						return typeof r === 'string' || typeof r === 'number' ? r : a;
					}
				);
			} catch(e) {
				console.error(e, 'data:', data);
			}
		},
		options: {
			escapeFunction: escapeHTML
		}
	};

Server configuration

Operating system:
Linux Debian 9.5

Web server:
Nginx 1.10.3

Database:
Mysql 15.1

PHP version:
7.0.30

Nextcloud version: (see Nextcloud admin page)
13.0.6

Updated from an older Nextcloud/ownCloud or fresh install:
Fresh install

Where did you install Nextcloud from:
Sources

Signing status:

Signing status ``` No errors have been found. ```

List of activated apps:

App list
If you have access to your command line run e.g.:
sudo -u www-data php occ app:list
from within your Nextcloud installation folder

Nextcloud configuration:

Config report
{
    "system": {
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "wee.eprs.dz"
        ],
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "overwrite.cli.url": "http:\/\/wee.eprs.dz",
        "dbtype": "mysql",
        "version": "13.0.6.1",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbport": "",
        "dbtableprefix": "oc_",
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "installed": true
    },
    "apps": {
        "activity": {
            "enabled": "yes",
            "installed_version": "2.6.1",
            "types": "filesystem"
        },
        "audioplayer": {
            "enabled": "yes",
            "installed_version": "2.3.2",
            "types": "filesystem"
        },
        "backgroundjob": {
            "lastjob": "22"
        },
        "calendar": {
            "enabled": "yes",
            "installed_version": "1.6.1",
            "types": ""
        },
        "comments": {
            "enabled": "yes",
            "installed_version": "1.3.0",
            "types": "logging"
        },
        "core": {
            "installedat": "1536143938.5887",
            "lastcron": "1536160315",
            "lastupdateResult": "[]",
            "lastupdatedat": "1536160314",
            "oc.integritycheck.checker": "[]",
            "public_files": "files_sharing\/public.php",
            "public_webdav": "dav\/appinfo\/v1\/publicwebdav.php",
            "scss.variables": "84cfcb9d5861e1f5620e38d6f8245843",
            "vendor": "nextcloud"
        },
        "dav": {
            "enabled": "yes",
            "installed_version": "1.4.7",
            "types": "filesystem"
        },
        "deck": {
            "enabled": "yes",
            "installed_version": "0.4.1",
            "types": ""
        },
        "federatedfilesharing": {
            "enabled": "yes",
            "installed_version": "1.3.1",
            "types": ""
        },
        "federation": {
            "enabled": "yes",
            "installed_version": "1.3.0",
            "types": "authentication"
        },
        "files": {
            "cronjob_scan_files": "500",
            "enabled": "yes",
            "installed_version": "1.8.0",
            "types": "filesystem"
        },
        "files_downloadactivity": {
            "enabled": "yes",
            "installed_version": "1.2.0",
            "types": "filesystem"
        },
        "files_pdfviewer": {
            "enabled": "yes",
            "installed_version": "1.2.1",
            "types": ""
        },
        "files_sharing": {
            "enabled": "yes",
            "installed_version": "1.5.0",
            "types": "filesystem"
        },
        "files_texteditor": {
            "enabled": "yes",
            "installed_version": "2.5.1",
            "types": ""
        },
        "files_trackdownloads": {
            "enabled": "yes",
            "installed_version": "1.2.2",
            "types": "filesystem"
        },
        "files_trashbin": {
            "enabled": "yes",
            "installed_version": "1.3.0",
            "types": "filesystem"
        },
        "files_versions": {
            "enabled": "yes",
            "installed_version": "1.6.0",
            "types": "filesystem"
        },
        "files_videoplayer": {
            "enabled": "yes",
            "installed_version": "1.2.0",
            "types": ""
        },
        "firstrunwizard": {
            "enabled": "yes",
            "installed_version": "2.2.1",
            "types": "logging"
        },
        "gallery": {
            "enabled": "yes",
            "installed_version": "18.0.0",
            "types": ""
        },
        "logreader": {
            "enabled": "yes",
            "installed_version": "2.0.0",
            "ocsid": "170871",
            "types": ""
        },
        "lookup_server_connector": {
            "enabled": "yes",
            "installed_version": "1.1.0",
            "types": "authentication"
        },
        "mail": {
            "enabled": "yes",
            "installed_version": "0.8.3",
            "types": ""
        },
        "mindmaps": {
            "enabled": "yes",
            "installed_version": "0.1.0",
            "types": ""
        },
        "music": {
            "enabled": "yes",
            "installed_version": "0.9.0",
            "types": "filesystem"
        },
        "nextcloud_announcements": {
            "enabled": "yes",
            "installed_version": "1.2.0",
            "pub_date": "Sat, 10 Dec 2016 00:00:00 +0100",
            "types": "logging"
        },
        "notifications": {
            "enabled": "yes",
            "installed_version": "2.1.2",
            "types": "logging"
        },
        "oauth2": {
            "enabled": "yes",
            "installed_version": "1.1.1",
            "types": "authentication"
        },
        "ownpad": {
            "enabled": "yes",
            "installed_version": "0.6.8",
            "types": ""
        },
        "password_policy": {
            "enabled": "yes",
            "installed_version": "1.3.0",
            "types": ""
        },
        "provisioning_api": {
            "enabled": "yes",
            "installed_version": "1.3.0",
            "types": "prevent_group_restriction"
        },
        "quota_warning": {
            "enabled": "yes",
            "installed_version": "1.2.0",
            "types": "filesystem"
        },
        "radio": {
            "enabled": "yes",
            "installed_version": "0.6.1",
            "types": ""
        },
        "serverinfo": {
            "enabled": "yes",
            "installed_version": "1.3.0",
            "types": ""
        },
        "sharebymail": {
            "enabled": "yes",
            "installed_version": "1.3.0",
            "types": "filesystem"
        },
        "spreed": {
            "enabled": "yes",
            "installed_version": "3.2.5",
            "stun_servers": "[\"stun.nextcloud.com:443\"]",
            "types": "prevent_group_restriction"
        },
        "survey_client": {
            "enabled": "yes",
            "installed_version": "1.1.0",
            "types": ""
        },
        "systemtags": {
            "enabled": "yes",
            "installed_version": "1.3.0",
            "types": "logging"
        },
        "theming": {
            "enabled": "yes",
            "installed_version": "1.4.5",
            "types": "logging"
        },
        "twofactor_backupcodes": {
            "enabled": "yes",
            "installed_version": "1.2.3",
            "types": ""
        },
        "unsplash": {
            "enabled": "yes",
            "installed_version": "1.1.1",
            "types": ""
        },
        "updatenotification": {
            "enabled": "yes",
            "installed_version": "1.3.0",
            "types": ""
        },
        "user_usage_report": {
            "enabled": "yes",
            "installed_version": "1.0.1",
            "types": "filesystem"
        },
        "workflowengine": {
            "enabled": "yes",
            "installed_version": "1.3.0",
            "types": "filesystem"
        }
    }
}

Are you using external storage, if yes which one: local/smb/sftp/...
Nope

Are you using encryption: yes/no
No

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

Client configuration

Browser:
Firefox 61.0.1

Operating system:
Linux Mint 17 Qiana

Logs

Web server error log

Web server error log

Nextcloud log (data/nextcloud.log)

Nextcloud log
No errors

Browser log

Browser log
 TypeError: "data is undefined" merged-template-prepend.js:3727
_build > http://wee.eprs.dz/js/core/merged-template-prepend.js?v=c3ef6778-0:3970:5 > data: undefined
@nextcloud-bot
Copy link
Member

GitMate.io thinks possibly related issues are #9853 (No route to host when trying to install an app), #5987 (Undefined index: uidnext When Using Mail App), #5539 (Delete App Data), #5834 (Add --enable trigger to app:install command), and #3527 (Trying to install App fails on 11.0.1.2).

@ychaouche
Copy link
Author

I have the same error when trying to create a new user : Typer error data is undefined

image

@skjnldsv skjnldsv added the 0. Needs triage Pending check for reproducibility or if it fits our roadmap label Jun 12, 2019
@szaimen
Copy link
Contributor

szaimen commented May 21, 2021

As I cannot reproduce the original issue anymore, I will close this ticket. If this is still happening please make sure to upgrade to the latest version. After that, feel free to reopen.

@szaimen szaimen closed this as completed May 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0. Needs triage Pending check for reproducibility or if it fits our roadmap bug
Projects
None yet
Development

No branches or pull requests

4 participants