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

Call to a member function getUID() on null #6706

Closed
tempuser779 opened this issue Sep 30, 2017 · 5 comments
Closed

Call to a member function getUID() on null #6706

tempuser779 opened this issue Sep 30, 2017 · 5 comments

Comments

@tempuser779
Copy link

Steps to reproduce

  1. took fresh vbox ubuntu server 16.04.3 installation, then nextcloud 12.0.3 from .zip installed as described in admin docs, after that docker with collabora pulled and ran in here. nextcloud is accessible through nginx reverse proxy on another machine, the same is collabora, as we do not have necessary certificates on them - all letsencrypt certs are on nginx proxy. everything works fine through the internet.
  2. we have another similar vbox container with nextcloud 12.0.3 in it. I share a folder from this container to the first container. Get php-notification about a share in the first container, accept it. It's ok, I can see shared folders and files.
  3. Trying to open any local file via collabora in the first container - it works. Trying to open any shared file in the first container via collabora and get "internal server error" and all other stuff.
  4. I spent much time on this already. Seems that I should know php for further digging, as the problem is in generating tokens, but I am not a php-man unfortunately.
  5. used browser - Firefox 55.0.2 (64-bit)

Expected behaviour

A shared file should become editable via collabora

Actual behaviour

Instead this I get these mistakes (some in russian, but probably there s no difference for understanding):

Внутренняя ошибка сервера ## (internal server error contact adminstrator and all other typical)
Запрос не выполнен, на сервере произошла ошибка.
Пожалуйста, свяжитесь с администратором сервера если эта ошибка будет повторяться. Прикрепите указанную ниже информацию к своему сообщению.
Подробную информацию можно найти в журнале сервера.

Технические подробности
Удаленный адрес: 172.16.17.200
ID Запроса: xhGEOYBu8qeNFI2mC1p4
Тип: Error
Код: 0
Сообщение: Call to a member function getUID() on null
Файл: /var/www/nextcloud/apps/richdocuments/lib/TokenManager.php
Строка: 108

Трассировка
#0 /var/www/nextcloud/apps/richdocuments/lib/Controller/DocumentController.php(168): OCA\Richdocuments\TokenManager->getToken('4448')
#1 [internal function]: OCA\Richdocuments\Controller\DocumentController->index('4448')
#2 /var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php(160): call_user_func_array(Array, Array)
#3 /var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php(90): OC\AppFramework\Http\Dispatcher->executeController(Object(OCA\Richdocuments\Controller\DocumentController), 'index')
#4 /var/www/nextcloud/lib/private/AppFramework/App.php(114): OC\AppFramework\Http\Dispatcher->dispatch(Object(OCA\Richdocuments\Controller\DocumentController), 'index')
#5 /var/www/nextcloud/lib/private/AppFramework/Routing/RouteActionHandler.php(47): OC\AppFramework\App::main('OCA\Richdocumen...', 'index', Object(OC\AppFramework\DependencyInjection\DIContainer), Array)
#6 [internal function]: OC\AppFramework\Routing\RouteActionHandler->__invoke(Array)
#7 /var/www/nextcloud/lib/private/Route/Router.php(299): call_user_func(Object(OC\AppFramework\Routing\RouteActionHandler), Array)
#8 /var/www/nextcloud/lib/base.php(1004): OC\Route\Router->match('/apps/richdocum...')
#9 /var/www/nextcloud/index.php(48): OC::handleRequest()
#10 {main}

General server configuration

Operating system: Linux fse 4.4.0-96-generic #119-Ubuntu SMP Tue Sep 12 14:59:54 UTC 2017 x86_64

Web server: Apache/2.4.18 (Ubuntu) (apache2handler)

Database: mysql 5.7.19

PHP version: 7.0.22-0ubuntu0.16.04.1

PHP-modules loaded
 - Core
 - date
 - libxml
 - openssl
 - pcre
 - zlib
 - filter
 - hash
 - Reflection
 - SPL
 - session
 - standard
 - apache2handler
 - mysqlnd
 - PDO
 - xml
 - bz2
 - calendar
 - ctype
 - curl
 - dom
 - mbstring
 - fileinfo
 - ftp
 - gd
 - gettext
 - iconv
 - igbinary
 - imagick
 - intl
 - json
 - exif
 - mcrypt
 - mysqli
 - pdo_mysql
 - Phar
 - posix
 - readline
 - redis
 - shmop
 - SimpleXML
 - sockets
 - sysvmsg
 - sysvsem
 - sysvshm
 - tokenizer
 - wddx
 - xmlreader
 - xmlwriter
 - xsl
 - zip
 - Zend OPcache

Nextcloud configuration

Nextcloud version: 12.0.3 - 12.0.3.3

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

Where did you install Nextcloud from: from https://download.nextcloud.com/server/releases/nextcloud-12.0.3.zi*

Are you using external storage, if yes which one: files_external is disabled

Are you using encryption: no

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

Signing status
[]
Enabled apps
 - activity: 2.5.2
 - bruteforcesettings: 1.0.2
 - calendar: 1.5.5
 - comments: 1.2.0
 - dav: 1.3.0
 - federatedfilesharing: 1.2.0
 - federation: 1.2.0
 - files: 1.7.2
 - files_clipboard: 0.6.4
 - files_downloadactivity: 1.1.1
 - files_pdfviewer: 1.1.1
 - files_sharing: 1.4.0
 - files_texteditor: 2.4.1
 - files_trashbin: 1.2.0
 - files_versions: 1.5.0
 - files_videoplayer: 1.1.0
 - firstrunwizard: 2.1
 - gallery: 17.0.0
 - issuetemplate: 0.2.2
 - logreader: 2.0.0
 - lookup_server_connector: 1.0.0
 - nextcloud_announcements: 1.1
 - notifications: 2.0.0
 - oauth2: 1.0.5
 - password_policy: 1.2.2
 - provisioning_api: 1.2.0
 - rainloop: 5.0.2
 - ransomware_protection: 1.0.4
 - richdocuments: 1.12.35
 - serverinfo: 1.2.0
 - sharebymail: 1.2.0
 - spreed: 2.0.1
 - survey_client: 1.0.0
 - systemtags: 1.2.0
 - tasks: 0.9.5
 - theming: 1.3.0
 - twofactor_backupcodes: 1.1.1
 - updatenotification: 1.2.0
 - workflowengine: 1.2.0
Disabled apps
 - admin_audit
 - encryption
 - files_external
 - user_external
 - user_ldap
Content of config/config.php
{
    "instanceid": "ocajrqexy0qn",
    "passwordsalt": "***REMOVED SENSITIVE VALUE***",
    "secret": "***REMOVED SENSITIVE VALUE***",
    "trusted_domains": [
        "contractors.catenalex.ru"
    ],
    "datadirectory": "\/var\/www\/nextcloud\/data",
    "overwrite.cli.url": "http:\/\/contractors.catenalex.ru",
    "dbtype": "mysql",
    "version": "12.0.3.3",
    "dbname": "fsencdb",
    "dbhost": "localhost:3306",
    "dbport": "",
    "dbtableprefix": "oc_",
    "mysql.utf8mb4": true,
    "dbuser": "***REMOVED SENSITIVE VALUE***",
    "dbpassword": "***REMOVED SENSITIVE VALUE***",
    "installed": true,
    "memcache.local": "\\OC\\Memcache\\Redis",
    "redis": {
        "host": "localhost",
        "port": 6379
    },
    "memcache.locking": "\\OC\\Memcache\\Redis",
    "mail_smtpmode": "smtp",
    "mail_smtpauthtype": "PLAIN",
    "mail_smtpsecure": "tls",
    "mail_from_address": "assistant",
    "mail_domain": "catenalex.ru",
    "mail_smtpauth": 1,
    "mail_smtphost": "mx.catenalex.ru",
    "mail_smtpport": "587",
    "mail_smtpname": "***REMOVED SENSITIVE VALUE***",
    "mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
    "debug": true,
    "maintenance": false
}

Client configuration

Browser: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:55.0) Gecko/20100101 Firefox/55.0

Operating system: YOUR ANSWER HERE

Logs

Web server error log
Insert your webserver log here
Nextcloud log (data/nextcloud.log)
Insert your Nextcloud log here
Browser log
Insert your browser log here, this could for example include:

a) The javascript console log
b) The network log
c) ...
@tempuser779
Copy link
Author

other logs:
apache2:
172.16.17.200 - - [30/Sep/2017:16:37:09 +0300] "GET /index.php HTTP/1.0" 302 1065 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.91 Safari/537.36 OPR/48.0.2685.32"
172.16.17.200 - - [30/Sep/2017:16:37:10 +0300] "GET /index.php/apps/files/ HTTP/1.0" 200 7995 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.91 Safari/537.36 OPR/48.0.2685.32"
172.16.17.200 - - [30/Sep/2017:16:37:10 +0300] "GET /index.php/core/js/oc.js?v=83b9812a02dabd2b8acedfb8f6b3825e HTTP/1.0" 200 4872 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.91 Safari/537.36 OPR/48.0.2685.32"
172.16.17.200 - - [30/Sep/2017:16:37:10 +0300] "GET /ocs/v2.php/apps/notifications/api/v2/notifications HTTP/1.0" 200 863 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.91 Safari/537.36 OPR/48.0.2685.32"
172.16.17.200 - - [30/Sep/2017:16:37:10 +0300] "GET /index.php/apps/richdocuments/ajax/settings.php HTTP/1.0" 200 1034 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.91 Safari/537.36 OPR/48.0.2685.32"
172.16.17.200 - - [30/Sep/2017:16:37:10 +0300] "GET /index.php/apps/gallery/config?extramediatypes=1 HTTP/1.0" 200 1046 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.91 Safari/537.36 OPR/48.0.2685.32"
172.16.17.200 - - [30/Sep/2017:16:37:10 +0300] "PROPFIND /remote.php/webdav/ HTTP/1.0" 207 5588 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.91 Safari/537.36 OPR/48.0.2685.32"
172.16.17.200 - - [30/Sep/2017:16:37:10 +0300] "GET /index.php/apps/files/ajax/getstoragestats.php?dir=%2F HTTP/1.0" 200 1341 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.91 Safari/537.36 OPR/48.0.2685.32"
172.16.17.200 - - [30/Sep/2017:16:37:10 +0300] "GET /index.php/apps/systemtags/lastused HTTP/1.0" 200 944 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.91 Safari/537.36 OPR/48.0.2685.32"
172.16.17.200 - - [30/Sep/2017:16:37:11 +0300] "PROPFIND /remote.php/webdav/2.%20%D0%94%D0%B5%D0%BB%D0%B0%20%D0%B2%20%D1%80%D0%B0%D0%B1%D0%BE%D1%82%D0%B5 HTTP/1.0" 207 2773 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.91 Safari/537.36 OPR/48.0.2685.32"
172.16.17.200 - - [30/Sep/2017:16:37:12 +0300] "GET /index.php/apps/files/ajax/getstoragestats.php?dir=%2F2.%20%D0%94%D0%B5%D0%BB%D0%B0%20%D0%B2%20%D1%80%D0%B0%D0%B1%D0%BE%D1%82%D0%B5 HTTP/1.0" 200 1321 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.91 Safari/537.36 OPR/48.0.2685.32"
172.16.17.200 - - [30/Sep/2017:16:37:12 +0300] "PROPFIND /remote.php/webdav/2.%20%D0%94%D0%B5%D0%BB%D0%B0%20%D0%B2%20%D1%80%D0%B0%D0%B1%D0%BE%D1%82%D0%B5/%D0%90%D1%85%D0%BC%D0%B5%D0%B4%D0%BE%D0%B2%20%D0%A0.%20-%20%D0%B1%D0%B0%D0%BD%D0%BA%D1%80%D0%BE%D1%82%D1%81%D1%82%D0%B2%D0%BE%20%D0%A4%D0%9B HTTP/1.0" 207 24924 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.91 Safari/537.36 OPR/48.0.2685.32"
172.16.17.200 - - [30/Sep/2017:16:37:12 +0300] "GET /index.php/apps/files/ajax/getstoragestats.php?dir=%2F2.%20%D0%94%D0%B5%D0%BB%D0%B0%20%D0%B2%20%D1%80%D0%B0%D0%B1%D0%BE%D1%82%D0%B5%2F%D0%90%D1%85%D0%BC%D0%B5%D0%B4%D0%BE%D0%B2%20%D0%A0.%20-%20%D0%B1%D0%B0%D0%BD%D0%BA%D1%80%D0%BE%D1%82%D1%81%D1%82%D0%B2%D0%BE%20%D0%A4%D0%9B HTTP/1.0" 200 1321 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.91 Safari/537.36 OPR/48.0.2685.32"
172.16.17.200 - - [30/Sep/2017:16:37:14 +0300] "PROPFIND /remote.php/webdav/2.%20%D0%94%D0%B5%D0%BB%D0%B0%20%D0%B2%20%D1%80%D0%B0%D0%B1%D0%BE%D1%82%D0%B5/%D0%90%D1%85%D0%BC%D0%B5%D0%B4%D0%BE%D0%B2%20%D0%A0.%20-%20%D0%B1%D0%B0%D0%BD%D0%BA%D1%80%D0%BE%D1%82%D1%81%D1%82%D0%B2%D0%BE%20%D0%A4%D0%9B/%D0%BC%D0%B5%D1%82%D0%BE%D0%B4%D0%B8%D0%BA%D0%B0%20%D0%B8%D1%81%D0%BF%20%D1%80%D0%BE%D0%B7%D1%8B%D1%81%D0%BA%D0%B0 HTTP/1.0" 207 4216 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.91 Safari/537.36 OPR/48.0.2685.32"
172.16.17.200 - - [30/Sep/2017:16:37:14 +0300] "GET /index.php/apps/files/ajax/getstoragestats.php?dir=%2F2.%20%D0%94%D0%B5%D0%BB%D0%B0%20%D0%B2%20%D1%80%D0%B0%D0%B1%D0%BE%D1%82%D0%B5%2F%D0%90%D1%85%D0%BC%D0%B5%D0%B4%D0%BE%D0%B2%20%D0%A0.%20-%20%D0%B1%D0%B0%D0%BD%D0%BA%D1%80%D0%BE%D1%82%D1%81%D1%82%D0%B2%D0%BE%20%D0%A4%D0%9B%2F%D0%BC%D0%B5%D1%82%D0%BE%D0%B4%D0%B8%D0%BA%D0%B0%20%D0%B8%D1%81%D0%BF%20%D1%80%D0%BE%D0%B7%D1%8B%D1%81%D0%BA%D0%B0 HTTP/1.0" 200 1321 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.91 Safari/537.36 OPR/48.0.2685.32"
172.16.17.200 - - [30/Sep/2017:16:37:15 +0300] "GET /index.php/apps/richdocuments/index?fileId=4447&requesttoken=fRO0oCQi3%2Fxzxwd6ayQImnx%2FoAfZv6FofjfVbCkjTnY%3D%3ALlXt9XBDvI8Fql9IBUpO0zMZ81S4iOouT0SzXEcVCBw%3D HTTP/1.0" 500 17022 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.91 Safari/537.36 OPR/48.0.2685.32"
172.16.17.200 - - [30/Sep/2017:16:37:15 +0300] "GET /index.php/apps/richdocuments/undefined/img/notifications.svg HTTP/1.0" 302 1065 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.91 Safari/537.36 OPR/48.0.2685.32"
172.16.17.200 - - [30/Sep/2017:16:37:15 +0300] "GET /ocs/v2.php/apps/notifications/api/v2/notifications HTTP/1.0" 200 863 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.91 Safari/537.36 OPR/48.0.2685.32"
172.16.17.200 - - [30/Sep/2017:16:37:15 +0300] "GET /index.php/apps/files/ HTTP/1.0" 200 8004 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.91 Safari/537.36 OPR/48.0.2685.32"

data/nextcloud.log:
{"reqId":"dmCV71sOmXwMF8032gFJ","level":3,"time":"2017-09-30T13:37:15+00:00","remoteAddr":"172.16.17.200","user":"vkuznetsov@catenalex.ru","app":"index","method":"GET","url":"/index.php/apps/richdocuments/index?fileId=4447&requesttoken=fRO0oCQi3%2Fxzxwd6ayQImnx%2FoAfZv6FofjfVbCkjTnY%3D%3ALlXt9XBDvI8Fql9IBUpO0zMZ81S4iOouT0SzXEcVCBw%3D","message":"Exception: {"Exception":"Error","Message":"Call to a member function getUID() on null","Code":0,"Trace":"#0 \/var\/www\/nextcloud\/apps\/richdocuments\/lib\/Controller\/DocumentController.php(168): OCA\\Richdocuments\\TokenManager->getToken(*** sensitive parameters replaced ***)\n#1 [internal function]: OCA\\Richdocuments\\Controller\\DocumentController->index('4447')\n#2 \/var\/www\/nextcloud\/lib\/private\/AppFramework\/Http\/Dispatcher.php(160): call_user_func_array(Array, Array)\n#3 \/var\/www\/nextcloud\/lib\/private\/AppFramework\/Http\/Dispatcher.php(90): OC\\AppFramework\\Http\\Dispatcher->executeController(Object(OCA\\Richdocuments\\Controller\\DocumentController), 'index')\n#4 \/var\/www\/nextcloud\/lib\/private\/AppFramework\/App.php(114): OC\\AppFramework\\Http\\Dispatcher->dispatch(Object(OCA\\Richdocuments\\Controller\\DocumentController), 'index')\n#5 \/var\/www\/nextcloud\/lib\/private\/AppFramework\/Routing\/RouteActionHandler.php(47): OC\\AppFramework\\App::main('OCA\\\\Richdocumen...', 'index', Object(OC\\AppFramework\\DependencyInjection\\DIContainer), Array)\n#6 [internal function]: OC\\AppFramework\\Routing\\RouteActionHandler->__invoke(Array)\n#7 \/var\/www\/nextcloud\/lib\/private\/Route\/Router.php(299): call_user_func(Object(OC\\AppFramework\\Routing\\RouteActionHandler), Array)\n#8 \/var\/www\/nextcloud\/lib\/base.php(1004): OC\\Route\\Router->match('\/apps\/richdocum...')\n#9 \/var\/www\/nextcloud\/index.php(48): OC::handleRequest()\n#10 {main}","File":"\/var\/www\/nextcloud\/apps\/richdocuments\/lib\/TokenManager.php","Line":108}","userAgent":"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.91 Safari/537.36 OPR/48.0.2685.32","version":"12.0.3.3"}

@tempuser779
Copy link
Author

browser log is really huge, I dont know what exactly is needed

@tempuser779
Copy link
Author

that's from web-console (maybe it's helpful):

      Content Security Policy: Directive ‘frame-src’ has been deprecated. Please use directive ‘child-src’ instead. (unknown)

JQMIGRATE: Migrate is installed, version 1.4.0 jquery-migrate.min.js:2:542
Use of Mutation Events is deprecated. Use MutationObserver instead. jquery.min.js:3:3704
JQMIGRATE: Migrate is installed, version 1.4.0 jquery-migrate.min.js:2:542
ReferenceError: oc_appconfig is not defined[Learn More] shareconfigmodel.js:24:4
https://contractors.catenalex.ru/core/js/shareconfigmodel.js:24:4
https://contractors.catenalex.ru/core/js/shareconfigmodel.js:13:2
TypeError: link is undefined[Learn More] js.js:201:1
filePath https://contractors.catenalex.ru/core/js/js.js:201:1
https://contractors.catenalex.ru/apps/files_videoplayer/js/viewer.js:15:139

@tempuser779
Copy link
Author

yes, and it might be important that when I reshare that shared folder inside the first container collabora opens it normally

@nickvergessen
Copy link
Member

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