-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Accept remote share on notification failed #3455
Comments
This bug seems to occur when a previously remotely unshared remote share is reshared to you |
We at weho.st have the same issue what we have noticed accepting shares gives us similar errors when we try to accept shares. Here are the errors we get: "Argument 3 passed to OC_Helper::buildNotExistingFileNameForView() must be an instance of OC\Files\View, null given, called in /var/www/nextcloud/lib/private/legacy/helper.php on line 323 and defined at /var/www/nextcloud/lib/private/legacy/helper.php#333" Call to a member function file_exists() on null at /var/www/nextcloud/lib/private/legacy/helper.php#346 Comments starting with '#' are deprecated in Unknown on line 1 at Unknown#0 On a test server with identical settings and PHP we do not have this issue or these errors another interesting thing from the server that cannot accept shares it can still share with other servers with no issue. Let me know if i can give any useful information or test anything :) Expected behaviour Remote share should be accepted Actual behaviour Share is not accepted, is still appearing on notification. Server configuration Operating system: Linux 3.13.0 BrandZ virtual linux x86_64 GNU/Linux (Debian Container) Web server: Ngnix Database: mysql 5.6.22 PHP version: 5.6.30-0+deb8u1 [PHP Modules] [Zend Modules] Nextcloud version: 11.0.2 (stable) - 11.0.2 Updated from an older Nextcloud/ownCloud or fresh install: Where did you install Nextcloud from: |
@coderobe i seem to have it with new or unshared/reshared files. |
@schiessle and me both tested this on friday and couldn't reproduce Maybe it's some proxy settings that are not working as expected? |
Indeed possible but the same proxy setup works on one environment and not the other both are configured identicaly.
If you want i can make an account so you can see first hand?
If that would help?
…--
Matthew Frost
On 6 March 2017 at 15:18:45, Joas Schilling ***@***.******@***.***)) wrote:
@schiessle(https://github.com/schiessle) and me both tested this on friday and couldn't reproduce
Maybe it's some proxy settings that are not working as expected?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub(#3455 (comment)), or mute the thread(https://github.com/notifications/unsubscribe-auth/ABpxn9W8Vn7mdaqKt1MjxAVBrOZ0DXNjks5rjBXFgaJpZM4L-HL8).
|
I have the same issue and there is no proxy involved. I dug a bit in the code and found out, that the problem is, that I changed the function buildNotExistingFileName in lib/private/legacy/helper.php as follows:
With this dirty hack I can accept the incoming shares without any problem, so this seems to be a bug and no networking issue. I'm running nextcloud 11.0.2.7 on ubuntu 16.04.2 LTS with PHP 7.0.15 |
Thanks, that works for me too! Server configurationOperating system: Linux owncloud 4.4.0-64-generic #85-Ubuntu SMP Mon Feb 20 11:50:30 UTC 2017 x86_64 Web server: Apache/2.4.18 (Ubuntu) (apache2handler) Database: mysql 5.7.17 PHP version: 7.0.15-0ubuntu0.16.04.4 Nextcloud version: 11.0.2 (stable) - 11.0.2.7 List of activated apps: App list``` Enabled: - activity: 2.4.1 - activitylog: 0.0.1 - admin_audit: 1.1.0 - admin_notifications: 1.0.0 - announcementcenter: 3.0.0 - apporder: 0.3.3 - audioplayer: 1.5.0-beta.4 - bookmarks: 0.9.1 - calendar: 1.5.1 - comments: 1.1.0 - contacts: 1.5.3 - dav: 1.1.1 - external: 1.2 - federatedfilesharing: 1.1.1 - federation: 1.1.1 - files: 1.6.1 - files_accesscontrol: 1.1.2 - files_automatedtagging: 1.1.1 - files_downloadactivity: 1.0.1 - files_external: 1.1.2 - files_markdown: 1.0.1 - files_pdfviewer: 1.0.1 - files_reader: 1.0.0 - files_retention: 1.0.1 - files_sharing: 1.1.1 - files_texteditor: 2.2 - files_trashbin: 1.1.0 - files_versions: 1.4.0 - files_videoplayer: 1.0.0 - firstrunwizard: 2.0 - gallery: 16.0.0 - issuetemplate: 0.2.1 - keeweb: 0.3.0 - logreader: 2.0.0 - lookup_server_connector: 1.0.0 - mail: 0.6.2 - nextcloud_announcements: 1.0 - notes: 2.2.0 - notifications: 1.0.1 - passman: 2.1.1 - password_policy: 1.1.0 - previewgenerator: 1.0.3 - provisioning_api: 1.1.0 - qownnotesapi: 17.3.0 - rainloop: 4.27.0 - serverinfo: 1.1.1 - sharebymail: 1.0.1 - spreed: 1.2.0 - spreedme: 0.3.8 - survey_client: 0.1.5 - systemtags: 1.1.3 - tasks: 0.9.5 - templateeditor: 0.2 - theming: 1.1.1 - twofactor_backupcodes: 1.0.0 - twofactor_totp: 1.1.0 - twofactor_u2f: 1.1.0 - updatenotification: 1.1.1 - weather: 1.3.5 - workflowengine: 1.1.1 |
But now have this 👎 Shared file Test_Dokument FederatedSharing.odt for [email protected]:
|
Same here. anyone got an idea why the renaming? running NC 10.0.2.7 |
Please update to 10.0.4 |
sorry i wrote the wrong version... |
That's why I called it a hack and not a fix. My function does not address the root cause, it's just a workaround to be able to accept shares. The renaming happens on purpose, it's a security measure. Whenever you receive a shared file or folder the server usually checks if a file with the same name already exists and renames the file if necessary. If the timestamp bothers you, you have two options:
or
This will prevent the renaming, however collisions may occur. If so, you can rename the received file/folder manually to resolve the collision. It may be necessary to occ file:scan to retrieve the original files. |
Thanks a lot for your explenation!
Is there any progress on this bug? |
I don't have any more information on this than this ticket itself provides - there is nobody assigned yet, so I guess for now there's not much progress. |
I can confirm this bug here between 2 instances of NC 11.0.2 For both, access and renaming i get following in the log:
|
Same here. So for read only access the hack from @drycoffee works. |
Anyone willing to turn the "workaround" into a PR with descriptive reproduction steps? |
I experienced the same problem yesterday, but for now I'm unable to reproduce it on my test instances. What happened yesterday is:
I'll re-try to reproduce this. |
It also affects files that are shared for the first time.
|
@schiessle did we change something here for NC 11.0.3? |
not on purpose but maybe by accident? |
I'm also affected on 11.0.3, any update here? |
I'm now running NC 12 beta3 on my server, and I'm experiencing the same problem with the specific other server. |
Can you test: $mountPoint = Files::buildNotExistingFileName('/', $share['name']); before add: \OC_Util::setupFS($this->uid); |
@nickvergessen Yes that fixes it for me. 👍 |
Now the question is, why is the filesystem for some already loaded, but not for others. I compared the app list, and I only have lesser apps than you. No additional app. Anyway, can you turn this into a patch for 12 and master please? |
@nickvergessen just checked if it starts working by disabling apps. After disabling the previewgenerator app it started working again without any changes in code. cc @rullzer |
Your fix fixed it for me as well @nickvergessen Did not try to disable the app that @juliushaertl mentioned. |
Steps to reproduce
Error PHP Call to a member function file_exists() on null at /OWNCLOUD-DATA/opt/bitnami/apps/owncloud/htdocs/lib/private/legacy/helper.php#346 2017-02-11T08:45:52+0100
Error PHP Argument 3 passed to OC_Helper::buildNotExistingFileNameForView() must be an instance of OC\Files\View, null given, called in /OWNCLOUD-DATA/opt/bitnami/apps/owncloud/htdocs/lib/private/legacy/helper.php on line 323 and defined at /OWNCLOUD-DATA/opt/bitnami/apps/owncloud/htdocs/lib/private/legacy/helper.php#333
Expected behaviour
Remote share should be accepted
Actual behaviour
Share is not accepted, is still appearing on notification.
Server configuration
Operating system: Linux linux 4.4.0-34-generic #53~14.04.1-Ubuntu SMP Wed Jul 27 16:56:40 UTC 2016 x86_64
Web server: Apache (apache2handler)
Database: mysql 5.6.29
PHP version: 5.6.19
Modules loaded: Core, date, ereg, libxml, openssl, pcre, sqlite3, zlib, bcmath, bz2, calendar, ctype, curl, dom, hash, fileinfo, filter, ftp, gd, gettext, gmp, SPL, iconv, session, intl, json, ldap, mbstring, mcrypt, standard, mysqlnd, mysqli, mysql, PDO, pdo_mysql, pdo_sqlite, Phar, posix, Reflection, imap, SimpleXML, soap, sockets, exif, tidy, tokenizer, xml, xmlreader, xmlrpc, xmlwriter, xsl, zip, apache2handler, redis, Zend OPcache
Nextcloud version: 11.0.1 (stable) - 11.0.1.2
Updated from an older Nextcloud/ownCloud or fresh install:
Where did you install Nextcloud from:
Signing status:
Signing status
List of activated apps:
App list
``` Enabled: - activity: 2.4.1 - admin_audit: 1.1.0 - announcementcenter: 3.0.0 - audioplayer: 1.4.1 - bookmarks: 0.9.1 - calendar: 1.5.0 - comments: 1.1.0 - contacts: 1.5.3 - dav: 1.1.1 - direct_menu: 0.10.0 - federatedfilesharing: 1.1.1 - federation: 1.1.1 - files: 1.6.1 - files_downloadactivity: 1.0.0 - files_external: 1.1.2 - files_pdfviewer: 1.0.1 - files_reader: 0.8.4 - files_sharing: 1.1.1 - files_texteditor: 2.2 - files_trashbin: 1.1.0 - files_versions: 1.4.0 - files_videoplayer: 1.0.0 - firstrunwizard: 2.0 - gallery: 16.0.0 - issuetemplate: 0.2.0 - logreader: 2.0.0 - lookup_server_connector: 1.0.0 - mozilla_sync: 1 - news: 10.1.0 - nextcloud_announcements: 1.0 - notifications: 1.0.1 - ownnote: 1.08 - password_policy: 1.1.0 - previewgenerator: 1.0.1 - provisioning_api: 1.1.0 - rainloop: 4.27 - serverinfo: 1.1.1 - sharebymail: 1.0.1 - survey_client: 0.1.5 - systemtags: 1.1.3 - tasks: 0.9.4 - templateeditor: 0.2 - theming: 1.1.1 - twofactor_backupcodes: 1.0.0 - updatenotification: 1.1.1 - user_ldap: 1.1.1 - workflowengine: 1.1.1Disabled:
{
"instanceid": "oca32fe9a93f",
"trusted_domains": [
"127.0.0.1",
"10.10.20.22",
"cloud.xxxx.de",
"cloud.xxxx24.de"
],
"datadirectory": "/OWNCLOUD-DATA/opt/data",
"tempdirectory": "/OWNCLOUD-DATA/opt/tmp/nextcloud",
"dbtype": "mysql",
"version": "11.0.1.2",
"dbname": "bitnami_owncloud",
"dbhost": "127.0.0.1",
"dbtableprefix": "oc_",
"dbuser": "REMOVED SENSITIVE VALUE",
"dbpassword": "REMOVED SENSITIVE VALUE",
"installed": true,
"log_authfailip": false,
"cron_log": true,
"check_for_working_webdav": false,
"check_for_working_htaccess": false,
"appcodechecker": false,
"updatechecker": true,
"appstoreenabled": true,
"appstore.experimental.enabled": true,
"knowledgebaseenabled": true,
"loglevel": 2,
"asset-pipeline.enabled": false,
"mail_smtpmode": "smtp",
"mail_smtphost": "xxxxxxxx",
"mail_smtpport": "4425",
"mail_from_address": "owncloud",
"mail_domain": "cloud.xxxd.de",
"mail_smtpdebug": false,
"theme": "",
"maintenance": false,
"preview_libreoffice_path": "/usr/bin/libreoffice",
"ldapIgnoreNamingRules": false,
"logtimezone": "Europe/Berlin",
"log_rotate_size": 902400,
"forcessl": false,
"secret": "REMOVED SENSITIVE VALUE",
"xframe_restriction": false,
"allow_user_to_change_display_name": false,
"memcache.local": "\OC\Memcache\Redis",
"filelocking.enabled": "false",
"memcache.distributed": "\OC\Memcache\Redis",
"memcache.locking": "\OC\Memcache\Redis",
"redis": {
"host": "/var/run/redis/redis.sock",
"port": 0,
"timeout": 0,
"dbindex": 0
},
"trashbin_retention_obligation": "auto, 30",
"defaultapp": "files",
"activity_expire_days": 30,
"enable_previews": true,
"lost_password_link": "https://mail.xxxxd.de/ecp/?rfr=owa&p=PersonalSettings/Password.aspx",
"versions_retention_obligation": "auto, 30",
"htaccess.RewriteBase": "/",
"ldapProviderFactory": "\OCA\User_LDAP\LDAPProviderFactory",
"auth.bruteforce.protection.enabled": false,
"token_auth_enforced": false,
"integrity.check.disabled": true
}
The text was updated successfully, but these errors were encountered: