nextcloud / nextcloud/fulltextsearch

NC 20.04 upload problem from external link: Call to a member function getUID() on null

Open
#598 5 comments 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
PHP
Stars
234
Forks
64
Avg merge
6h 18m
Merged PRs (30d)
10

Description

How to use GitHub
  • Please use the 👍 reaction to show that you are affected by the same issue.
  • Please don't comment if you have no relevant information to add. It's just extra noise for everyone subscribed to this issue.
  • Subscribe to receive notifications on status change and new comments.
Steps to reproduce
  1. Create new share from link with external guest, with write permission
  2. External Guest upload a file
  3. External Guest receive error and don't show the uploaded file
  4. If external guest refresh the page, the file appears
Server configuration

Operating system: # uname -a
Linux n1 4.9.0-12-amd64 1 SMP Debian 4.9.210-1 (2020-01-20) x86_64 GNU/Linux

Web server: # apache2 -v
Server version: Apache/2.4.25 (Debian)

Database: # mysql --version
mysql Ver 15.1 Distrib 10.1.47-MariaDB, for debian-linux-gnu (x86_64) using readline 5.2

PHP version: Versione: 7.3.25

Nextcloud version: 20.04

Updated from an older Nextcloud/ownCloud or fresh install: update every time from 18

List of activated apps:
Enabled:

  • accessibility: 1.5.0
  • activity: 2.12.1
  • apporder: 0.11.0
  • bruteforcesettings: 2.0.1
  • calendar: 2.0.4
  • camerarawpreviews: 0.7.10
  • checksum: 0.4.5
  • cloud_federation_api: 1.2.0
  • comments: 1.9.0
  • contacts: 3.4.2
  • contactsinteraction: 1.0.0
  • dav: 1.15.0
  • drawio: 0.9.8
  • external: 3.6.0
  • federatedfilesharing: 1.9.0
  • federation: 1.9.0
  • files: 1.14.0
  • files_antivirus: 3.1.0
  • files_fulltextsearch: 1.4.3
  • files_fulltextsearch_tesseract: 1.4.2
  • files_linkeditor: 1.1.3
  • files_mindmap: 0.0.23
  • files_pdfviewer: 1.8.0
  • files_rightclick: 0.16.0
  • files_sharing: 1.11.0
  • files_trackdownloads: 1.8.0
  • files_trashbin: 1.9.0
  • files_versions: 1.12.0
  • files_videoplayer: 1.8.0
  • fulltextsearch: 1.4.2
  • fulltextsearch_elasticsearch: 1.5.2
  • gpxedit: 0.0.13
  • gpxmotion: 0.0.11
  • gpxpod: 4.2.2
  • impersonate: 1.6.1
  • logreader: 2.4.0
  • lookup_server_connector: 1.7.0
  • nextcloud_announcements: 1.8.0
  • notifications: 2.7.0
  • oauth2: 1.7.0
  • occweb: 0.0.7
  • onlyoffice: 6.2.0
  • password_policy: 1.9.1
  • passwords: 2020.12.0
  • phonetrack: 0.6.4
  • photos: 1.1.0
  • privacy: 1.3.0
  • provisioning_api: 1.9.0
  • rainloop: 7.0.3
  • ransomware_protection: 1.7.0
  • recommendations: 0.7.0
  • serverinfo: 1.9.0
  • settings: 1.1.0
  • sharebymail: 1.9.0
  • spreed: 9.0.6
  • support: 1.2.1
  • survey_client: 1.7.0
  • systemtags: 1.9.0
  • tasks: 0.13.6
  • terms_of_service: 1.5.2
  • text: 3.0.1
  • theming: 1.10.0
  • twofactor_backupcodes: 1.8.0
  • twofactor_nextcloud_notification: 2.3.0
  • twofactor_totp: 5.0.0
  • twofactor_u2f: 6.0.0
  • updatenotification: 1.9.0
  • user_usage_report: 1.3.3
  • viewer: 1.3.0
  • workflowengine: 2.1.0
Client configuration

Browser: any browser

Logs

Fatal | webdav | Error: Call to a member function getUID() on null/var/www/html/n1/lib/private/EventDispatcher/ServiceEventListener.php - line 76:OCA\Files_FullTextSearch\Listeners\FileCreated->handle(OCP\Files\Ev ... {})/var/www/html/n1/3rdparty/symfony/event-dispatcher/EventDispatcher.php - line 251:OC\EventDispatcher\ServiceEventListener->__invoke(OCP\Files\Ev ... {}, "OCP\Files\ ... t", Symfony\Comp ... {})/var/www/html/n1/3rdparty/symfony/event-dispatcher/EventDispatcher.php - line 73:Symfony\Component\EventDispatcher\EventDispatcher->callListeners([ Closure {}], "OCP\Files\ ... t", OCP\Files\Ev ... {})/var/www/html/n1/lib/private/EventDispatcher/EventDispatcher.php - line 86:Symfony\Component\EventDispatcher\EventDispatcher->dispatch(OCP\Files\Ev ... {}, "OCP\Files\ ... t")/var/www/html/n1/lib/private/EventDispatcher/EventDispatcher.php - line 98:OC\EventDispatcher\EventDispatcher->dispatch("OCP\Files\ ... t", OCP\Files\Ev ... {})/var/www/html/n1/lib/private/Files/Node/HookConnector.php - line 137:OC\EventDispatcher\EventDispatcher->dispatchTyped(OCP\Files\Ev ... {})/var/www/html/n1/lib/private/legacy/OC_Hook.php - line 110:OC\Files\Node\HookConnector->postCreate({ path: "/Sh ... "})/var/www/html/n1/apps/dav/lib/Connector/Sabre/File.php - line 407:OC_Hook::emit("OC_Filesystem", "post_create", { path: "/Sh ... "})/var/www/html/n1/apps/dav/lib/Connector/Sabre/File.php - line 340:OCA\DAV\Connector\Sabre\File->emitPostHooks(false)/var/www/html/n1/apps/dav/lib/Connector/Sabre/Directory.php - line 155:OCA\DAV\Connector\Sabre\File->put(null)/var/www/html/n1/3rdparty/sabre/dav/lib/DAV/Server.php - line 1104:OCA\DAV\Connector\Sabre\Directory->createFile("sito4.png", null)/var/www/html/n1/3rdparty/sabre/dav/lib/DAV/CorePlugin.php - line 527:Sabre\DAV\Server->createFile("sito4.png", null, null)/var/www/html/n1/3rdparty/sabre/event/lib/WildcardEmitterTrait.php - line 89:Sabre\DAV\CorePlugin->httpPut(Sabre\HTTP\Request {}, Sabre\HTTP\Response {})/var/www/html/n1/3rdparty/sabre/dav/lib/DAV/Server.php - line 474:Sabre\DAV\Server->emit("method:PUT", [ Sabre\HTTP ... }])/var/www/html/n1/3rdparty/sabre/dav/lib/DAV/Server.php - line 251:Sabre\DAV\Server->invokeMethod(Sabre\HTTP\Request {}, Sabre\HTTP\Response {})/var/www/html/n1/3rdparty/sabre/dav/lib/DAV/Server.php - line 319:Sabre\DAV\Server->start()/var/www/html/n1/apps/dav/appinfo/v1/publicwebdav.php - line 113:Sabre\DAV\Server->exec()/var/www/html/n1/public.php - line 81:require_once("/var/www/ht ... p")


Info:

  • occ files:scan --all /var/www/html/n1/ -> don't solve the problem
  • i know the issue https://github.com/nextcloud/server/issues/19996 nextcloud/server#19996 but it is close and i think this is another problem, not the same. I have search but i don't have see this problem with solution.

ncbug1

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with apps/files_fulltextsearch/Listeners/FileCreated.php and the ServiceEventListener.php stack-trace location, then trace the DAV upload path through apps/dav/lib/Connector/Sabre/File.php. Reproduce an external guest upload to a write-enabled link and verify that it completes without the getUID() fatal and the file appears immediately.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
search
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.