Skip to content

Fatal error in dav app while running cron job #23496

Closed

Description

@AMDG2

Steps to reproduce

  1. Run cron task every 15 minutes
  2. Receive errors by email on server admin address

Expected behaviour

No error at all

Actual behaviour

Receiving this error

PHP Fatal error: Call to a member function getUID() on null in /path/to/owncloud/apps/dav/appinfo/app.php on line 49

Server configuration

Operating system: CentOS 7

Web server: Apache 2.4.6

Database: MariaDB 5.5.44

PHP version: PHP 5.6.19

ownCloud version: 9.0.0

Updated from an older ownCloud or fresh install: Updated from 8.2.2

Where did you install ownCloud from: VPS at OVH installed from sources downloaded manually at owncloud.org

Signing status (ownCloud 9.0 and above): Don't know how to check

Result of: https://owncloud.example.com/index.php/settings/integrity/failed

No errors have been found.

List of activated apps:

Enabled:
  - activity: 2.2.1
  - calendar: true
  - comments: 0.2
  - contacts: true
  - dav: 0.1.5
  - documents: true
  - federatedfilesharing: 0.1.0
  - federation: 0.0.4
  - files: 1.4.4
  - files_external: 0.5.2
  - files_pdfviewer: 0.8
  - files_sharing: 0.9.1
  - files_texteditor: 2.1
  - files_trashbin: 0.8.0
  - files_versions: 1.2.0
  - files_videoplayer: 0.9.8
  - firstrunwizard: 1.1
  - gallery: 14.5.0
  - mail: true
  - notifications: 0.2.3
  - provisioning_api: 0.4.1
  - systemtags: 0.2
  - templateeditor: 0.1
  - updatenotification: 0.1.0
Disabled:
  - encryption
  - external
  - user_external
  - user_ldap

The content of config/config.php:

{
    "system": {
        "instanceid": "oc88e4a5a3b8",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "datadirectory": "\/srv\/owncloud\/data",
        "dbtype": "mysql",
        "version": "9.0.0.19",
        "dbname": "owncloud",
        "dbhost": "localhost",
        "dbtableprefix": "oc_",
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "installed": true,
        "forcessl": true,
        "theme": "",
        "maintenance": false,
        "loglevel": 2,
        "trusted_domains": [
            "***REMOVED SENSITIVE VALUE***"
        ],
        "custom_csp_policy": "default-src 'self'; script-src 'self' https:\/\/piwik-domain 'unsafe-inline' 'unsafe-eval'; style-src 'self' 'unsafe-inline'; frame-src *; img-src * data:; font-src 'self' data:; media-src *",
        "enable_previews": true,
        "preview_libreoffice_path": "\/usr\/bin\/libreoffice",
        "mail_from_address": "owncloud",
        "mail_smtpmode": "sendmail",
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "enable_avatars": true,
        "allow_user_to_change_display_name": true,
        "has_internet_connection": true,
        "check_for_working_webdav": true,
        "check_for_working_htaccess": true,
        "filelocking.enabled": "true",
        "memcache.locking": "\\OC\\Memcache\\Redis",
        "memcache.local": "\\OC\\Memcache\\Redis",
        "redis": {
            "host": "127.0.0.1",
            "port": 6379,
            "timeout": 0,
            "dbindex": 0
        },
        "asset-pipeline.enabled": true,
        "trashbin_retention_obligation": "auto"
    }
}

Are you using external storage, if yes which one: No

Are you using encryption: no

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

Client configuration

Browser: Firefox

Operating system: Linux

Logs

Web server error log

no owncloud related information

ownCloud log (data/owncloud.log)

{"reqId":"nD9wNLHV7JtOT\/ZpSdfw","remoteAddr":"","app":"PHP","message":"Call to a member function getUID() on null at \/srv\/http\/vhost\/owncloud\/apps\/dav\/appinfo\/app.php#49","level":3,"time":"2016-03-22T21:00:02+00:00"}

Not related owncloud line, but maybe another bug (no time to open another issue)

{"reqId":"VvGwCDlcnk5MG2sCqppw8wAAAAE","remoteAddr":"*** SENSITIVE **","app":"PHP","message":"Undefined index: newVersionString at \/srv\/http\/vhost\/owncloud\/apps\/updatenotification\/templates\/admin.php#8","level":3,"time":"2016-03-22T20:50:17+00:00"}

Browser log

Not needed

Activity

  1. LukasReschke commented on Mar 22, 2016

    @LukasReschke
    Contributor

    @DeepDiver1975 Guess we need a catch for null in

    $userId = \OC::$server->getUserSession()->getUser()->getUID();

  2. added this to the milestone on Mar 22, 2016
  3. added a commit that references this issue on Mar 23, 2016
    765c64c
  4. added a commit that references this issue on Apr 5, 2016
    19541dd
  5. lock commented on Aug 5, 2019

    @lock

    This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

  6. locked as resolved and limited conversation to collaborators on Aug 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions