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

Errors when uploading to public folder #11681

Closed
enoch85 opened this issue Oct 20, 2014 · 16 comments
Closed

Errors when uploading to public folder #11681

enoch85 opened this issue Oct 20, 2014 · 16 comments

Comments

@enoch85
Copy link
Member

enoch85 commented Oct 20, 2014

Also, strange thing is that /var/www/owncloud/apps/music/utility/scanner.php is called on every error...

Steps to reproduce

  1. Create a folder on your oC Instance
  2. Share that folder via link, without password or restrictions
  3. Make it possible to upload to that folder
  4. Ask someone outside your network to upload something, in this case pics and video files
  5. The one that uploads gets "server error" all the time (that´s what he said)
  6. I get https://gist.github.com/enoch85/3bf635ae8e2449f8e4f8 in my log

Expected behaviour

No errors

Actual behaviour

https://gist.github.com/enoch85/3bf635ae8e2449f8e4f8

Server configuration

Ubuntu Server 12.04

Database:
Server version: 5.5.38-0ubuntu0.12.04.1 (Ubuntu)
PHP version:
PHP 5.3.10-1ubuntu3.14 with Suhosin-Patch (cli) (built: Sep 4 2014 07:08:49)
ownCloud version: (see ownCloud admin page)
7.0.2
Updated from an older ownCloud or fresh install:
Updated from stable 5 and then later stable 6
List of activated apps:
Activity
Calender
Contacts
Deleted files
Documents
External Storage Support
First Run Wizard
Full Text Search
Music
PDF Viewer
Pictures
Share Files
Tasks
Text Editor
Updater
Versions
Video Viewer

The content of config/config.php:

<?php
$CONFIG = array (
  'instanceid' => '',
  'passwordsalt' => '',
  'datadirectory' => '/var/www/owncloud/data',
  'dbtype' => 'mysql',
  'version' => '7.0.2.1',
  'dbname' => 'owncloud',
  'dbhost' => 'localhost.localdomain',
  'dbtableprefix' => 'oc_',
  'dbuser' => '',
  'dbpassword' => '',
  'installed' => true,
  'maxZipInputSize' => 0,
  'allowZipDownload' => true,
  'session_lifetime' => 1800,
  'check_for_working_webdav' => false,
  'forcessl' => true,
  'updatechecker' => true,
  'loglevel' => '2',
  'theme' => '',
  'maintenance' => false,
  'trusted_domains' =>
  array (
    0 => '',
    1 => '192.168.1.111',
  ),
  'preview_libreoffice_path' => '/usr/bin/libreoffice',
  'appstoreenabled' => false,
);

Are you using external storage, if yes which one: local/smb/sftp/...
Dropbox
Are you using encryption: yes/no
No

Client configuration

Browser:
Version 37.0.2062.120 m
Operating system:
Windows 8.1

Logs

Web server error log

Insert your webserver log here

ownCloud log (data/owncloud.log)

https://gist.github.com/enoch85/3bf635ae8e2449f8e4f8

Browser log

Insert your browser log here, this could for example include:

a) The javascript console log
b) The network log 
c) ...
@PVince81
Copy link
Contributor

@MorrisJobke @icewind1991

@Panoptis
Copy link

can confirm this.
Workaround:
line 83...94 of scanner.php

    public function updateByPath($filePath, $userId = null) {
        if ($filePath) {
    try {
            $file = $this->userFolder->get($filePath);
      if ($file) {
            $this->update($file, $userId);
      }
        } catch (\OCP\Files\NotFoundException $e) {
            // just ignore the error
            $this->logger->log('updateByPath - file not found - '. $filePath , 'debug');
        }
    }}

@icewind1991
Copy link
Contributor

From the error log it seems caused by an error in the music app, can you retry with the music app disabled?

@enoch85
Copy link
Member Author

enoch85 commented Oct 24, 2014

@icewind1991 This is the log when the music app is deactivated:

Warning sharing No fileinfo available for: /DirektUppladdning   2014-10-24T22:56:16+00:00
Warning sharing No fileinfo available for: /DirektUppladdning/Bilder från farsans dator    2014-10-24T22:56:16+00:00
Warning sharing No fileinfo available for: /DirektUppladdning/Bilder från farsans dator/mobogenie_1541.apk 2014-10-24T22:56:16+00:00
Fatal   index   Symfony\Component\Routing\Exception\RouteNotFoundException: Route "music.page.index" does not exist.    2014-10-24T22:53:51+00:00
Error   PHP Out of memory (allocated 1903165440) (tried to allocate 1879450700 bytes) at /var/www/owncloud/lib/private/preview/txt.php#30   2014-10-24T22:52:26+00:00
Error   PHP Out of memory (allocated 1903165440) (tried to allocate 1879450700 bytes) at /var/www/owncloud/lib/private/preview/txt.php#30   2014-10-24T22:43:26+00:00
Error   PHP Out of memory (allocated 1903165440) (tried to allocate 1879450700 bytes) at /var/www/owncloud/lib/private/preview/txt.php#30   2014-10-24T22:42:32+00:00
Fatal   webdav  Sabre\DAV\Exception\MethodNotAllowed: The resource you tried to create already exists   2014-10-24T22:08:55+00:00
Fatal   webdav  Sabre\DAV\Exception\MethodNotAllowed: The resource you tried to create already exists   2014-10-24T22:07:23+00:00

@PVince81
Copy link
Contributor

Still happening in 7.0.4 ?

@enoch85
Copy link
Member Author

enoch85 commented Jan 23, 2015

@PVince81 Yes, still happening.

@enoch85
Copy link
Member Author

enoch85 commented Jan 23, 2015


Error   files   Upload error: 3 - Den uppladdade filen var endast delvis uppladdad  2015-01-23T19:49:16+00:00
Error   PHP Call to a member function get() on a non-object at /var/www/owncloud/apps/music/utility/scanner.php#85  2015-01-23T19:49:15+00:00
Warning sharing No fileinfo available for: /Hej 2015-01-23T19:49:15+00:00
Warning sharing No fileinfo available for: /Hej/jim.toms.road.to.nashville.vol.1.special.720p-dhd.r08   2015-01-23T19:49:15+00:00
Error   PHP Call to a member function get() on a non-object at /var/www/owncloud/apps/music/utility/scanner.php#85  2015-01-23T19:49:11+00:00
Warning sharing No fileinfo available for: /Hej 2015-01-23T19:49:11+00:00
Warning sharing No fileinfo available for: /Hej/jim.toms.road.to.nashville.vol.1.special.720p-dhd.r07   2015-01-23T19:49:11+00:00
Error   PHP Call to a member function get() on a non-object at /var/www/owncloud/apps/music/utility/scanner.php#85  2015-01-23T19:49:06+00:00
Warning sharing No fileinfo available for: /Hej 2015-01-23T19:49:06+00:00
Warning sharing No fileinfo available for: /Hej/jim.toms.road.to.nashville.vol.1.special.720p-dhd.r06   2015-01-23T19:49:06+00:00
Error   PHP Call to a member function get() on a non-object at /var/www/owncloud/apps/music/utility/scanner.php#85  2015-01-23T19:48:51+00:00
Warning sharing No fileinfo available for: /Hej 2015-01-23T19:48:51+00:00
Warning sharing No fileinfo available for: /Hej/jim.toms.road.to.nashville.vol.1.special.720p-dhd.r05   2015-01-23T19:48:51+00:00

@enoch85
Copy link
Member Author

enoch85 commented Jan 23, 2015

Without Music App activated:

Warning sharing No fileinfo available for: /Hej 2015-01-23T20:01:15+00:00
Warning sharing No fileinfo available for: /Hej/The.Blacklist.S02E08.720p.HDTV.X264-DIMENSION.mkv   2015-01-23T20:01:15+00:00
Warning sharing No fileinfo available for: /Hej 2015-01-23T19:58:45+00:00
Warning sharing No fileinfo available for: /Hej/the.blacklist.208.720p-dimension.sfv    2015-01-23T19:58:45+00:00
Warning sharing No fileinfo available for: /Hej 2015-01-23T19:58:44+00:00
Warning sharing No fileinfo available for: /Hej/the.blacklist.208.720p-dimension.rar    2015-01-23T19:58:44+00:00
Warning sharing No fileinfo available for: /Hej 2015-01-23T19:58:39+00:00
Warning sharing No fileinfo available for: /Hej/the.blacklist.208.720p-dimension.r13    2015-01-23T19:58:39+00:00
Warning sharing No fileinfo available for: /Hej 2015-01-23T19:58:34+00:00
Warning sharing No fileinfo available for: /Hej/the.blacklist.208.720p-dimension.r12    2015-01-23T19:58:34+00:00

No "Internal Server Error" though.

@PVince81
Copy link
Contributor

Thanks. Very strange.
Are these files stored on an external storage mount point or just the local home ?

@enoch85
Copy link
Member Author

enoch85 commented Jan 26, 2015

Just local. Removed the External App, remember? :)

@PVince81
Copy link
Contributor

This here is suspicious, but not necessarily related to your issue:

Error   PHP Out of memory (allocated 1903165440) (tried to allocate 1879450700 bytes) at /var/www/owncloud/lib/private/preview/txt.php#30   2014-10-24T22:42:32+00:00

Do you have a super huge txt file ?

@georgehrke we should maybe prevent creating previews for text files bigger than a given size. Also I don't understand why it would cause such error, the preview code should only read a few lines.

@enoch85
Copy link
Member Author

enoch85 commented Jan 27, 2015

@PVince81 Nope, no big .txt file. Not in that folder anyway. But I have a 2.1 GB logfile in the root of my ownCloud.

@enoch85
Copy link
Member Author

enoch85 commented Mar 23, 2015

@icewind1991 @PVince81 Any update here?

@enoch85 enoch85 added this to the 8.1-current milestone Mar 23, 2015
@DeepDiver1975 DeepDiver1975 modified the milestones: 8.1-current, 8.2-next Apr 4, 2015
@PVince81
Copy link
Contributor

PVince81 commented Aug 3, 2015

@enoch85 still happening with 7.0.7 or 8.0.5 ?

@enoch85
Copy link
Member Author

enoch85 commented Aug 3, 2015

@PVince81 no, haven't seen it.

@enoch85 enoch85 closed this as completed Aug 3, 2015
@enoch85
Copy link
Member Author

enoch85 commented Aug 3, 2015

On 8.1 that is.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants