No mimetype icons in Firefox

I think this started in NC 14, but it could also be in FF 64:

No file or folder icons show in the files app. The Favourites overlay icons shows just fine - and in Chromium they also show.

The links to the background images are correct, and they can be viewed from the direct link.

I tried to remove appdata_<IID>/preview but to no avail, no icons were created in the folder.
I also ran:

occ files:cleanup
occ files:scan-app-data
occ preview:generate-all

Which gave me back thumbnails for at least images and text files, but not for .pdf, .odt etc. And not for folders.

<td class="filename ui-draggable">
  <a class="name" href="/index.php/apps/files?dir=//Documents">
    <div class="thumbnail-wrapper">
      <div class="thumbnail" style="background-image:url(/apps/theming/img/core/filetypes/folder.svg?v=1);">
        <div class="favorite-mark permanent">
          <span class="icon icon-starred"></span>
          <span class="hidden-visually">Favorited</span>
        </div>
      </div>
    </div>
    <span class="nametext">
      <span class="innernametext">Documents</span>
    </span>
    <span class="uploadtext" currentuploads="0"></span>
    <span class="fileactions">
      <a class="action action-share permanent" href="#" data-action="Share" data-original-title="" title="">
      <span class="icon icon-shared"></span>
      <span class="hidden-visually">Share</span>
    </a>
    <a class="action action-menu permanent" href="#" data-action="menu" data-original-title="" title="">
    <span class="icon icon-more"></span>
    <span class="hidden-visually">Actions</span>
    </a>
</span>
</a>
</td>

Hi,

You could try the following:

  • run these occ commands:
    • maintenance:mimetype:update-db
    • maintenance:mimetype:update-js
  • clear browser cache
  • perform full reload via CTRL + F5
  • start browser without any plugins to check if any plugin is interfering

I didn’t/ don’t see any issues with NC14, NC15 now and FF64. Therefor I assume an issue with caching somewhere.
Are you using uOrigin plugin for Internet privacy? One user had an issue a little similar to yours and he had to disable (CSS) filtering for the Nextcloud site.
Good luck!

I would say so too, but it didn’t make a difference. I ran the occ commands, disabled all plugins - including Privacy Badger and DuckDuckGo privacy Essentials (I’m not using uOrigin) - cleared the cache, restarted FF and did a full refresh, but to no avail…

Thanks for the suggestions though :slight_smile:

Edit:
There are a lot of these lines in the apache log:

[Mon Dec 17 18:06:01 2018] [error] [client 87.50.31.42] client denied by server configuration: /home/sites/site34/web/cloud/apps/theming/img/core

I’m on a shared hosting, hence the long path.

Is it maybe because they’re SVG files?

https://cloud.example.com/apps/theming/img/core/filetypes/folder.svg?v=1

Generated thumbnails are shown just fine, e.g. https://cloud.example.com/core/preview?fileId=876&c=f3f15ace9a78312d5343970de95fe51f&x=45&y=45&forceIcon=0

Although FF should support using SVG: https://developer.mozilla.org/en-US/docs/Web/SVG/SVG_as_an_Image

Can it really be true, that I’m the only one using Firefox and NC >= 14?

Firefox on Android doesn’t show icons either:

Maybe something went wrong during the update.
I didn’t see this issue on NC14 (I ran all NC14 versions) and I don’t see such issue on NC15.

Maybe a job during update didn’t run, or there is some small configuration issue.
Did you copy the web server config from the latest NC (in your case NC14) documentation?

For some config parts the order did matter. Here is a quote from my nginx config:

    # Adding the cache control header for js and css files
    # Make sure it is BELOW the PHP block
    location ~ \.(?:css|js|woff|svg|gif)$

Do you have PHP module imagick running? (Just asking)

I’m on a shared hosting provider so I don’t know about the config - apache btw. Not sure about ImageMagick either.

No imagick doesn’t seem to be loaded. Is it necessary?
GD imaging is loaded though.

I may have found the culprit. The issue is closed, though: https://github.com/nextcloud/server/issues/9718#issuecomment-516844554

You need to added those file types in config to enable preview of them (https://docs.nextcloud.com/server/16/admin_manual/configuration_server/config_sample_php_parameters.html#previews):

'enabledPreviewProviders' => array(
        'OC\Preview\PNG',
        'OC\Preview\JPEG',
        'OC\Preview\GIF',
        'OC\Preview\HEIC',
        'OC\Preview\BMP',
        'OC\Preview\XBitmap',
        'OC\Preview\MP3',
        'OC\Preview\TXT',
        'OC\Preview\MarkDown'
),

Only register providers that have been explicitly enabled

The following providers are disabled by default due to performance or privacy concerns:

    OC\Preview\Illustrator
    OC\Preview\Movie
    OC\Preview\MSOffice2003
    OC\Preview\MSOffice2007
    OC\Preview\MSOfficeDoc
    OC\Preview\OpenDocument
    OC\Preview\PDF
    OC\Preview\Photoshop
    OC\Preview\Postscript
    OC\Preview\StarOffice
    OC\Preview\SVG
    OC\Preview\TIFF
    OC\Preview\Font

Now you need to do small job:

  • Stop Webserver (apache / nginx)
    service apache2 stop

  • Run
    sudo -u www-data php /var/www/nextcloud/occ files:scan-app-data
    to fix database

  • Start Webserver and Test everything works
    service apache2 start

  • Generate previews by run command:
    sudo -u www-data php /var/www/nextcloud/occ preview:generate-all

Thanks, but that wasn’t the issue. It is the mime type icons that were missing. See the screen shots at github: https://github.com/nextcloud/server/issues/9718#issuecomment-516844554

1 Like