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 registered anymore; occ file scan stopped working #8342

Closed
jasondaigo opened this issue Feb 13, 2018 · 1 comment
Closed

mimetypes not registered anymore; occ file scan stopped working #8342

jasondaigo opened this issue Feb 13, 2018 · 1 comment

Comments

@jasondaigo
Copy link

Steps to reproduce

1.opened file manager
2.click any file
3.trying to occ files:scan --all

Expected behaviour

txt should open in editor or jpg should open in galery or pdf should open in browser reader

Actual behaviour

only file download happens & occ fails with:

Scanning files for 3 users
Starting scan for user 1 out of 3 (admin)
Exception during scan: array_merge(): Argument #2 is not an array
#0 [internal function]: OCA\Files\Command\Scan->exceptionErrorHandler(2, 'array_merge(): ...', '/usr/share/weba...', 104, Array)
#1 /usr/share/webapps/nextcloud/lib/private/Files/Type/Detection.php(104): array_merge(Array, NULL)
#2 /usr/share/webapps/nextcloud/lib/private/Files/Type/Detection.php(152): OC\Files\Type\Detection->registerTypeArray(NULL)
#3 /usr/share/webapps/nextcloud/lib/private/Files/Type/Detection.php(170): OC\Files\Type\Detection->loadMappings()
#4 /usr/share/webapps/nextcloud/lib/private/Files/Storage/Common.php(244): OC\Files\Type\Detection->detectPath('files/Nextcloud...')
#5 /usr/share/webapps/nextcloud/lib/private/Files/Storage/Common.php(669): OC\Files\Storage\Common->getMimeType('files/Nextcloud...')
#6 /usr/share/webapps/nextcloud/lib/private/Files/Storage/Wrapper/Wrapper.php(581): OC\Files\Storage\Common->getMetaData('files/Nextcloud...')
#7 /usr/share/webapps/nextcloud/lib/private/Files/Cache/Scanner.php(112): OC\Files\Storage\Wrapper\Wrapper->getMetaData('files/Nextcloud...')
#8 /usr/share/webapps/nextcloud/lib/private/Files/Cache/Scanner.php(150): OC\Files\Cache\Scanner->getData('files/Nextcloud...')
#9 /usr/share/webapps/nextcloud/lib/private/Files/Cache/Scanner.php(435): OC\Files\Cache\Scanner->scanFile('files/Nextcloud...', 3, '7', Object(OC\Files\Cache\CacheEntry), true)
#10 /usr/share/webapps/nextcloud/lib/private/Files/Cache/Scanner.php(403): OC\Files\Cache\Scanner->handleChildren('files', true, 3, '7', true, 0)
#11 /usr/share/webapps/nextcloud/lib/private/Files/Cache/Scanner.php(406): OC\Files\Cache\Scanner->scanChildren('files', true, 3, '7', true)
#12 /usr/share/webapps/nextcloud/lib/private/Files/Cache/Scanner.php(337): OC\Files\Cache\Scanner->scanChildren('', true, 3, '6', true)
#13 /usr/share/webapps/nextcloud/lib/private/Files/Utils/Scanner.php(244): OC\Files\Cache\Scanner->scan('', true, 3)
#14 /usr/share/webapps/nextcloud/apps/files/lib/Command/Scan.php(161): OC\Files\Utils\Scanner->scan('/admin')
#15 /usr/share/webapps/nextcloud/apps/files/lib/Command/Scan.php(234): OCA\Files\Command\Scan->scanFiles('admin', '/admin', false, Object(Symfony\Component\Console\Output\ConsoleOutput), false)
#16 /usr/share/webapps/nextcloud/3rdparty/symfony/console/Command/Command.php(264): OCA\Files\Command\Scan->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#17 /usr/share/webapps/nextcloud/core/Command/Base.php(161): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#18 /usr/share/webapps/nextcloud/3rdparty/symfony/console/Application.php(874): OC\Core\Command\Base->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#19 /usr/share/webapps/nextcloud/3rdparty/symfony/console/Application.php(228): Symfony\Component\Console\Application->doRunCommand(Object(OCA\Files\Command\Scan), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#20 /usr/share/webapps/nextcloud/3rdparty/symfony/console/Application.php(130): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#21 /usr/share/webapps/nextcloud/lib/private/Console/Application.php(173): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#22 /usr/share/webapps/nextcloud/console.php(90): OC\Console\Application->run()
#23 /usr/share/webapps/nextcloud/occ(11): require_once('/usr/share/weba...')
#24 {main}
Starting scan for user 2 out of 3 (jason)
Exception during scan: array_merge(): Argument #2 is not an array
#0 [internal function]: OCA\Files\Command\Scan->exceptionErrorHandler(2, 'array_merge(): ...', '/usr/share/weba...', 104, Array)
#1 /usr/share/webapps/nextcloud/lib/private/Files/Type/Detection.php(104): array_merge(Array, NULL)
#2 /usr/share/webapps/nextcloud/lib/private/Files/Type/Detection.php(152): OC\Files\Type\Detection->registerTypeArray(NULL)
#3 /usr/share/webapps/nextcloud/lib/private/Files/Type/Detection.php(170): OC\Files\Type\Detection->loadMappings()
#4 /usr/share/webapps/nextcloud/lib/private/Files/Storage/Common.php(244): OC\Files\Type\Detection->detectPath('files_versions/...')
#5 /usr/share/webapps/nextcloud/lib/private/Files/Storage/Common.php(669): OC\Files\Storage\Common->getMimeType('files_versions/...')
#6 /usr/share/webapps/nextcloud/lib/private/Files/Storage/Wrapper/Wrapper.php(581): OC\Files\Storage\Common->getMetaData('files_versions/...')
#7 /usr/share/webapps/nextcloud/lib/private/Files/Cache/Scanner.php(112): OC\Files\Storage\Wrapper\Wrapper->getMetaData('files_versions/...')
#8 /usr/share/webapps/nextcloud/lib/private/Files/Cache/Scanner.php(150): OC\Files\Cache\Scanner->getData('files_versions/...')
#9 /usr/share/webapps/nextcloud/lib/private/Files/Cache/Scanner.php(435): OC\Files\Cache\Scanner->scanFile('files_versions/...', 3, '13951', Object(OC\Files\Cache\CacheEntry), true)
#10 /usr/share/webapps/nextcloud/lib/private/Files/Cache/Scanner.php(403): OC\Files\Cache\Scanner->handleChildren('files_versions', true, 3, '13951', true, 0)
#11 /usr/share/webapps/nextcloud/lib/private/Files/Cache/Scanner.php(406): OC\Files\Cache\Scanner->scanChildren('files_versions', true, 3, '13951', true)
#12 /usr/share/webapps/nextcloud/lib/private/Files/Cache/Scanner.php(337): OC\Files\Cache\Scanner->scanChildren('', true, 3, '105', true)
#13 /usr/share/webapps/nextcloud/lib/private/Files/Utils/Scanner.php(244): OC\Files\Cache\Scanner->scan('', true, 3)
#14 /usr/share/webapps/nextcloud/apps/files/lib/Command/Scan.php(161): OC\Files\Utils\Scanner->scan('/jason')
#15 /usr/share/webapps/nextcloud/apps/files/lib/Command/Scan.php(234): OCA\Files\Command\Scan->scanFiles('jason', '/jason', false, Object(Symfony\Component\Console\Output\ConsoleOutput), false)
#16 /usr/share/webapps/nextcloud/3rdparty/symfony/console/Command/Command.php(264): OCA\Files\Command\Scan->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#17 /usr/share/webapps/nextcloud/core/Command/Base.php(161): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#18 /usr/share/webapps/nextcloud/3rdparty/symfony/console/Application.php(874): OC\Core\Command\Base->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#19 /usr/share/webapps/nextcloud/3rdparty/symfony/console/Application.php(228): Symfony\Component\Console\Application->doRunCommand(Object(OCA\Files\Command\Scan), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#20 /usr/share/webapps/nextcloud/3rdparty/symfony/console/Application.php(130): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#21 /usr/share/webapps/nextcloud/lib/private/Console/Application.php(173): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#22 /usr/share/webapps/nextcloud/console.php(90): OC\Console\Application->run()
#23 /usr/share/webapps/nextcloud/occ(11): require_once('/usr/share/weba...')
#24 {main}
Starting scan for user 3 out of 3 (phenex)
Exception during scan: array_merge(): Argument #2 is not an array
#0 [internal function]: OCA\Files\Command\Scan->exceptionErrorHandler(2, 'array_merge(): ...', '/usr/share/weba...', 104, Array)
#1 /usr/share/webapps/nextcloud/lib/private/Files/Type/Detection.php(104): array_merge(Array, NULL)
#2 /usr/share/webapps/nextcloud/lib/private/Files/Type/Detection.php(152): OC\Files\Type\Detection->registerTypeArray(NULL)
#3 /usr/share/webapps/nextcloud/lib/private/Files/Type/Detection.php(170): OC\Files\Type\Detection->loadMappings()
#4 /usr/share/webapps/nextcloud/lib/private/Files/Storage/Common.php(244): OC\Files\Type\Detection->detectPath('files/Keepass.k...')
#5 /usr/share/webapps/nextcloud/lib/private/Files/Storage/Common.php(669): OC\Files\Storage\Common->getMimeType('files/Keepass.k...')
#6 /usr/share/webapps/nextcloud/lib/private/Files/Storage/Wrapper/Wrapper.php(581): OC\Files\Storage\Common->getMetaData('files/Keepass.k...')
#7 /usr/share/webapps/nextcloud/lib/private/Files/Storage/Wrapper/Wrapper.php(581): OC\Files\Storage\Wrapper\Wrapper->getMetaData('files/Keepass.k...')
#8 /usr/share/webapps/nextcloud/lib/private/Files/Cache/Scanner.php(112): OC\Files\Storage\Wrapper\Wrapper->getMetaData('files/Keepass.k...')
#9 /usr/share/webapps/nextcloud/lib/private/Files/Cache/Scanner.php(150): OC\Files\Cache\Scanner->getData('files/Keepass.k...')
#10 /usr/share/webapps/nextcloud/lib/private/Files/Cache/Scanner.php(435): OC\Files\Cache\Scanner->scanFile('files/Keepass.k...', 3, '13289', Object(OC\Files\Cache\CacheEntry), true)
#11 /usr/share/webapps/nextcloud/lib/private/Files/Cache/Scanner.php(403): OC\Files\Cache\Scanner->handleChildren('files', true, 3, '13289', true, 0)
#12 /usr/share/webapps/nextcloud/lib/private/Files/Cache/Scanner.php(406): OC\Files\Cache\Scanner->scanChildren('files', true, 3, '13289', true)
#13 /usr/share/webapps/nextcloud/lib/private/Files/Cache/Scanner.php(337): OC\Files\Cache\Scanner->scanChildren('', true, 3, '13287', true)
#14 /usr/share/webapps/nextcloud/lib/private/Files/Utils/Scanner.php(244): OC\Files\Cache\Scanner->scan('', true, 3)
#15 /usr/share/webapps/nextcloud/apps/files/lib/Command/Scan.php(161): OC\Files\Utils\Scanner->scan('/phenex')
#16 /usr/share/webapps/nextcloud/apps/files/lib/Command/Scan.php(234): OCA\Files\Command\Scan->scanFiles('phenex', '/phenex', false, Object(Symfony\Component\Console\Output\ConsoleOutput), false)
#17 /usr/share/webapps/nextcloud/3rdparty/symfony/console/Command/Command.php(264): OCA\Files\Command\Scan->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#18 /usr/share/webapps/nextcloud/core/Command/Base.php(161): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#19 /usr/share/webapps/nextcloud/3rdparty/symfony/console/Application.php(874): OC\Core\Command\Base->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#20 /usr/share/webapps/nextcloud/3rdparty/symfony/console/Application.php(228): Symfony\Component\Console\Application->doRunCommand(Object(OCA\Files\Command\Scan), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#21 /usr/share/webapps/nextcloud/3rdparty/symfony/console/Application.php(130): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#22 /usr/share/webapps/nextcloud/lib/private/Console/Application.php(173): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#23 /usr/share/webapps/nextcloud/console.php(90): OC\Console\Application->run()
#24 /usr/share/webapps/nextcloud/occ(11): require_once('/usr/share/weba...')
#25 {main}

+---------+-------+--------------+
| Folders | Files | Elapsed time |
+---------+-------+--------------+
| 6 | 0 | 00:00:00 |
+---------+-------+--------------+

Server configuration

Operating system:Arch Linux

Web server:Apache

**Database:**MariaDB

**PHP version:**7.2

Nextcloud version: 13

**Updated from an older Nextcloud/ownCloud or fresh install:**Updated from 12

**Where did you install Nextcloud from:**Arch Repo

Signing status:

Signing status
Login as admin user into your Nextcloud and access 
http://example.com/index.php/settings/integrity/failed 
paste the results here.
```No errors have been found.
</details>

**List of activated apps:**
<details>
<summary>App list</summary>

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

  - activity: 2.6.1
  - admin_notifications: 1.0.1
  - apporder: 0.4.1
  - bookmarks: 0.10.1
  - bruteforcesettings: 1.0.3
  - calendar: 1.6.0
  - comments: 1.3.0
  - contacts: 2.1.0
  - dav: 1.4.6
  - drop_account: 0.0.6
  - federatedfilesharing: 1.3.1
  - federation: 1.3.0
  - files: 1.8.0
  - files_external: 1.4.1
  - files_markdown: 2.0.1
  - files_pdfviewer: 1.2.0
  - files_sharing: 1.5.0
  - files_texteditor: 2.5.1
  - 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.7.9
  - metadata: 0.6.0
  - news: 12.0.1
  - nextcloud_announcements: 1.2.0
  - notes: 2.3.2
  - notifications: 2.1.2
  - oauth2: 1.1.0
  - ojsxc: 3.3.2
  - password_policy: 1.3.0
  - provisioning_api: 1.3.0
  - rainloop: 5.0.6
  - registration: 0.3.1
  - serverinfo: 1.3.0
  - survey_client: 1.1.0
  - systemtags: 1.3.0
  - tasks: 0.9.6
  - theming: 1.4.1
  - twofactor_backupcodes: 1.2.3
  - updatenotification: 1.3.0
  - weather: 1.5.1
  - workflowengine: 1.3.0
Disabled:
  - admin_audit
  - defaultlinkopen
  - encryption
  - sharebymail
  - spreed
  - user_external
  - user_ldap

</details>

**Nextcloud configuration:**
<details>
<summary>Config report</summary>

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

or

Insert your config.php content here.
Make sure to remove all sensitive content such as passwords. (e.g. database password, passwordsalt, secret, smtp password, …)

    "system": {
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "apps_paths": [
            {
                "path": "\/usr\/share\/webapps\/nextcloud\/apps",
                "url": "\/apps",
                "writable": false
            },
            {
                "path": "\/usr\/share\/webapps\/nextcloud\/apps2",
                "url": "\/apps2",
                "writable": true
            }
        ],
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "jasondaigo.de"
        ],
        "overwrite.cli.url": "https:\/\/jasondaigo.de\/nextcloud",
        "dbtype": "mysql",
        "version": "13.0.0.14",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbport": "",
        "dbtableprefix": "oc_",
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "installed": true,
        "memcache.local": "\\OC\\Memcache\\APCu",
        "maintenance": false,
        "mail_smtpmode": "smtp",
        "mail_smtpauthtype": "LOGIN",
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpauth": 1,
        "mail_smtpsecure": "ssl",
        "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpport": "465",
        "mail_smtpname": "***REMOVED SENSITIVE VALUE***",
        "mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
        "mysql.utf8mb4": true,
        "loglevel": 2,
        "data-fingerprint": "a170a247a351b341825be31f4e1d8377"
    }
}

</details>

**Are you using external storage, if yes which one:** local.

**Are you using encryption:** no

**Are you using an external user-backend, if yes which one:**no


### Client configuration
**Browser:**Qutebrowser/ChromeOapa

**Operating system:**Arch/Windows

### Logs
#### Web server error log
<details>
<summary>Web server error log</summary>

Insert your webserver log here

[Tue Feb 13 23:12:55.282836 2018] [ssl:warn] [pid 333] AH01906: www.jasondaigo.de:443:0 server certificate is a CA certificate (BasicConstraints: CA == TRUE !?)
[Tue Feb 13 23:12:55.283110 2018] [ssl:warn] [pid 333] AH01909: www.jasondaigo.de:443:0 server certificate does NOT include an ID which matches the server name
[Tue Feb 13 23:12:55.313116 2018] [alias:warn] [pid 333] AH00671: The Alias directive in /etc/httpd/conf/extra/nextcloud.conf at line 2 will probably never match because it overlaps an earlier Alias.
AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using fe80::e2d5:5eff:fe15:f652. Set the 'ServerName' directive globally to suppress this message
[Tue Feb 13 23:12:55.320517 2018] [ssl:warn] [pid 333] AH01906: www.jasondaigo.de:443:0 server certificate is a CA certificate (BasicConstraints: CA == TRUE !?)
[Tue Feb 13 23:12:55.320554 2018] [ssl:warn] [pid 333] AH01909: www.jasondaigo.de:443:0 server certificate does NOT include an ID which matches the server name
[Tue Feb 13 23:12:55.402404 2018] [mpm_prefork:notice] [pid 333] AH00163: Apache/2.4.29 (Unix) OpenSSL/1.1.0g PHP/7.2.2 configured -- resuming normal operations
[Tue Feb 13 23:12:55.402473 2018] [core:notice] [pid 333] AH00094: Command line: '/usr/bin/httpd -D FOREGROUND'

</details>

#### Nextcloud log (data/nextcloud.log)
<details>there is no nextcloud.log file in /usr/share/webapps/nextcloud/data
<summary>Nextcloud log</summary>

Insert your Nextcloud log here

</details>

</details>
@nextcloud-bot nextcloud-bot added the stale Ticket or PR with no recent activity label Jun 20, 2018
@nextcloud-bot
Copy link
Member

Hey, this issue has been closed because the label stale is set and there were no updates for 14 days. Feel free to reopen this issue if you deem it appropriate.

(This is an automated comment from GitMate.io.)

@nextcloud-bot nextcloud-bot removed the stale Ticket or PR with no recent activity label Jul 5, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants