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

No text edition/display, nor Readme.md content. Error 500 on PUT /apps/text/session/create #3637

Closed
itcihef opened this issue Jan 4, 2023 · 8 comments
Labels
bug Something isn't working needs info

Comments

@itcihef
Copy link

itcihef commented Jan 4, 2023

Describe the bug

  • TXT and MD files can't be opened or displayed, I only get an empty screen.

  • Readme.md is not shown in folder view, there's just a hypno wheel.

I upgraded Nextcloud from 2.2.10 (when it worked) to 23.0.12 then to 24.0.8. Nothing went wrong during upgrades. Apache conf wasn’t modified in the process. I didn’t check if it worked at version 23.0.12.

See apache log.

Don't have a clue what might have caused this. No chance to delete/reinstall this app because it's part of NC core and delivered with the core. Already tried disable/enable the app, didn't help.

To Reproduce
Steps to reproduce the behavior:

  1. Go to any folder
  2. Click on any .md oder .txt file

Expected behavior

  • Open and edit .txt/.md files
  • See the Readme.md content on top of every folder page.

Client details:

  • OS: [e.g. iOS]
  • Browser: [e.g. chrome, safari]
  • Version: [e.g. 22]
  • Device: [e.g. iPhone6, desktop]
Server details

Text app version:
3.5.1

Operating system: (uname -a)
Linux 5.10.0-19-amd64 #1 SMP Debian 5.10.149-2 (2022-10-21) x86_64 GNU/Linux

Web server:
Apache/2.4.54 (Debian)

Database:
10.5.18-MariaDB-0+deb11u1 Debian 11

PHP version:
PHP 7.4.33 (cli) (built: Nov 8 2022 11:36:34) ( NTS )

Nextcloud version:
24.0.8.2

Logs

Nextcloud log (data/nextcloud.log)

{
  "reqId": "Gmbz6NnoFwcPEhYDNvmC",
  "level": 3,
  "time": "2023-01-04T09:42:53+00:00",
  "remoteAddr": "my.public.ip.address",
  "user": "…-…-…-…-…",
  "app": "text",
  "method": "PUT",
  "url": "/apps/text/session/create",
  "message": "Could not create path",
  "userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:108.0) Gecko/20100101 Firefox/108.0",
  "version": "24.0.8.2",
  "exception": {
    "Exception": "OCP\\Files\\NotPermittedException",
    "Message": "Could not create path",
    "Code": 0,
    "Trace": [
      {
        "file": "/var/www/nextcloud/lib/private/Files/SimpleFS/NewSimpleFile.php",
        "line": 133,
        "function": "newFile",
        "class": "OC\\Files\\Node\\Folder",
        "type": "->"
      },
      {
        "file": "/var/www/nextcloud/apps/text/lib/Service/DocumentService.php",
        "line": 148,
        "function": "putContent",
        "class": "OC\\Files\\SimpleFS\\NewSimpleFile",
        "type": "->"
      },
      {
        "file": "/var/www/nextcloud/apps/text/lib/Service/ApiService.php",
        "line": 102,
        "function": "createDocument",
        "class": "OCA\\Text\\Service\\DocumentService",
        "type": "->"
      },
      {
        "file": "/var/www/nextcloud/apps/text/lib/Controller/SessionController.php",
        "line": 72,
        "function": "create",
        "class": "OCA\\Text\\Service\\ApiService",
        "type": "->"
      },
      {
        "file": "/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php",
        "line": 225,
        "function": "create",
        "class": "OCA\\Text\\Controller\\SessionController",
        "type": "->"
      },
      {
        "file": "/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php",
        "line": 133,
        "function": "executeController",
        "class": "OC\\AppFramework\\Http\\Dispatcher",
        "type": "->"
      },
      {
        "file": "/var/www/nextcloud/lib/private/AppFramework/App.php",
        "line": 172,
        "function": "dispatch",
        "class": "OC\\AppFramework\\Http\\Dispatcher",
        "type": "->"
      },
      {
        "file": "/var/www/nextcloud/lib/private/Route/Router.php",
        "line": 298,
        "function": "main",
        "class": "OC\\AppFramework\\App",
        "type": "::"
      },
      {
        "file": "/var/www/nextcloud/lib/base.php",
        "line": 1030,
        "function": "match",
        "class": "OC\\Route\\Router",
        "type": "->"
      },
      {
        "file": "/var/www/nextcloud/index.php",
        "line": 36,
        "function": "handleRequest",
        "class": "OC",
        "type": "::"
      }
    ],
    "File": "/var/www/nextcloud/lib/private/Files/Node/Folder.php",
    "Line": 195,
    "CustomMessage": "--"
  }
}

Apache2 log

"PUT /apps/text/session/create HTTP/1.1" 500 5604 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:108.0) Gecko/20100101 Firefox/108.0"
@itcihef itcihef added the bug Something isn't working label Jan 4, 2023
@juliusknorr
Copy link
Member

Could you check if your webserver has proper write permissions in the data/appdata_[instanceid]/text folder and its subdirectories?

@itcihef
Copy link
Author

itcihef commented Jan 4, 2023

My data/appdata_[instanceid]/ content is: appstore avatar css dav-photocache identityproof js mail preview theming. text is absent. How can I add it?

@mejo-
Copy link
Member

mejo- commented Jan 4, 2023

Dear @itcihef, what's the permissions of data/appdata_[instanceid]? Can your webserver (or PHP) user write to it?

@itcihef
Copy link
Author

itcihef commented Jan 4, 2023

It is drwxr-xr-x 11 www-data www-data. Apache can write into it. I tried it out with sudo -u www-data touch data/appdata_[instanceid]/test

@mejo-
Copy link
Member

mejo- commented Jan 28, 2023

Dear @itcihef, have you tried creating text inside data/appdata_[instanceid]/ and making sure the webserver has permissions to write to it? Did it solve your issue?

@itcihef
Copy link
Author

itcihef commented Feb 14, 2023

Do you mean the directory text? Ok, I’ve done it and it reads drwxr-xr-x 2 www-data www-data 4096 14 févr. 11:12 text, it has the same owner and permission as the other directories on the same level (for instance appstore mail preview theming).

Still, the problem remains. I create a .md file in my personal folder through the web interface, the site tries to open it for edition but I only see that:

  • the name of the file on top, let’s say test.md
  • the and the × buttons on the same line
  • black and blank page below
  • … and the same Error 500

Since the text folder was empty, I also created the text/session folder, and this time the right activity/comment/share…-panel appears. But still "Failed to create the document session" as request answer.

Is still something missing in the text directory? If so, why did it disappear? How can I recreate it so everything works?

@mejo-
Copy link
Member

mejo- commented Feb 14, 2023

@itcihef there should be a documents folder below appdata_<instance-id>/text/. Maybe you can create that one and see whether it helps?

I have no idea why the folders got removed in the first place on your instance to be honest.

@itcihef
Copy link
Author

itcihef commented Feb 15, 2023

With text/documents created, it works. Neither do I know what could have caused their deletion. Thank you very much for your help!

@itcihef itcihef closed this as completed Feb 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs info
Projects
None yet
Development

No branches or pull requests

3 participants