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

Text Files from External Storage (CIFS) Cannot be Opened #6051

Open
JoeMrCoffee opened this issue Jul 15, 2024 · 5 comments
Open

Text Files from External Storage (CIFS) Cannot be Opened #6051

JoeMrCoffee opened this issue Jul 15, 2024 · 5 comments
Labels
0. Needs triage bug Something isn't working

Comments

@JoeMrCoffee
Copy link

JoeMrCoffee commented Jul 15, 2024

Steps to reproduce

Unsure if it is reproducible, should be a data base or bad caching in my instance.

  1. External storage mounted from SAMBA server (Ubuntu 22.04) to Nextcloud 28.0.6
  2. Exsiting Text files where unable to be opened
  3. Delete the share, created a new mount and folder (mount point) - same issue
  4. Photos were fine, Office documents also fine.

Expected behaviour

Tell us what should happen
Files can be opened as normal

Actual behaviour

Tell us what happens instead
The text editior is forever spinning trying to open a file - new or old

Server configuration

Operating system:
Docker Image - Nextcloud 28.0.6 - based on Debian
Web server:
Apache
Database:
MariaDB 10.5
PHP version:
8.2.2
Nextcloud version: (see Nextcloud admin page)
28.0.6
Where did you install Nextcloud from:
Docker Hub

List of activated apps:

If you have access to your command line run e.g.:
sudo -u www-data php occ app:list
from within your Nextcloud installation folder

Nextcloud configuration:

If you have access to your command line run e.g.:
sudo -u www-data php occ config:list system
from within your Nextcloud installation folder

{
    "system": {
        "htaccess.RewriteBase": "\/",
        "memcache.local": "\\OC\\Memcache\\APCu",
        "apps_paths": [
            {
                "path": "\/var\/www\/html\/apps",
                "url": "\/apps",
                "writable": false
            },
            {
                "path": "\/var\/www\/html\/custom_apps",
                "url": "\/custom_apps",
                "writable": true
            }
        ],
        "memcache.distributed": "\\OC\\Memcache\\Redis",
        "memcache.locking": "\\OC\\Memcache\\Redis",
        "redis": {
            "host": "***REMOVED SENSITIVE VALUE***",
            "password": "***REMOVED SENSITIVE VALUE***",
            "port": 6379
        },
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "192.168.122.247:9037",
            "192.168.122.247",
            "localhost",
            "127.0.0.1",
            "192.168.122.218",
            "192.168.122.249",
            "nextcloud"
        ],
        "trusted_proxies": "***REMOVED SENSITIVE VALUE***",
        "overwriteprotocol": "http",
        "overwritecondaddr": "^192\\.168\\.122\\.$",
        "overwrite.cli.url": "http:\/\/nextcloud",
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "dbtype": "mysql",
        "version": "28.0.6.1",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbport": "",
        "dbtableprefix": "oc_",
        "mysql.utf8mb4": true,
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "installed": true,
        "maintenance": false,
        "loglevel": 2,
        "app_install_overwrite": [
            "onlyoffice"
        ]
    }
}



or

Insert your config.php content here
Make sure to remove all sensitive content such as passwords. (e.g. database password, passwordsalt, secret, smtp password, …)

Client configuration

Browser:
Firefox
Operating system:
PopOS 22.04

Logs

Nextcloud log (data/owncloud.log)

{"reqId":"qOHV3VkUZFLNZs4sumL8","level":3,"time":"2024-07-15T08:22:44+00:00","remoteAddr":"192.168.122.1","user":"admin","app":"index","method":"PUT","url":"/apps/text/session/2887/create","message":"Connection lost","userAgent":"Mozilla/5.0 (Windows NT 10.0; rv:109.0) Gecko/20100101 Firefox/115.0","version":"28.0.6.1","exception":{"Exception":"RedisException","Message":"Connection lost","Code":0,"Trace":[{"file":"/var/www/html/lib/private/Memcache/Redis.php","line":208,"function":"evalsha","class":"Redis","type":"->","args":["cf0e94b2e9ffc7e04395cf88f7583fc309985910",["fc349e7d13fc35b9b36ad2189e758cfc/lockfiles/3a3431e00d429ed918b224c0229200f3","1"],1]},{"file":"/var/www/html/lib/private/Memcache/Redis.php","line":181,"function":"evalLua","class":"OC\\Memcache\\Redis","type":"->","args":["cad",["fc349e7d13fc35b9b36ad2189e758cfc/lockfiles/3a3431e00d429ed918b224c0229200f3"],["fc349e7d13fc35b9b36ad2189e758cfc/lockfiles/3a3431e00d429ed918b224c0229200f3","1"]]},{"file":"/var/www/html/lib/private/Lock/MemcacheLockingProvider.php","line":111,"function":"cad","class":"OC\\Memcache\\Redis","type":"->","args":["files/3a3431e00d429ed918b224c0229200f3","1"]},{"file":"/var/www/html/lib/private/Files/Storage/Common.php","line":799,"function":"releaseLock","class":"OC\\Lock\\MemcacheLockingProvider","type":"->","args":["files/3a3431e00d429ed918b224c0229200f3",1]},{"file":"/var/www/html/lib/private/Files/Storage/Wrapper/Wrapper.php","line":627,"function":"releaseLock","class":"OC\\Files\\Storage\\Common","type":"->","args":["test/NewTextFile.md",1,["OC\\Lock\\MemcacheLockingProvider"]]},{"file":"/var/www/html/lib/private/Files/Storage/Wrapper/Wrapper.php","line":627,"function":"releaseLock","class":"OC\\Files\\Storage\\Wrapper\\Wrapper","type":"->","args":["test/NewTextFile.md",1,["OC\\Lock\\MemcacheLockingProvider"]]},{"file":"/var/www/html/lib/private/Files/Storage/Wrapper/Wrapper.php","line":627,"function":"releaseLock","class":"OC\\Files\\Storage\\Wrapper\\Wrapper","type":"->","args":["test/NewTextFile.md",1,["OC\\Lock\\MemcacheLockingProvider"]]},{"file":"/var/www/html/lib/private/Files/View.php","line":2030,"function":"releaseLock","class":"OC\\Files\\Storage\\Wrapper\\Wrapper","type":"->","args":["test/NewTextFile.md",1,["OC\\Lock\\MemcacheLockingProvider"]]},{"file":"/var/www/html/lib/private/Files/View.php","line":2084,"function":"unlockPath","class":"OC\\Files\\View","type":"->","args":["/admin/files/ExternalStorage/test/NewTextFile.md",1,false]},{"file":"/var/www/html/lib/private/Files/View.php","line":1211,"function":"unlockFile","class":"OC\\Files\\View","type":"->","args":["/admin/files/ExternalStorage/test/NewTextFile.md",1]},{"file":"/var/www/html/lib/private/Files/View.php","line":581,"function":"basicOperation","class":"OC\\Files\\View","type":"->","args":["file_get_contents","/admin/files/ExternalStorage/test/NewTextFile.md",["read"]]},{"file":"/var/www/html/lib/private/Files/Node/File.php","line":54,"function":"file_get_contents","class":"OC\\Files\\View","type":"->","args":["/admin/files/ExternalStorage/test/NewTextFile.md"]},{"file":"/var/www/html/apps/text/lib/Service/ApiService.php","line":293,"function":"getContent","class":"OC\\Files\\Node\\File","type":"->","args":[]},{"file":"/var/www/html/apps/text/lib/Service/ApiService.php","line":146,"function":"loadContent","class":"OCA\\Text\\Service\\ApiService","type":"->","args":[["OC\\Files\\Node\\File"]]},{"file":"/var/www/html/apps/text/lib/Controller/SessionController.php","line":62,"function":"create","class":"OCA\\Text\\Service\\ApiService","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/lib/private/AppFramework/Http/Dispatcher.php","line":230,"function":"create","class":"OCA\\Text\\Controller\\SessionController","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/lib/private/AppFramework/Http/Dispatcher.php","line":137,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[["OCA\\Text\\Controller\\SessionController"],"create"]},{"file":"/var/www/html/lib/private/AppFramework/App.php","line":184,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[["OCA\\Text\\Controller\\SessionController"],"create"]},{"file":"/var/www/html/lib/private/Route/Router.php","line":315,"function":"main","class":"OC\\AppFramework\\App","type":"::","args":["OCA\\Text\\Controller\\SessionController","create",["OC\\AppFramework\\DependencyInjection\\DIContainer"],["2887","text.Session.create"]]},{"file":"/var/www/html/lib/base.php","line":1069,"function":"match","class":"OC\\Route\\Router","type":"->","args":["/apps/text/session/2887/create"]},{"file":"/var/www/html/index.php","line":39,"function":"handleRequest","class":"OC","type":"::","args":[]}],"File":"/var/www/html/lib/private/Memcache/Redis.php","Line":208,"message":"Connection lost","exception":{},"CustomMessage":"Connection lost"}}
{"reqId":"qOHV3VkUZFLNZs4sumL8","level":3,"time":"2024-07-15T08:22:44+00:00","remoteAddr":"192.168.122.1","user":"admin","app":"core","method":"PUT","url":"/apps/text/session/2887/create","message":"Exception thrown: RedisException","userAgent":"Mozilla/5.0 (Windows NT 10.0; rv:109.0) Gecko/20100101 Firefox/115.0","version":"28.0.6.1","exception":{"Exception":"RedisException","Message":"Connection lost","Code":0,"Trace":[{"file":"/var/www/html/lib/private/Memcache/Redis.php","line":208,"function":"evalsha","class":"Redis","type":"->","args":["cf0e94b2e9ffc7e04395cf88f7583fc309985910",["fc349e7d13fc35b9b36ad2189e758cfc/lockfiles/3a3431e00d429ed918b224c0229200f3","1"],1]},{"file":"/var/www/html/lib/private/Memcache/Redis.php","line":181,"function":"evalLua","class":"OC\\Memcache\\Redis","type":"->","args":["cad",["fc349e7d13fc35b9b36ad2189e758cfc/lockfiles/3a3431e00d429ed918b224c0229200f3"],["fc349e7d13fc35b9b36ad2189e758cfc/lockfiles/3a3431e00d429ed918b224c0229200f3","1"]]},{"file":"/var/www/html/lib/private/Lock/MemcacheLockingProvider.php","line":111,"function":"cad","class":"OC\\Memcache\\Redis","type":"->","args":["files/3a3431e00d429ed918b224c0229200f3","1"]},{"file":"/var/www/html/lib/private/Files/Storage/Common.php","line":799,"function":"releaseLock","class":"OC\\Lock\\MemcacheLockingProvider","type":"->","args":["files/3a3431e00d429ed918b224c0229200f3",1]},{"file":"/var/www/html/lib/private/Files/Storage/Wrapper/Wrapper.php","line":627,"function":"releaseLock","class":"OC\\Files\\Storage\\Common","type":"->","args":["test/NewTextFile.md",1,["OC\\Lock\\MemcacheLockingProvider"]]},{"file":"/var/www/html/lib/private/Files/Storage/Wrapper/Wrapper.php","line":627,"function":"releaseLock","class":"OC\\Files\\Storage\\Wrapper\\Wrapper","type":"->","args":["test/NewTextFile.md",1,["OC\\Lock\\MemcacheLockingProvider"]]},{"file":"/var/www/html/lib/private/Files/Storage/Wrapper/Wrapper.php","line":627,"function":"releaseLock","class":"OC\\Files\\Storage\\Wrapper\\Wrapper","type":"->","args":["test/NewTextFile.md",1,["OC\\Lock\\MemcacheLockingProvider"]]},{"file":"/var/www/html/lib/private/Files/View.php","line":2030,"function":"releaseLock","class":"OC\\Files\\Storage\\Wrapper\\Wrapper","type":"->","args":["test/NewTextFile.md",1,["OC\\Lock\\MemcacheLockingProvider"]]},{"file":"/var/www/html/lib/private/Files/View.php","line":2084,"function":"unlockPath","class":"OC\\Files\\View","type":"->","args":["/admin/files/ExternalStorage/test/NewTextFile.md",1,false]},{"file":"/var/www/html/lib/private/Files/View.php","line":1211,"function":"unlockFile","class":"OC\\Files\\View","type":"->","args":["/admin/files/ExternalStorage/test/NewTextFile.md",1]},{"file":"/var/www/html/lib/private/Files/View.php","line":581,"function":"basicOperation","class":"OC\\Files\\View","type":"->","args":["file_get_contents","/admin/files/ExternalStorage/test/NewTextFile.md",["read"]]},{"file":"/var/www/html/lib/private/Files/Node/File.php","line":54,"function":"file_get_contents","class":"OC\\Files\\View","type":"->","args":["/admin/files/ExternalStorage/test/NewTextFile.md"]},{"file":"/var/www/html/apps/text/lib/Service/ApiService.php","line":293,"function":"getContent","class":"OC\\Files\\Node\\File","type":"->","args":[]},{"file":"/var/www/html/apps/text/lib/Service/ApiService.php","line":146,"function":"loadContent","class":"OCA\\Text\\Service\\ApiService","type":"->","args":[["OC\\Files\\Node\\File"]]},{"file":"/var/www/html/apps/text/lib/Controller/SessionController.php","line":62,"function":"create","class":"OCA\\Text\\Service\\ApiService","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/lib/private/AppFramework/Http/Dispatcher.php","line":230,"function":"create","class":"OCA\\Text\\Controller\\SessionController","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/lib/private/AppFramework/Http/Dispatcher.php","line":137,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[["OCA\\Text\\Controller\\SessionController"],"create"]},{"file":"/var/www/html/lib/private/AppFramework/App.php","line":184,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[["OCA\\Text\\Controller\\SessionController"],"create"]},{"file":"/var/www/html/lib/private/Route/Router.php","line":315,"function":"main","class":"OC\\AppFramework\\App","type":"::","args":["OCA\\Text\\Controller\\SessionController","create",["OC\\AppFramework\\DependencyInjection\\DIContainer"],["2887","text.Session.create"]]},{"file":"/var/www/html/lib/base.php","line":1069,"function":"match","class":"OC\\Route\\Router","type":"->","args":["/apps/text/session/2887/create"]},{"file":"/var/www/html/index.php","line":39,"function":"handleRequest","class":"OC","type":"::","args":[]}],"File":"/var/www/html/lib/private/Memcache/Redis.php","Line":208,"CustomMessage":"Exception thrown: RedisException"}}
{"reqId":"qOHV3VkUZFLNZs4sumL8","level":3,"time":"2024-07-15T08:22:44+00:00","remoteAddr":"192.168.122.1","user":"admin","app":"core","method":"PUT","url":"/apps/text/session/2887/create","message":"Exception thrown: RedisException","userAgent":"Mozilla/5.0 (Windows NT 10.0; rv:109.0) Gecko/20100101 Firefox/115.0","version":"28.0.6.1","exception":{"Exception":"RedisException","Message":"Redis server redis:6379 went away","Code":0,"Trace":[{"file":"/var/www/html/lib/private/Memcache/Redis.php","line":76,"function":"get","class":"Redis","type":"->","args":["fc349e7d13fc35b9b36ad2189e758cfc/imagePath-57192f097e642d9d765c21d823681061-core-favicon.ico"]},{"file":"/var/www/html/lib/private/URLGenerator.php","line":203,"function":"get","class":"OC\\Memcache\\Redis","type":"->","args":["core-favicon.ico"]},{"file":"/var/www/html/lib/private/legacy/template/functions.php","line":249,"function":"imagePath","class":"OC\\URLGenerator","type":"->","args":["core","favicon.ico"]},{"file":"/var/www/html/core/templates/layout.guest.php","line":20,"function":"image_path","args":["core","favicon.ico"]},{"file":"/var/www/html/lib/private/Template/Base.php","line":180,"args":["/var/www/html/core/templates/layout.guest.php"],"function":"include"},{"file":"/var/www/html/lib/private/Template/Base.php","line":150,"function":"load","class":"OC\\Template\\Base","type":"->","args":["/var/www/html/core/templates/layout.guest.php",null]},{"file":"/var/www/html/lib/private/legacy/OC_Template.php","line":139,"function":"fetchPage","class":"OC\\Template\\Base","type":"->","args":[null]},{"file":"/var/www/html/lib/private/legacy/OC_Template.php","line":170,"function":"fetchPage","class":"OC_Template","type":"->","args":[null]},{"file":"/var/www/html/lib/private/Template/Base.php","line":132,"function":"fetchPage","class":"OC_Template","type":"->","args":[]},{"file":"/var/www/html/lib/private/legacy/OC_Template.php","line":291,"function":"printPage","class":"OC\\Template\\Base","type":"->","args":[]},{"file":"/var/www/html/index.php","line":104,"function":"printExceptionErrorPage","class":"OC_Template","type":"::","args":[["RedisException"],500]}],"File":"/var/www/html/lib/private/Memcache/Redis.php","Line":76,"CustomMessage":"Exception thrown: RedisException"}}

image

  • Note the Redis issue should stem from me restarting the Redis container to try and fix the issue *

Browser log

Screenshot from 2024-07-15 15-46-45

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

a) The javascript console log
b) The network log
c) ...

@juliusknorr juliusknorr transferred this issue from nextcloud/files_texteditor Jul 15, 2024
@juliusknorr
Copy link
Member

Can you try to reproduce it with the redis restarted and share the log messages that happen only while creating a new file? The errors still look like file creating failed due to unavailable redis.

@JoeMrCoffee
Copy link
Author

JoeMrCoffee commented Jul 15, 2024 via email

@juliusknorr
Copy link
Member

Yes, the Nextcloud logs, but only the messages that are freshly occurring during the creation and opening of such a file.

Another thing to check would be if you can just upload markdown files to the external share and then open them with text?

@JoeMrCoffee
Copy link
Author

I am not seeing any logs when I try to open the application.

Interesting is if I manually add text to the file via the Samba server (nano file.txt) then the Text app tries to resolve the conflict and after choosing the new version, the file is editable and can be opened.

Seems to only apply to blank text files.

@jl1317
Copy link

jl1317 commented Jul 17, 2024

Same problem here, Nextloud 29.
Blank text files created over CIFS/SMB External Storage not opening.

Keeps loading for about 5 minutes
screenshot1

And then gives a failure screen without data
screenshot2

If I choose one of the templates (readme, meeting, etc) the file opens fine.

Thanx in advance

@joshtrichards joshtrichards added bug Something isn't working 0. Needs triage labels Aug 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0. Needs triage bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants