nextcloud / android

📱 Nextcloud Android app
https://play.google.com/store/apps/details?id=com.nextcloud.client
GNU General Public License v2.0
4.18k stars 1.75k forks source link

Can not open TXT files by clicking on it #5975

Closed avalx closed 3 years ago

avalx commented 4 years ago

Steps to reproduce

  1. open NC client
  2. click on an existing text file (extension txt or md)
  3. does not open at all - message: Loading takes very long Screenshot_20200429-212734_Nextcloud

Expected behaviour

File should open in the appropriate app for text editing.

Actual behaviour

Nothing happens - the activity circle goes on indefinitely and there is the mentioned message at the bottom. This only happens for files with extension txt and md. If choosing any other file type this does not happen - the file is downloaded and opened with a selected app. If I change the extension to something else, for example to file.text or file.html, the file opens immediately and I can edit it as well. On the other hand if I first download the file (thee dots -> Download) and then tap on it, it opens immediately.

Can you reproduce this problem on https://try.nextcloud.com?

Did not test this yet, but I tested with two different NC accounts and on both this problem is present.

Environment data

Android version: 9

Device model: Oneplus 3

Stock or customized system: Stock Oxygen OS 9.0.6

Nextcloud app version: 3.11.1

Nextcloud server version: 18.0.4

Reverse proxy:

Nextcloud log (data/nextcloud.log)

Logs are empy

NOTE: Be super sure to remove sensitive data like passwords, note that everybody can look here! You can use the Issue Template application to prefill some of the required information: https://apps.nextcloud.com/apps/issuetemplate

Maenyx commented 4 years ago

Same Here, with Android 9, App V 3.11.1, and Oneplus 6. Except that the server log throw the following error :

OC\Encryption\Exceptions\DecryptionFailedException: Can not decrypt this file, probably this is a shared file. Please ask the file owner to reshare the file with you.

In fact, the txt file is nor shared, nor owned by a diffrent account than the one used to login with the app. Server-side encryption is on. But the exact same file is opened without any issue ( and therefore decrypted) with the desktop client and in the web browser. The problem occur only with the Android App.

NC server version 18.0.4

Neikius commented 4 years ago

Server 17.0.6, android 10, nokia 7.1, app 3.11.1 Can open txt, when trying to edit loading forever. Also loading forever when opening odt. Server logs when opening odt:

172.17.0.2 - <username> [19/May/2020:20:14:42 +0000] "GET /ocs/v1.php/cloud/user?format=json HTTP/1.1" 200 1318 "-" "Mozilla/5.0 (Android) Nextcloud-android/3.11.1"
172.17.0.2 - - [19/May/2020:20:14:42 +0000] "GET /apps/richdocuments/direct/<hash> HTTP/1.1" 200 2504 "-" "Mozilla/5.0 (Android) Nextcloud-android/3.11.1"
172.17.0.2 - - [19/May/2020:20:14:43 +0000] "GET /core/js/oc.js?v=a34328ca HTTP/1.1" 200 9251 "-" "Mozilla/5.0 (Android) Nextcloud-android/3.11.1"
172.17.0.2 - - [19/May/2020:20:14:43 +0000] "GET /cron.php HTTP/1.1" 200 895 "-" "Mozilla/5.0 (Android) Nextcloud-android/3.11.1"

Server logs when opening txt in edit mode are similar. I'd say not the server issue but I don't know the software well so I might be wrong.

Web works fine. Well, as for mobile app logs. What I did is cleared logs, navigated to Documents and tried opening About.odt, after I got a popup that "this is loading kinda long" I went back to menu and sent myself the log file. So here it is:

2020-05-19T22:21:14.101+0200;D;LogsActivity;onPause() ending
2020-05-19T22:21:14.122+0200;D;SettingsActivity;onStart() starting
2020-05-19T22:21:14.132+0200;D;SettingsActivity;onResume() starting
2020-05-19T22:21:14.629+0200;D;LogsActivity;onStop() ending
2020-05-19T22:21:14.631+0200;D;LogsActivity;onDestroy() ending
2020-05-19T22:21:15.860+0200;D;SettingsActivity;onPause() ending
2020-05-19T22:21:15.881+0200;V;BaseActivity;onRestart() start
2020-05-19T22:21:15.889+0200;D;FileDisplayActivity;onStart() starting
2020-05-19T22:21:15.920+0200;D;ExternalLinks;links disabled
2020-05-19T22:21:15.938+0200;D;OwnCloudClient #2;REQUEST GET /ocs/v1.php/cloud/user
2020-05-19T22:21:15.941+0200;D;AdvancedSslSocketFactory;Creating SSL Socket with remote next.domain:443, local null:0, params: org.apache.commons.httpclient.params.HttpConnectionParams@addc6e9
2020-05-19T22:21:15.941+0200;D;AdvancedSslSocketFactory; ... with connection timeout 60000 and socket timeout 60000
2020-05-19T22:21:15.946+0200;I;ServerNameIndicator;SNI done, hostname: next.domain
2020-05-19T22:21:15.979+0200;V;FileDisplayActivity;onResume() start
2020-05-19T22:21:15.982+0200;D;FileDisplayActivity;onResume() starting
2020-05-19T22:21:16.143+0200;V;FileDisplayActivity;onResume() end
2020-05-19T22:21:16.174+0200;E;ThemeUtils;Error setting TextView handles color
2020-05-19T22:21:16.193+0200;E;ThemeUtils;Error setting TextView handles color
2020-05-19T22:21:16.287+0200;D;ThumbnailsCacheManager;generate thumbnail: Nextcloud Manual.pdf URI: https://next.domain/index.php/apps/files/api/v1/thumbnail/256/256/Nextcloud%20Manual.pdf
2020-05-19T22:21:16.288+0200;D;OwnCloudClient #2;REQUEST GET /index.php/apps/files/api/v1/thumbnail/256/256/Nextcloud%20Manual.pdf
2020-05-19T22:21:16.591+0200;D;OwnCloudClient #2;REQUEST GET /status.php
2020-05-19T22:21:16.594+0200;D;AdvancedSslSocketFactory;Creating SSL Socket with remote next.domain:443, local null:0, params: org.apache.commons.httpclient.params.HttpConnectionParams@1cf6e46
2020-05-19T22:21:16.594+0200;D;AdvancedSslSocketFactory; ... with connection timeout 60000 and socket timeout 60000
2020-05-19T22:21:16.596+0200;I;ServerNameIndicator;SNI done, hostname: next.domain
2020-05-19T22:21:16.783+0200;D;SettingsActivity;onStop() ending
2020-05-19T22:21:16.784+0200;D;SettingsActivity;onDestroy() ending
2020-05-19T22:21:17.032+0200;D;UpdateOCVersionOperation;Got new OC version 17.0.6.2
2020-05-19T22:21:17.032+0200;I;UpdateOCVersionOperation;Check for update of Nextcloud server version at https://next.domain/remote.php/webdav: Operation finished with HTTP status code -1 (success)
2020-05-19T22:21:17.046+0200;D;OwnCloudClient #2;REQUEST GET /ocs/v1.php/cloud/capabilities
2020-05-19T22:21:17.305+0200;D;GetCapabilitiesRemoteOperation;Successful response: {"ocs":{"meta":{"status":"ok","statuscode":100,"message":"OK","totalitems":"","itemsperpage":""},"data":{"version":{"major":17,"minor":0,"micro":6,"string":"17.0.6","edition":"","extendedSupport":false},"capabilities":{"core":{"pollinterval":60,"webdav-root":"remote.php\/webdav"},"bruteforce":{"delay":0},"activity":{"apiv2":["filters","filters-api","previews","rich-strings"]},"ocm":{"enabled":true,"apiVersion":"1.0-proposal1","endPoint":"https:\/\/next.domain\/ocm","resourceTypes":[{"name":"file","shareTypes":["user","group"],"protocols":{"webdav":"\/public.php\/webdav\/"}}]},"richdocuments":{"mimetypes":["application\/vnd.oasis.opendocument.text","application\/vnd.oasis.opendocument.spreadsheet","application\/vnd.oasis.opendocument.graphics","application\/vnd.oasis.opendocument.presentation","application\/vnd.lotus-wordpro","application\/vnd.visio","application\/vnd.wordperfect","application\/msonenote","application\/msword","application\/rtf","text\/rtf","application\/vnd.openxmlformats-officedocument.wordprocessingml.document","application\/vnd.openxmlformats-officedocument.wordprocessingml.template","application\/vnd.ms-word.document.macroEnabled.12","application\/vnd.ms-word.template.macroEnabled.12","application\/vnd.ms-excel","application\/vnd.openxmlformats-officedocument.spreadsheetml.sheet","application\/vnd.openxmlformats-officedocument.spreadsheetml.template","application\/vnd.ms-excel.sheet.macroEnabled.12","application\/vnd.ms-excel.template.macroEnabled.12","application\/vnd.ms-excel.addin.macroEnabled.12","application\/vnd.ms-excel.sheet.binary.macroEnabled.12","application\/vnd.ms-powerpoint","application\/vnd.openxmlformats-officedocument.presentationml.presentation","application\/vnd.openxmlformats-officedocument.presentationml.template","application\/vnd.openxmlformats-officedocument.presentationml.slideshow","application\/vnd.ms-powerpoint.addin.macroEnabled.12","application\/vnd.ms-powerpoint.presentation.macroEnabled.12","application\/vnd.ms-powerpoint.template.macroEnabled.12","application\/vnd.ms-powerpoint.slideshow.macroEnabled.12","text\/csv"],"mimetypesNoDefaultOpen":["image\/svg+xml","application\/pdf","text\/plain","text\/spreadsheet"],"collabora":{"convert-to":{"available":true},"hasMobileSupport":true,"hasTemplateSaveAs":false,"hasTemplateSource":true,"productName":"Collabora Online Development Edition"},"direct_editing":true,"templates":true,"productName":"Collabora Online Development Edition"},"dav":{"chunking":"1.0"},"files_sharing":{"api_enabled":true,"public":{"enabled":true,"password":{"enforced":false,"askForOptionalPassword":false},"expire_date":{"enabled":false},"multiple_links":true,"send_mail":false,"upload":true,"upload_files_drop":true},"resharing":true,"user":{"send_mail":false,"expire_date":{"enabled":true}},"group_sharing":true,"group":{"enabled":true,"expire_date":{"enabled":true}},"default_permissions":31,"federation":{"outgoing":true,"incoming":true,"expire_date":{"enabled":true}},"sharee":{"query_lookup_default":false},"sharebymail":{"enabled":true,"upload_files_drop":{"enabled":true},"password":{"enabled":true},"expire_date":{"enabled":true}}},"notifications":{"ocs-endpoints":["list","get","delete","delete-all","icons","rich-strings","action-web"],"push":["devices","object-data","delete"],"admin-notifications":["ocs","cli"]},"password_policy":{"minLength":8,"enforceNonCommonPassword":true,"enforceNumericCharacters":false,"enforceSpecialCharacters":false,"enforceUpperLowerCase":false,"api":{"generate":"https:\/\/next.domain\/ocs\/v2.php\/apps\/password_policy\/api\/v1\/generate","validate":"https:\/\/next.domain\/ocs\/v2.php\/apps\/password_policy\/api\/v1\/validate"}},"spreed":{"features":["audio","video","chat-v2","guest-signaling","empty-group-room","guest-display-names","multi-room-users","favorites","last-room-activity","no-ping","system-messages","mention-flag","in-call-flags","notification-levels","invite-groups-and-mails","locked-one-to-one-rooms","read-only-rooms","chat-read-marker","webinary-lobby","start-call-flag"],"config":{"chat":{"max-length":32000}}},"theming":{"name":"Nextcloud","url":"https:\/\/nextcloud.com","slogan":"a safe home for all your data","color":"#0082c9","color-text":"#ffffff","color-element":"#0082c9","logo":"https:\/\/next.domain\/core\/img\/logo\/logo.svg?v=0","background":"https:\/\/next.domain\/core\/img\/background.png?v=0","background-plain":false,"background-default":true},"files":{"bigfilechunking":true,"blacklisted_files":[".htaccess"],"undelete":true,"versioning":true}}}}}
2020-05-19T22:21:17.306+0200;D;GetCapabilitiesRemoteOperation;*** Added version
2020-05-19T22:21:17.306+0200;D;GetCapabilitiesRemoteOperation;*** Added core
2020-05-19T22:21:17.306+0200;D;GetCapabilitiesRemoteOperation;*** Added files_sharing
2020-05-19T22:21:17.306+0200;D;GetCapabilitiesRemoteOperation;*** Added files
2020-05-19T22:21:17.306+0200;D;GetCapabilitiesRemoteOperation;*** Added theming
2020-05-19T22:21:17.307+0200;D;GetCapabilitiesRemoteOperation;*** Added notifications
2020-05-19T22:21:17.307+0200;D;GetCapabilitiesRemoteOperation;*** Get Capabilities completed 
2020-05-19T22:21:17.348+0200;D;OwnCloudClient #2;REQUEST GET /ocs/v1.php/cloud/user
2020-05-19T22:21:17.379+0200;V;ThumbnailsCacheManager;Cancelled generation of thumbnail for a reused imageView
2020-05-19T22:21:17.384+0200;D;ThumbnailsCacheManager;generate thumbnail: Nextcloud Flyer.pdf URI: https://next.domain/index.php/apps/files/api/v1/thumbnail/256/256/Documents/Nextcloud%20Flyer.pdf
2020-05-19T22:21:17.385+0200;D;OwnCloudClient #2;REQUEST GET /index.php/apps/files/api/v1/thumbnail/256/256/Documents/Nextcloud%20Flyer.pdf
2020-05-19T22:21:17.574+0200;I;RefreshFolderOperation;Got display name: com.owncloud.android.lib.common.UserInfo@711dee6
2020-05-19T22:21:17.574+0200;D;RefreshFolderOperation;Checking changes in username@next.domain/
2020-05-19T22:21:17.580+0200;D;OwnCloudClient #2;REQUEST PROPFIND /remote.php/webdav/
2020-05-19T22:21:17.756+0200;I;RefreshFolderOperation;Checked username@next.domain/ : changed
2020-05-19T22:21:17.764+0200;D;OwnCloudClient #2;REQUEST PROPFIND /remote.php/webdav/
2020-05-19T22:21:17.926+0200;D;RefreshFolderOperation;Checking changes in username@next.domain/Documents/
2020-05-19T22:21:17.933+0200;D;OwnCloudClient #2;REQUEST PROPFIND /remote.php/webdav/Documents/
2020-05-19T22:21:17.976+0200;I;ReadFolderRemoteOperation;Synchronized /: Operation finished with HTTP status code 207 (success)
2020-05-19T22:21:17.976+0200;D;RefreshFolderOperation;Synchronizing username@next.domain/
2020-05-19T22:21:17.990+0200;D;RefreshFolderOperation;Remote folder / changed - starting update of local data 
2020-05-19T22:21:18.004+0200;D;FileDataStorageManager;Saving folder / with 5 children and 0 files to remove
2020-05-19T22:21:18.039+0200;D;FileDataStorageManager;Sending 6 operations to FileContentProvider
2020-05-19T22:21:18.040+0200;D;FileContentProvider;applying batch in provider com.owncloud.android.providers.FileContentProvider@a8361c7 (temporary: false)
2020-05-19T22:21:18.071+0200;I;RefreshFolderOperation;Checked username@next.domain/Documents/ : changed
2020-05-19T22:21:18.073+0200;D;FileContentProvider;applied batch in provider com.owncloud.android.providers.FileContentProvider@a8361c7
2020-05-19T22:21:18.076+0200;D;OwnCloudClient #2;REQUEST PROPFIND /remote.php/webdav/Documents/
2020-05-19T22:21:18.109+0200;D;RefreshFolderOperation;Send broadcast com.owncloud.android.operations.RefreshFolderOperation.EVENT_SINGLE_FOLDER_CONTENTS_SYNCED
2020-05-19T22:21:18.112+0200;D;FileDisplayActivity;Received broadcast com.owncloud.android.operations.RefreshFolderOperation.EVENT_SINGLE_FOLDER_CONTENTS_SYNCED
2020-05-19T22:21:18.112+0200;D;OwnCloudClient #2;REQUEST GET /ocs/v2.php/apps/files_sharing/api/v1/shares
2020-05-19T22:21:18.135+0200;D;FileDisplayActivity;Setting progress visibility to true
2020-05-19T22:21:18.319+0200;I;ReadFolderRemoteOperation;Synchronized /Documents/: Operation finished with HTTP status code 207 (success)
2020-05-19T22:21:18.319+0200;D;RefreshFolderOperation;Synchronizing username@next.domain/Documents/
2020-05-19T22:21:18.320+0200;D;GetSharesForFileRemoteOperation;Got 0 shares
2020-05-19T22:21:18.376+0200;D;RefreshFolderOperation;Remote folder /Documents/ changed - starting update of local data 
2020-05-19T22:21:18.386+0200;D;FileDataStorageManager;Sending 5 operations to FileContentProvider
2020-05-19T22:21:18.388+0200;D;FileContentProvider;applying batch in provider com.owncloud.android.providers.FileContentProvider@a8361c7 (temporary: false)
2020-05-19T22:21:18.402+0200;D;FileContentProvider;applied batch in provider com.owncloud.android.providers.FileContentProvider@a8361c7
2020-05-19T22:21:18.402+0200;D;RefreshFolderOperation;Send broadcast com.owncloud.android.operations.RefreshFolderOperation.EVENT_SINGLE_FOLDER_SHARES_SYNCED
2020-05-19T22:21:18.405+0200;D;FileDisplayActivity;Received broadcast com.owncloud.android.operations.RefreshFolderOperation.EVENT_SINGLE_FOLDER_SHARES_SYNCED
2020-05-19T22:21:18.411+0200;D;FileDataStorageManager;Saving folder /Documents/ with 3 children and 0 files to remove
2020-05-19T22:21:18.436+0200;D;FileDisplayActivity;Setting progress visibility to false
2020-05-19T22:21:18.447+0200;D;FileDataStorageManager;Sending 4 operations to FileContentProvider
2020-05-19T22:21:18.447+0200;D;FileContentProvider;applying batch in provider com.owncloud.android.providers.FileContentProvider@a8361c7 (temporary: false)
2020-05-19T22:21:18.497+0200;D;FileContentProvider;applied batch in provider com.owncloud.android.providers.FileContentProvider@a8361c7
2020-05-19T22:21:18.537+0200;D;RefreshFolderOperation;Send broadcast com.owncloud.android.operations.RefreshFolderOperation.EVENT_SINGLE_FOLDER_CONTENTS_SYNCED
2020-05-19T22:21:18.541+0200;D;FileDisplayActivity;Received broadcast com.owncloud.android.operations.RefreshFolderOperation.EVENT_SINGLE_FOLDER_CONTENTS_SYNCED
2020-05-19T22:21:18.542+0200;D;OwnCloudClient #2;REQUEST GET /ocs/v2.php/apps/files_sharing/api/v1/shares
2020-05-19T22:21:18.672+0200;D;FileDisplayActivity;Setting progress visibility to true
2020-05-19T22:21:18.740+0200;D;GetSharesForFileRemoteOperation;Got 0 shares
2020-05-19T22:21:18.781+0200;D;FileDataStorageManager;Sending 3 operations to FileContentProvider
2020-05-19T22:21:18.784+0200;D;FileContentProvider;applying batch in provider com.owncloud.android.providers.FileContentProvider@a8361c7 (temporary: false)
2020-05-19T22:21:18.799+0200;D;FileContentProvider;applied batch in provider com.owncloud.android.providers.FileContentProvider@a8361c7
2020-05-19T22:21:18.802+0200;D;RefreshFolderOperation;Send broadcast com.owncloud.android.operations.RefreshFolderOperation.EVENT_SINGLE_FOLDER_SHARES_SYNCED
2020-05-19T22:21:18.808+0200;D;FileDisplayActivity;Received broadcast com.owncloud.android.operations.RefreshFolderOperation.EVENT_SINGLE_FOLDER_SHARES_SYNCED
2020-05-19T22:21:18.948+0200;D;FileDisplayActivity;Setting progress visibility to false
2020-05-19T22:21:20.623+0200;V;FileDisplayActivity;onPause() start
2020-05-19T22:21:20.670+0200;D;FileDisplayActivity;onPause() ending
2020-05-19T22:21:20.670+0200;V;FileDisplayActivity;onPause() end
2020-05-19T22:21:20.684+0200;V;ExternalSiteWebView;onCreate() start
2020-05-19T22:21:20.686+0200;D;RichDocumentsEditorWebView;onCreate(Bundle) starting
2020-05-19T22:21:20.774+0200;D;RichDocumentsEditorWebView;onStart() starting
2020-05-19T22:21:20.775+0200;D;OwnCloudClient #2;REQUEST POST /ocs/v2.php/apps/richdocuments/api/v1/document
2020-05-19T22:21:20.792+0200;D;ExternalLinks;links disabled
2020-05-19T22:21:20.811+0200;D;OwnCloudClient #2;REQUEST GET /ocs/v1.php/cloud/user
2020-05-19T22:21:20.883+0200;D;RichDocumentsEditorWebView;onResume() starting
2020-05-19T22:21:20.961+0200;D;FileActivity;Operations service connected
2020-05-19T22:21:21.431+0200;D;FileDisplayActivity;onStop() ending
2020-05-19T22:21:21.432+0200;V;FileDisplayActivity;onSaveInstanceState() start
2020-05-19T22:21:21.433+0200;D;FileDisplayActivity;onSaveInstanceState(Bundle) starting
2020-05-19T22:21:21.434+0200;D;ExtendedListFragment;onSaveInstanceState()
2020-05-19T22:21:21.435+0200;V;FileDisplayActivity;onSaveInstanceState() end
2020-05-19T22:21:32.279+0200;D;RichDocumentsEditorWebView;onPause() ending
2020-05-19T22:21:32.294+0200;V;BaseActivity;onRestart() start
2020-05-19T22:21:32.298+0200;D;FileDisplayActivity;onStart() starting
2020-05-19T22:21:32.337+0200;D;ExternalLinks;links disabled
2020-05-19T22:21:32.372+0200;D;OwnCloudClient #2;REQUEST GET /ocs/v1.php/cloud/user
2020-05-19T22:21:32.412+0200;V;FileDisplayActivity;onResume() start
2020-05-19T22:21:32.415+0200;D;FileDisplayActivity;onResume() starting
2020-05-19T22:21:32.612+0200;V;FileDisplayActivity;onResume() end
2020-05-19T22:21:32.650+0200;E;ThemeUtils;Error setting TextView handles color
2020-05-19T22:21:32.673+0200;E;ThemeUtils;Error setting TextView handles color
2020-05-19T22:21:33.024+0200;D;RefreshFolderOperation;Checking changes in username@next.domain/Documents/
2020-05-19T22:21:33.028+0200;D;OwnCloudClient #2;REQUEST PROPFIND /remote.php/webdav/Documents/
2020-05-19T22:21:33.205+0200;I;RefreshFolderOperation;Checked username@next.domain/Documents/ : changed
2020-05-19T22:21:33.210+0200;D;OwnCloudClient #2;REQUEST PROPFIND /remote.php/webdav/Documents/
2020-05-19T22:21:33.231+0200;D;RichDocumentsEditorWebView;onStop() ending
2020-05-19T22:21:33.239+0200;D;RichDocumentsEditorWebView;onDestroy() ending
2020-05-19T22:21:33.416+0200;I;ReadFolderRemoteOperation;Synchronized /Documents/: Operation finished with HTTP status code 207 (success)
2020-05-19T22:21:33.416+0200;D;RefreshFolderOperation;Synchronizing username@next.domain/Documents/
2020-05-19T22:21:33.431+0200;D;RefreshFolderOperation;Remote folder /Documents/ changed - starting update of local data 
2020-05-19T22:21:33.451+0200;D;FileDataStorageManager;Saving folder /Documents/ with 3 children and 0 files to remove
2020-05-19T22:21:33.477+0200;D;FileDataStorageManager;Sending 4 operations to FileContentProvider
2020-05-19T22:21:33.478+0200;D;FileContentProvider;applying batch in provider com.owncloud.android.providers.FileContentProvider@a8361c7 (temporary: false)
2020-05-19T22:21:33.508+0200;D;FileContentProvider;applied batch in provider com.owncloud.android.providers.FileContentProvider@a8361c7
2020-05-19T22:21:33.547+0200;D;RefreshFolderOperation;Send broadcast com.owncloud.android.operations.RefreshFolderOperation.EVENT_SINGLE_FOLDER_CONTENTS_SYNCED
2020-05-19T22:21:33.550+0200;D;FileDisplayActivity;Received broadcast com.owncloud.android.operations.RefreshFolderOperation.EVENT_SINGLE_FOLDER_CONTENTS_SYNCED
2020-05-19T22:21:33.550+0200;D;OwnCloudClient #2;REQUEST GET /ocs/v2.php/apps/files_sharing/api/v1/shares
2020-05-19T22:21:33.676+0200;D;FileDisplayActivity;Setting progress visibility to true
2020-05-19T22:21:33.727+0200;D;GetSharesForFileRemoteOperation;Got 0 shares
2020-05-19T22:21:33.767+0200;D;FileDataStorageManager;Sending 3 operations to FileContentProvider
2020-05-19T22:21:33.768+0200;D;FileContentProvider;applying batch in provider com.owncloud.android.providers.FileContentProvider@a8361c7 (temporary: false)
2020-05-19T22:21:33.777+0200;D;FileContentProvider;applied batch in provider com.owncloud.android.providers.FileContentProvider@a8361c7
2020-05-19T22:21:33.778+0200;D;RefreshFolderOperation;Send broadcast com.owncloud.android.operations.RefreshFolderOperation.EVENT_SINGLE_FOLDER_SHARES_SYNCED
2020-05-19T22:21:33.823+0200;V;ExtendedListFragment;Setting selection to position: 0; top: 0; index: 0
2020-05-19T22:21:33.844+0200;D;FileDisplayActivity;Received broadcast com.owncloud.android.operations.RefreshFolderOperation.EVENT_SINGLE_FOLDER_SHARES_SYNCED
2020-05-19T22:21:33.857+0200;D;FileDisplayActivity;Setting progress visibility to false
2020-05-19T22:21:33.881+0200;V;ThumbnailsCacheManager;Cancelled generation of thumbnail for a reused imageView
2020-05-19T22:21:33.888+0200;D;ThumbnailsCacheManager;generate thumbnail: Nextcloud Manual.pdf URI: https://next.domain/index.php/apps/files/api/v1/thumbnail/256/256/Nextcloud%20Manual.pdf
2020-05-19T22:21:33.889+0200;D;OwnCloudClient #2;REQUEST GET /index.php/apps/files/api/v1/thumbnail/256/256/Nextcloud%20Manual.pdf
2020-05-19T22:21:34.395+0200;D;OwnCloudClient #2;REQUEST GET /status.php
2020-05-19T22:21:34.556+0200;D;UpdateOCVersionOperation;Got new OC version 17.0.6.2
2020-05-19T22:21:34.556+0200;I;UpdateOCVersionOperation;Check for update of Nextcloud server version at https://next.domain/remote.php/webdav: Operation finished with HTTP status code -1 (success)
2020-05-19T22:21:34.578+0200;D;OwnCloudClient #2;REQUEST GET /ocs/v1.php/cloud/capabilities
2020-05-19T22:21:34.730+0200;D;GetCapabilitiesRemoteOperation;Successful response: {"ocs":{"meta":{"status":"ok","statuscode":100,"message":"OK","totalitems":"","itemsperpage":""},"data":{"version":{"major":17,"minor":0,"micro":6,"string":"17.0.6","edition":"","extendedSupport":false},"capabilities":{"core":{"pollinterval":60,"webdav-root":"remote.php\/webdav"},"bruteforce":{"delay":0},"activity":{"apiv2":["filters","filters-api","previews","rich-strings"]},"ocm":{"enabled":true,"apiVersion":"1.0-proposal1","endPoint":"https:\/\/next.domain\/ocm","resourceTypes":[{"name":"file","shareTypes":["user","group"],"protocols":{"webdav":"\/public.php\/webdav\/"}}]},"richdocuments":{"mimetypes":["application\/vnd.oasis.opendocument.text","application\/vnd.oasis.opendocument.spreadsheet","application\/vnd.oasis.opendocument.graphics","application\/vnd.oasis.opendocument.presentation","application\/vnd.lotus-wordpro","application\/vnd.visio","application\/vnd.wordperfect","application\/msonenote","application\/msword","application\/rtf","text\/rtf","application\/vnd.openxmlformats-officedocument.wordprocessingml.document","application\/vnd.openxmlformats-officedocument.wordprocessingml.template","application\/vnd.ms-word.document.macroEnabled.12","application\/vnd.ms-word.template.macroEnabled.12","application\/vnd.ms-excel","application\/vnd.openxmlformats-officedocument.spreadsheetml.sheet","application\/vnd.openxmlformats-officedocument.spreadsheetml.template","application\/vnd.ms-excel.sheet.macroEnabled.12","application\/vnd.ms-excel.template.macroEnabled.12","application\/vnd.ms-excel.addin.macroEnabled.12","application\/vnd.ms-excel.sheet.binary.macroEnabled.12","application\/vnd.ms-powerpoint","application\/vnd.openxmlformats-officedocument.presentationml.presentation","application\/vnd.openxmlformats-officedocument.presentationml.template","application\/vnd.openxmlformats-officedocument.presentationml.slideshow","application\/vnd.ms-powerpoint.addin.macroEnabled.12","application\/vnd.ms-powerpoint.presentation.macroEnabled.12","application\/vnd.ms-powerpoint.template.macroEnabled.12","application\/vnd.ms-powerpoint.slideshow.macroEnabled.12","text\/csv"],"mimetypesNoDefaultOpen":["image\/svg+xml","application\/pdf","text\/plain","text\/spreadsheet"],"collabora":{"convert-to":{"available":true},"hasMobileSupport":true,"hasTemplateSaveAs":false,"hasTemplateSource":true,"productName":"Collabora Online Development Edition"},"direct_editing":true,"templates":true,"productName":"Collabora Online Development Edition"},"dav":{"chunking":"1.0"},"files_sharing":{"api_enabled":true,"public":{"enabled":true,"password":{"enforced":false,"askForOptionalPassword":false},"expire_date":{"enabled":false},"multiple_links":true,"send_mail":false,"upload":true,"upload_files_drop":true},"resharing":true,"user":{"send_mail":false,"expire_date":{"enabled":true}},"group_sharing":true,"group":{"enabled":true,"expire_date":{"enabled":true}},"default_permissions":31,"federation":{"outgoing":true,"incoming":true,"expire_date":{"enabled":true}},"sharee":{"query_lookup_default":false},"sharebymail":{"enabled":true,"upload_files_drop":{"enabled":true},"password":{"enabled":true},"expire_date":{"enabled":true}}},"notifications":{"ocs-endpoints":["list","get","delete","delete-all","icons","rich-strings","action-web"],"push":["devices","object-data","delete"],"admin-notifications":["ocs","cli"]},"password_policy":{"minLength":8,"enforceNonCommonPassword":true,"enforceNumericCharacters":false,"enforceSpecialCharacters":false,"enforceUpperLowerCase":false,"api":{"generate":"https:\/\/next.domain\/ocs\/v2.php\/apps\/password_policy\/api\/v1\/generate","validate":"https:\/\/next.domain\/ocs\/v2.php\/apps\/password_policy\/api\/v1\/validate"}},"spreed":{"features":["audio","video","chat-v2","guest-signaling","empty-group-room","guest-display-names","multi-room-users","favorites","last-room-activity","no-ping","system-messages","mention-flag","in-call-flags","notification-levels","invite-groups-and-mails","locked-one-to-one-rooms","read-only-rooms","chat-read-marker","webinary-lobby","start-call-flag"],"config":{"chat":{"max-length":32000}}},"theming":{"name":"Nextcloud","url":"https:\/\/nextcloud.com","slogan":"a safe home for all your data","color":"#0082c9","color-text":"#ffffff","color-element":"#0082c9","logo":"https:\/\/next.domain\/core\/img\/logo\/logo.svg?v=0","background":"https:\/\/next.domain\/core\/img\/background.png?v=0","background-plain":false,"background-default":true},"files":{"bigfilechunking":true,"blacklisted_files":[".htaccess"],"undelete":true,"versioning":true}}}}}
2020-05-19T22:21:34.731+0200;D;GetCapabilitiesRemoteOperation;*** Added version
2020-05-19T22:21:34.732+0200;D;GetCapabilitiesRemoteOperation;*** Added core
2020-05-19T22:21:34.732+0200;D;GetCapabilitiesRemoteOperation;*** Added files_sharing
2020-05-19T22:21:34.732+0200;D;GetCapabilitiesRemoteOperation;*** Added files
2020-05-19T22:21:34.732+0200;D;GetCapabilitiesRemoteOperation;*** Added theming
2020-05-19T22:21:34.732+0200;D;GetCapabilitiesRemoteOperation;*** Added notifications
2020-05-19T22:21:34.732+0200;D;GetCapabilitiesRemoteOperation;*** Get Capabilities completed 
2020-05-19T22:21:34.790+0200;D;OwnCloudClient #2;REQUEST GET /ocs/v1.php/cloud/user
2020-05-19T22:21:35.016+0200;I;RefreshFolderOperation;Got display name: com.owncloud.android.lib.common.UserInfo@91ccd67
2020-05-19T22:21:35.016+0200;D;RefreshFolderOperation;Checking changes in username@next.domain/
2020-05-19T22:21:35.020+0200;D;OwnCloudClient #2;REQUEST PROPFIND /remote.php/webdav/
2020-05-19T22:21:35.104+0200;E;ThemeUtils;Error setting TextView handles color
2020-05-19T22:21:35.123+0200;E;ThemeUtils;Error setting TextView handles color
2020-05-19T22:21:35.164+0200;I;RefreshFolderOperation;Checked username@next.domain/ : changed
2020-05-19T22:21:35.167+0200;D;OwnCloudClient #2;REQUEST PROPFIND /remote.php/webdav/
2020-05-19T22:21:35.394+0200;I;ReadFolderRemoteOperation;Synchronized /: Operation finished with HTTP status code 207 (success)
2020-05-19T22:21:35.394+0200;D;RefreshFolderOperation;Synchronizing username@next.domain/
2020-05-19T22:21:35.402+0200;D;RefreshFolderOperation;Remote folder / changed - starting update of local data 
2020-05-19T22:21:35.409+0200;D;FileDataStorageManager;Saving folder / with 5 children and 0 files to remove
2020-05-19T22:21:35.431+0200;D;FileDataStorageManager;Sending 6 operations to FileContentProvider
2020-05-19T22:21:35.431+0200;D;FileContentProvider;applying batch in provider com.owncloud.android.providers.FileContentProvider@a8361c7 (temporary: false)
2020-05-19T22:21:35.469+0200;D;FileContentProvider;applied batch in provider com.owncloud.android.providers.FileContentProvider@a8361c7
2020-05-19T22:21:35.498+0200;D;RefreshFolderOperation;Send broadcast com.owncloud.android.operations.RefreshFolderOperation.EVENT_SINGLE_FOLDER_CONTENTS_SYNCED
2020-05-19T22:21:35.500+0200;D;OwnCloudClient #2;REQUEST GET /ocs/v2.php/apps/files_sharing/api/v1/shares
2020-05-19T22:21:35.500+0200;D;FileDisplayActivity;Received broadcast com.owncloud.android.operations.RefreshFolderOperation.EVENT_SINGLE_FOLDER_CONTENTS_SYNCED
2020-05-19T22:21:35.554+0200;D;FileDisplayActivity;Setting progress visibility to true
2020-05-19T22:21:35.673+0200;D;GetSharesForFileRemoteOperation;Got 0 shares
2020-05-19T22:21:35.719+0200;D;FileDataStorageManager;Sending 5 operations to FileContentProvider
2020-05-19T22:21:35.719+0200;D;FileContentProvider;applying batch in provider com.owncloud.android.providers.FileContentProvider@a8361c7 (temporary: false)
2020-05-19T22:21:35.726+0200;D;FileContentProvider;applied batch in provider com.owncloud.android.providers.FileContentProvider@a8361c7
2020-05-19T22:21:35.726+0200;D;RefreshFolderOperation;Send broadcast com.owncloud.android.operations.RefreshFolderOperation.EVENT_SINGLE_FOLDER_SHARES_SYNCED
2020-05-19T22:21:35.729+0200;D;FileDisplayActivity;Received broadcast com.owncloud.android.operations.RefreshFolderOperation.EVENT_SINGLE_FOLDER_SHARES_SYNCED
2020-05-19T22:21:35.787+0200;D;FileDisplayActivity;Setting progress visibility to false
2020-05-19T22:21:36.472+0200;E;ThemeUtils;Error setting TextView handles color
2020-05-19T22:21:36.487+0200;E;ThemeUtils;Error setting TextView handles color
2020-05-19T22:21:36.537+0200;V;FileDisplayActivity;onPause() start
2020-05-19T22:21:36.585+0200;D;FileDisplayActivity;onPause() ending
2020-05-19T22:21:36.586+0200;V;FileDisplayActivity;onPause() end
2020-05-19T22:21:36.612+0200;D;SettingsActivity;onCreate(Bundle) starting
2020-05-19T22:21:36.686+0200;D;OwnCloudClient #11;Creating OwnCloudClient
2020-05-19T22:21:36.689+0200;D;AccountUtils;Restoring cookies for username@next.domain
2020-05-19T22:21:36.699+0200;D;SettingsActivity;onStart() starting
2020-05-19T22:21:36.737+0200;D;SettingsActivity;onResume() starting
2020-05-19T22:21:37.284+0200;D;FileDisplayActivity;onStop() ending
2020-05-19T22:21:37.285+0200;V;FileDisplayActivity;onSaveInstanceState() start
2020-05-19T22:21:37.287+0200;D;FileDisplayActivity;onSaveInstanceState(Bundle) starting
2020-05-19T22:21:37.287+0200;D;ExtendedListFragment;onSaveInstanceState()
2020-05-19T22:21:37.288+0200;V;FileDisplayActivity;onSaveInstanceState() end
2020-05-19T22:21:38.604+0200;D;SettingsActivity;onPause() ending
2020-05-19T22:21:38.621+0200;D;LogsActivity;onCreate(Bundle) starting
avalx commented 4 years ago

Some additional observations on how I need to edit a simple text file.

  1. Find the file in the NC client app
  2. "Three dots" menu -> Download
  3. If I tap the file now I only get a preview - If I try the "Three dots" menu -> Edit I still get the same problem: "Loading takes very long". So this is no good for editing either and I need additional steps.
  4. "Three dots" menu -> Open With -> choose my editor for text files
  5. Edit file -> Save

At first I thought this is it but then I found out that the file is NOT synced back to server. I checked on my desktop and web client - no Activity for this file. Even a couple of "pull down" gestures in the android client did not help. So I have to do another step:

  1. "Three dots" menu ->Sync

Only now is the file synced to the server. So IMHO way too many steps for such a simple task as editing a text file.

The only relevant log entries on my local server that I found are these:

{"reqId":"XsTVqYgk@k5eOBkt82NhUgAAAFc","level":3,"time":"2020-05-20T07:00:57+00:00","remoteAddr":"10.55.66.111","user":"aval ","app":"PHP","method":"GET","url":"/nextcloud/index.php/core/preview?fileId=10281&x=32&y=32","message":"imagettftext(): Pro blem doing text layout at /var/www/html/nextcloud/lib/private/Preview/TXT.php#91","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.142 Safari/537.36","version":"18.0.4.2"} {"reqId":"XsTVqYvyMAeA55Y8q2akZAAAAMg","level":3,"time":"2020-05-20T07:00:57+00:00","remoteAddr":"10.55.66.111","user":"aval ","app":"PHP","method":"GET","url":"/nextcloud/index.php/core/preview?fileId=10281&c=d24cf09e707e7542646d99d115104782&x=250& y=250&forceIcon=0","message":"imagettftext(): Problem doing text layout at /var/www/html/nextcloud/lib/private/Preview/TXT.p hp#91","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.142 Sa fari/537.36","version":"18.0.4.2"} {"reqId":"XsTVqYvyMAeA55Y8q2akZAAAAMg","level":3,"time":"2020-05-20T07:00:57+00:00","remoteAddr":"10.55.66.111","user":"aval ","app":"PHP","method":"GET","url":"/nextcloud/index.php/core/preview?fileId=10281&c=d24cf09e707e7542646d99d115104782&x=250& y=250&forceIcon=0","message":"imagettftext(): Problem doing text layout at /var/www/html/nextcloud/lib/private/Preview/TXT.p hp#91","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.142 Sa fari/537.36","version":"18.0.4.2"} {"reqId":"XsTVqYvyMAeA55Y8q2akZAAAAMg","level":3,"time":"2020-05-20T07:00:57+00:00","remoteAddr":"10.55.66.111","user":"aval ","app":"PHP","method":"GET","url":"/nextcloud/index.php/core/preview?fileId=10281&c=d24cf09e707e7542646d99d115104782&x=250& y=250&forceIcon=0","message":"imagettftext(): Problem doing text layout at /var/www/html/nextcloud/lib/private/Preview/TXT.p hp#91","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.142 Sa fari/537.36","version":"18.0.4.2"} {"reqId":"XsTVqYvyMAeA55Y8q2akZAAAAMg","level":3,"time":"2020-05-20T07:00:57+00:00","remoteAddr":"10.55.66.111","user":"aval ","app":"PHP","method":"GET","url":"/nextcloud/index.php/core/preview?fileId=10281&c=d24cf09e707e7542646d99d115104782&x=250& y=250&forceIcon=0","message":"imagettftext(): Problem doing text layout at /var/www/html/nextcloud/lib/private/Preview/TXT.php#91","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.142 Safari/537.36","version":"18.0.4.2"}

I tried this on 3 separate NC accounts: my own local server, Disroot.org and Tab.digital. On the first two the symptoms are the same but Tab.digital behaves differently (maybe a different version of NC server?): the file loads quickly but it opens in some kind of internal editor that is not very useful for editing.

tobiasKaminsky commented 4 years ago

@juliushaertl do you have any idea?

juliushaertl commented 4 years ago

Are you using server-side encryption and you have a master key setup? I think without a master key editing might not work there since the android app is accessing the file without an active user session though a one-time access token.

avalx commented 4 years ago

For me, I'm not using encryption on the server at all.

ghost commented 4 years ago

Same behavior as described by @avalx here, see the detailed "work-around" with downloading, open with, etc. I confirm the exact behavior and options as mentioned above.

Using current Nextcloud mobile app from the Google Play Store on a Motorola One Vision with Android 10. Server: Nextcloud 18.0.4, no encryption server-side

stale[bot] commented 4 years ago

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!

avalx commented 4 years ago

Just wanted to add that with the latest client now I have the same problem with the html files. If I want to open something like bookmarks.html it opens in text mode in the internal viewer even if I have setup to always open html files with my default browser. And again I have to do a lot of "tap actions" to open a html file in my browser. Not very convenient at all!

tobiasKaminsky commented 4 years ago

