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

mimetypes not updating #17217

Closed
Mycah opened this issue Sep 19, 2019 · 5 comments
Closed

mimetypes not updating #17217

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

Comments

@Mycah
Copy link

Mycah commented Sep 19, 2019

Steps to reproduce

  1. Update config/mimetypemapping.json with a new mime type.
{
          "kdbx": ["application/x-kdbx"]
}
  1. Run sudo -u www-data php occ maintenance:mimetype:update-js

Expected behaviour

Clicking on a kdbx file should open the file into keeweb installed app.

Actual behaviour

Prompts to download file.

Server configuration

Operating system:
ubuntu 18.04

Web server:
Caddy v1.0.1

Database:
10.1.41-MariaDB-0ubuntu0.18.04.1

PHP version:
7.2.19-0ubuntu0.18.04.2

Nextcloud version: (see Nextcloud admin page)
16.0.4

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

Where did you install Nextcloud from:
Website

Signing status:

Signing status
Technical information
=====================
The following list covers which files have failed the integrity check. Please read
the previous linked documentation to learn more about the errors and how to fix
them.

Results
=======
- core
	- INVALID_HASH
		- core/js/mimetypelist.js

Raw output
==========
Array
(
    [core] => Array
        (
            [INVALID_HASH] => Array
                (
                    [core/js/mimetypelist.js] => Array
                        (
                            [expected] => dc48de7ad4baa030c5e563350c9a80b274bad783f6f5adbf1595ecef6c6a32e52890a24cb26cddb0aa20193ba52c001150c68d8bfb567f0aed566f4029a190a3
                            [current] => 53613657e01ad07fb878200f174a72a8ac062f6f3d52624034c85157a2bd7517b6b79b18ddad5b312319e7d9bec6b1d409c8ec9098480a356777e0dcee2f39f8
                        )

                )

        )

)

List of activated apps:

App list
Enabled:
  - accessibility: 1.2.0
  - activity: 2.9.1
  - admin_audit: 1.6.0
  - cloud_federation_api: 0.2.0
  - comments: 1.6.0
  - dav: 1.9.2
  - federatedfilesharing: 1.6.0
  - federation: 1.6.0
  - files: 1.11.0
  - files_pdfviewer: 1.5.0
  - files_rightclick: 0.15.1
  - files_sharing: 1.8.0
  - files_texteditor: 2.8.0
  - files_trashbin: 1.6.0
  - files_versions: 1.9.0
  - files_videoplayer: 1.5.0
  - firstrunwizard: 2.5.0
  - gallery: 18.3.0
  - keeweb: 0.5.1
  - lookup_server_connector: 1.4.0
  - notifications: 2.4.1
  - oauth2: 1.4.2
  - password_policy: 1.6.0
  - privacy: 1.0.0
  - provisioning_api: 1.6.0
  - recommendations: 0.4.0
  - serverinfo: 1.6.0
  - support: 1.0.0
  - survey_client: 1.4.0
  - systemtags: 1.6.0
  - theming: 1.7.0
  - twofactor_backupcodes: 1.5.0
  - updatenotification: 1.6.0
  - viewer: 1.1.0
  - workflowengine: 1.6.0
Disabled:
  - bruteforcesettings
  - encryption
  - files_external
  - logreader
  - nextcloud_announcements
  - sharebymail
  - user_ldap

Nextcloud configuration:

Config report
{
    "system": {
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "nextcloud.domain.com"
        ],
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "overwrite.cli.url": "https:\/\/nextcloud.domain.com",
        "dbtype": "mysql",
        "version": "16.0.4.1",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "trashbin_retention_obligation": "180",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbtableprefix": "oc_",
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "logtimezone": "UTC",
        "installed": true,
        "updater.server.url": "https:\/\/updates.nextcloud.com\/updater_server\/",
        "updater.release.channel": "stable",
        "maintenance": false,
        "memcache.local": "\\OC\\Memcache\\APCu",
        "theme": "",
        "loglevel": 2,
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpmode": "smtp",
        "mail_sendmailmode": "smtp",
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpport": "25",
        "mysql.utf8mb4": true
    }
}

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/...
no

Client configuration

Browser:
Firefox 69

Operating system:
Windows 7

Logs

Web server error log

Web server error log
no relevant log information to this issue

Nextcloud log (data/nextcloud.log)

Nextcloud log
no relevant log information to this issue

Browser log

Browser log
no relevant log information to this issue
@Mycah Mycah added 0. Needs triage Pending check for reproducibility or if it fits our roadmap bug labels Sep 19, 2019
@Mycah
Copy link
Author

Mycah commented Sep 19, 2019

Also, checking the database for what the configured mimetypes are after running the occ command doesn't show the new mimetype:

MariaDB [nextcloud]> select * from oc_mimetypes;

+----+-----------------------------------------+
| id | mimetype                                |
+----+-----------------------------------------+
|  3 | application                             |
| 39 | application/cmd                         |
| 54 | application/comicbook+7z                |
| 55 | application/comicbook+ace               |
| 56 | application/comicbook+rar               |
| 57 | application/comicbook+tar               |
| 58 | application/comicbook+truecrypt         |
| 59 | application/comicbook+zip               |
| 62 | application/font-sfnt                   |
| 46 | application/gpx+xml                     |
| 50 | application/internet-shortcut           |
| 26 | application/javascript                  |
|  8 | application/json                        |
|  7 | application/octet-stream                |
| 33 | application/pdf                         |
| 22 | application/vnd.android.package-archive |
| 49 | application/vnd.garmin.tcx+xml          |
| 47 | application/vnd.google-earth.kml+xml    |
| 48 | application/vnd.google-earth.kmz        |
|  4 | application/vnd.oasis.opendocument.text |
| 53 | application/vnd.visio                   |
| 43 | application/x-7z-compressed             |
| 32 | application/x-compressed                |
| 19 | application/x-gzip                      |
| 20 | application/x-iwork-keynote-sffkey      |
| 38 | application/x-msdos-program             |
| 34 | application/x-rar-compressed            |
| 21 | application/xml                         |
| 16 | application/yaml                        |
| 25 | application/zip                         |
| 41 | audio                                   |
| 45 | audio/mp4                               |
| 42 | audio/mpeg                              |
| 51 | audio/mpegurl                           |
| 52 | audio/x-scpls                           |
|  1 | httpd                                   |
|  2 | httpd/unix-directory                    |
|  5 | image                                   |
| 36 | image/jp2                               |
|  6 | image/jpeg                              |
|  9 | image/png                               |
| 35 | image/svg+xml                           |
| 37 | image/webp                              |
| 60 | image/x-dcraw                           |
| 12 | text                                    |
| 40 | text/css                                |
| 29 | text/html                               |
| 18 | text/markdown                           |
| 17 | text/plain                              |
| 61 | text/vcard                              |
| 30 | text/x-c                                |
| 31 | text/x-python                           |
| 13 | text/x-shellscript                      |
| 23 | video                                   |
| 24 | video/mp4                               |
| 44 | video/x-msvideo                         |
| 63 | x-application/kdbx                      |
+----+-----------------------------------------+

@kesselb
Copy link
Contributor

kesselb commented Sep 19, 2019

Also, checking the database for what the configured mimetypes are after running the occ command doesn't show the new mimetype:

You added application/x-kdbx to oc_mimetypes than? (because the latest element from the post is x-application/kdbx)

@Mycah
Copy link
Author

Mycah commented Sep 19, 2019

Also, checking the database for what the configured mimetypes are after running the occ command doesn't show the new mimetype:

You added application/x-kdbx to oc_mimetypes than? (because the latest element from the post is x-application/kdbx)

Weird, I didn't notice that. It must've appended the x- to the application/kbdx mimetype. It doesn't work that way, however. The app doesn't get called when I click on a kdbx, and x- isn't in the mimetypes file. I'm not sure why it would've appended that.

@krodelabestiole
Copy link

same here, both with application/x-kdbx and x-application/kdbx (any info from the devs about that ?)
and after
sudo -u www-data php occ maintenance:mimetype:update-db --repair-filecache
every time

@kesselb
Copy link
Contributor

kesselb commented Dec 7, 2019

Should be fixed by jhass/nextcloud-keeweb#124. Please report back if it do not work for you.

@kesselb kesselb closed this as completed Dec 7, 2019
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

3 participants