android icon indicating copy to clipboard operation
android copied to clipboard

Failed to create document from template

Open R7JANV1 opened this issue 3 years ago • 9 comments

⚠️ Before posting ⚠️

  • [X] This is a bug, not a question or an enhancement.
  • [X] I've searched for similar issues and didn't find a duplicate.
  • [X] I've written a clear and descriptive title for this issue, not just "Bug" or "Crash".
  • [X] I agree to follow Nextcloud's Code of Conduct.

Steps to reproduce

  1. create a new text document
  2. see the following error message Screenshot_2022-08-04-23-22-46-32_06ea656a9ba653ff96746f477f32d0f9

Expected behaviour

a text document should be created

Actual behaviour

no text document is created

Android version

12

Device brand and model

Realme RMX3085

Stock or custom OS?

Stock

Nextcloud android app version

3.20.3

Nextcloud server version

24.0.3

Using a reverse proxy?

No

Android logs

No response

Server error logs

No response

Additional information

No response

R7JANV1 avatar Aug 04 '22 21:08 R7JANV1

Thanks for your report. Can you get a logcat from the Android device so we can see if there's any errors? Instructions here: https://github.com/nextcloud/android#getting-debug-info-via-logcat-mag

Feel free to search and replace the server URL, username and other file names in the output.

AlvaroBrey avatar Aug 05 '22 09:08 AlvaroBrey

It may be related to this in the server config 'skeletondirectory' => '',

ghost avatar Aug 07 '22 00:08 ghost

Thanks for your report. Can you get a logcat from the Android device so we can see if there's any errors? Instructions here: https://github.com/nextcloud/android#getting-debug-info-via-logcat-mag

Feel free to search and replace the server URL, username and other file names in the output.

no unfortunately not and the link does not work

ghost avatar Aug 07 '22 00:08 ghost

This bug report did not receive an update in the last 4 weeks. Please take a look again and update the issue with new details, otherwise the issue will be automatically closed in 2 weeks. Thank you!

github-actions[bot] avatar Sep 04 '22 00:09 github-actions[bot]

Can be reproduced as follows:

  1. install Nextcloud AIO Server (stable)
  2. config.php customization 'skeletondirectory' => '', 'knowledgebaseenabled' => false,
  3. connect Nextcloud Android (or IOS) app with account
  4. Create new document
  5. see the error message

ghost avatar Sep 04 '22 08:09 ghost

That's interesting. Empty skeletondirectory should prevent templates from being copied on user creation, but apart from that should not make anything crash. Will investigate

AlvaroBrey avatar Sep 05 '22 07:09 AlvaroBrey

Couldn't reproduce even with the above steps. Will have to try again

AlvaroBrey avatar Sep 05 '22 15:09 AlvaroBrey

I think i have a similar problem on iOS 16 as well.

If i want to create a new .odt file within the Nextcloud App on iOS i get this request in the logs: (the 212.50 is my caddy reverse proxy btw):

192.168.212.50 - DerLinkman [20/Sep/2022:17:10:15 +0000] "POST /ocs/v2.php/apps/richdocuments/api/v1/templates/new?format=json HTTP/1.1" 500 111 "-" "Mozilla/5.0 (iOS) Nextcloud-iOS/4.4.4" "CENSORED_IPV6"

It results in a Error 500 (as seen in the response code of the request above). My guess is that it happens because i don´t have a valid Template to select from at the document creation process on the App.

Interestingly if i open a existing Document it works like a charm without an error.

DerLinkman avatar Sep 20 '22 17:09 DerLinkman

Yes, this is also the behavior on Android. (Documents that exist are apparently not affected)

ghost avatar Sep 20 '22 17:09 ghost

Couldn't reproduce even with the above steps. Will have to try again

Have you made any progress?

ghost avatar Sep 27 '22 16:09 ghost

@tobiasKaminsky this is the issue I am also experiencing with our production server and master branch of the Android client

AndyScherzinger avatar Sep 27 '22 18:09 AndyScherzinger

I can reproduce it. The error is present on all my Nextcloud instances

ghost avatar Sep 30 '22 10:09 ghost

Could you check your Nextcloud log if there is an error similar to this one or a different one?

Undefined array key \"dirname\" at /var/www/nextcloud/apps/richdocuments/lib/Controller/OCSController.php#322

If it is the same error then creating documents should only fail in the root directory and a fix would be in https://github.com/nextcloud/richdocuments/pull/2543

juliusknorr avatar Oct 20 '22 08:10 juliusknorr

Yes this is the same error.

ghost avatar Oct 20 '22 08:10 ghost

Fix was merged and back ported and will become available with the next maintenance releases of richdocuments.

juliusknorr avatar Oct 21 '22 10:10 juliusknorr