Just wanted to add that with the latest client now I have the same problem with the html files. If I want to open something like bookmarks.html it opens in text mode in the internal viewer even if I have setup to always open html files with my default browser. And again I have to do a lot of "tap actions" to open a html file in my browser. Not very convenient at all!

This will be fixed via #6775

tobiasKaminsky commented 4 years ago

@juliushaertl for the other bug?

juliushaertl commented 4 years ago

I'm not sure how to continue here. I cannot reproduce this with the latest 18.0.7 release so unless we get an instance where we can reproduce this and have a look at the javascript console of the webview or disable the loading viewer so we can see if the text app is rendered properly in the background I'm out of ideas of what this could be.

avalx commented 4 years ago

Just a suggestion: Maybe you could try this by creating an account at Disrrot.org. I don't know which version of NC server they're running, but this problem is present on all of my 3 devices with NC Client version 3.13.0 (from F-droid repo). They all have Android 10 installed but different versions.

tobiasKaminsky commented 4 years ago

They seem to use 18.0.6… (https://cloud.disroot.org/status.php)

Aspire1Inspire2 commented 4 years ago

Same issue here. Using latest Nextcloud 19.0.1 on the server side and 3.13.0 android client. No encryption on the server. Cannot open txt, md, video, audio files. The progress circle is just circling forever.

Do you need any help reproducing the error?

xpfgsyb commented 4 years ago

My observations on this topic:

My versions:

I hope this information helps.

tobiasKaminsky commented 4 years ago

@juliushaertl any idea? I am a bit lost, as on Android's side I just open up a webview…

juliushaertl commented 3 years ago

I applied for an account on disroot, let's see if I can reproduce on that then once they have approved it.

Maenyx commented 3 years ago

for information, I tried the solution suggested by xpfgsyb my observation is the same : the TXT files does work, if the NC app "text editor" is disabled, server side.

Once this app is enabled, the progress circle is just circling forever. The only way to display the content of a TXT file with the "text" app enabled server side, is to dowload it first to the device and open it from here.

NC 19.0.1 - Android app 3.13.1

stale[bot] commented 3 years ago

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!

avalx commented 3 years ago

Just for additional info:

I installed and instance of ownCloud on the same server and the Android app from F-Droid and there is no such problem with that configuration. If I tap any text file it is instantly opened in the included text editor app. Than if I use Open With and select my own editor of choice, make some changes and save the file it is updated as expected also on the server.

tobiasKaminsky commented 3 years ago

I applied for an account on disroot, let's see if I can reproduce on that then once they have approved it.

Have you tested it? @juliushaertl

@avalx If I understand this issue correct, it is about text app on server. oC does not have this and thus (our?) Android App just uses the regular local editor system…

avalx commented 3 years ago

@avalx If I understand this issue correct, it is about text app on server. oC does not have this and thus (our?) Android App just uses the regular local editor system…

I'm not sure I understand what you're asking about. I just installed oC on my Fedora server (dnf install) and copied some text files over. Then I used the oC client to check those files and they were opened in some kind of editor that looks the same as the one on NC - so my conclusion was that this is a similar app (was I wrong about that?). After that I tap on the "three dots" menu and chose "Open with" to open the same file with my local editor app on the phone (I'm using this one https://f-droid.org/en/packages/org.billthefarmer.editor/).

Hope this makes sense, if not I can try and make a video of usage on my phone.

juliushaertl commented 3 years ago

Have you tested it? @juliushaertl

I think i never received a mail for the account, not sure if something went wrong there. I'm happy to look into it again if someone can provide me with a test account.

If the same editor opens up with the Nextcloud and owncloud client this is most likely not the text app itself that is causing issues then.

seese commented 2 years ago

The same happens to me with Nextcloud 22 and Android 3.17.1 on a test-installation with a self-created CA-authority.

As long as the CA-certificate is not installed in the systems certificate store, text files cannot be loaded.

It is not enough to confirm the warning message when logging in. You have to install the certificate.

meonkeys commented 1 year ago

I'm seeing this with Nextcloud 24.0.7 server and Android client 3.22.3 installed from the Aurora store. I am not using server-side Nextcloud encryption, not using a self-signed cert. Nothing relevant in the server logs. #9536 and #9771 look similar. The sync / open with / Markor workaround seems to work for me but it is difficult to convince users on my instance to use that workaround.