Have some problem with SFTP external storage in Android App

Nextcloud version (eg, 20.0.5): Linuxserver/Nextcloud Docker Image (Latest) 21.0.2
Operating system and version : Synology DSM 6.2.4
nginx version : Use Docker Linuxserver/Nextcloud image nginx (Latest)
PHP version : 7.4.19
Android App version : Get source code from github and Build

The issue you are facing:

But the problem occurred in the app. I modified the app little by little with Android Studio for convenience, but I didn’t modify the core part at all, but only the translated part.

I’m using SFTP as an External Storage app, and once I connect to the Github built app, I need to refresh it (drag the screen from top to bottom) to load the files normally.

I downloaded the Nextcloud app on the PlayStore and logged in the same way, where files load well at once without dragging.

I checked the log in the Admin panel and found that PHP error below occurs whenever I try to refresh the built app. There will be no difference between the APK file built with the source code imported from Github and the installation file in the Playstore, so I wonder why this problem occurs.

Is this the first time you’ve seen this error? (Y/N): Yes

Steps to replicate it:

  1. Download Nextcloud App source code from Github
  2. Build it in Android Studio and install to any phone or emulators
  3. After login, SFTP folders loads infinity, but it loads when I refresh with drag action.

The output of your Nextcloud log in Admin > Logging:

Error	PHP	Error: Undefined index: size at /config/www/nextcloud/apps/files_external/lib/Lib/Storage/SFTP.php#458
/config/www/nextcloud/apps/files_external/lib/Lib/Storage/SFTP.php - line 458:

OC\Log\ErrorHandler::onError()

/config/www/nextcloud/lib/private/Files/Storage/Common.php - line 187:

OCA\Files_External\Lib\Storage\SFTP->stat()

/config/www/nextcloud/lib/private/Files/Storage/Common.php - line 712:

OC\Files\Storage\Common->filemtime()

/config/www/nextcloud/lib/private/Files/Storage/Wrapper/Wrapper.php - line 581:

OC\Files\Storage\Common->getMetaData()

/config/www/nextcloud/lib/private/Files/Storage/Wrapper/PermissionsMask.php - line 141:

OC\Files\Storage\Wrapper\Wrapper->getMetaData()

/config/www/nextcloud/lib/private/Files/Storage/Wrapper/Wrapper.php - line 581:

OC\Files\Storage\Wrapper\PermissionsMask->getMetaData()

/config/www/nextcloud/lib/private/Files/Storage/Wrapper/Availability.php - line 444:

OC\Files\Storage\Wrapper\Wrapper->getMetaData()

/config/www/nextcloud/lib/private/Files/Storage/Wrapper/Wrapper.php - line 581:

OC\Files\Storage\Wrapper\Availability->getMetaData()

/config/www/nextcloud/lib/private/Files/Cache/Scanner.php - line 115:

OC\Files\Storage\Wrapper\Wrapper->getMetaData()

/config/www/nextcloud/lib/private/Files/Cache/Scanner.php - line 153:

OC\Files\Cache\Scanner->getData()

/config/www/nextcloud/lib/private/Files/Cache/Scanner.php - line 339:

OC\Files\Cache\Scanner->scanFile()

/config/www/nextcloud/lib/private/Files/View.php - line 1346:

OC\Files\Cache\Scanner->scan()

/config/www/nextcloud/lib/private/Files/View.php - line 1451:

OC\Files\View->getCacheEntry()

/config/www/nextcloud/apps/dav/lib/Connector/Sabre/Directory.php - line 265:

OC\Files\View->getDirectoryContent()

/config/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Tree.php - line 200:

OCA\DAV\Connector\Sabre\Directory->getChildren()

/config/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php - line 900:

Sabre\DAV\Tree->getChildren()

/config/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php - line 982:

Sabre\DAV\Server->generatePathNodes()

/config/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php - line 1661:

Sabre\DAV\Server->getPropertiesIteratorForPath()

/config/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php - line 1646:

Sabre\DAV\Server->writeMultiStatus()

/config/www/nextcloud/3rdparty/sabre/dav/lib/DAV/CorePlugin.php - line 346:

Sabre\DAV\Server->generateMultiStatus()

/config/www/nextcloud/3rdparty/sabre/event/lib/WildcardEmitterTrait.php - line 89:

Sabre\DAV\CorePlugin->httpPropFind()

/config/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php - line 472:

Sabre\DAV\Server->emit()

/config/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php - line 253:

Sabre\DAV\Server->invokeMethod()

/config/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php - line 321:

Sabre\DAV\Server->start()

/config/www/nextcloud/apps/dav/appinfo/v1/webdav.php - line 84:

Sabre\DAV\Server->exec()

/config/www/nextcloud/remote.php - line 167:

require_once("/config/www ... p")

	2021-06-08T16:23:38+0900
Error	PHP	Error: Undefined index: mtime at /config/www/nextcloud/apps/files_external/lib/Lib/Storage/SFTP.php#457
/config/www/nextcloud/apps/files_external/lib/Lib/Storage/SFTP.php - line 457:

OC\Log\ErrorHandler::onError()

/config/www/nextcloud/lib/private/Files/Storage/Common.php - line 187:

OCA\Files_External\Lib\Storage\SFTP->stat()

/config/www/nextcloud/lib/private/Files/Storage/Common.php - line 712:

OC\Files\Storage\Common->filemtime()

/config/www/nextcloud/lib/private/Files/Storage/Wrapper/Wrapper.php - line 581:

OC\Files\Storage\Common->getMetaData()

/config/www/nextcloud/lib/private/Files/Storage/Wrapper/PermissionsMask.php - line 141:

OC\Files\Storage\Wrapper\Wrapper->getMetaData()

/config/www/nextcloud/lib/private/Files/Storage/Wrapper/Wrapper.php - line 581:

OC\Files\Storage\Wrapper\PermissionsMask->getMetaData()

/config/www/nextcloud/lib/private/Files/Storage/Wrapper/Availability.php - line 444:

OC\Files\Storage\Wrapper\Wrapper->getMetaData()

/config/www/nextcloud/lib/private/Files/Storage/Wrapper/Wrapper.php - line 581:

OC\Files\Storage\Wrapper\Availability->getMetaData()

/config/www/nextcloud/lib/private/Files/Cache/Scanner.php - line 115:

OC\Files\Storage\Wrapper\Wrapper->getMetaData()

/config/www/nextcloud/lib/private/Files/Cache/Scanner.php - line 153:

OC\Files\Cache\Scanner->getData()

/config/www/nextcloud/lib/private/Files/Cache/Scanner.php - line 339:

OC\Files\Cache\Scanner->scanFile()

/config/www/nextcloud/lib/private/Files/View.php - line 1346:

OC\Files\Cache\Scanner->scan()

/config/www/nextcloud/lib/private/Files/View.php - line 1451:

OC\Files\View->getCacheEntry()

/config/www/nextcloud/apps/dav/lib/Connector/Sabre/Directory.php - line 265:

OC\Files\View->getDirectoryContent()

/config/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Tree.php - line 200:

OCA\DAV\Connector\Sabre\Directory->getChildren()

/config/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php - line 900:

Sabre\DAV\Tree->getChildren()

/config/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php - line 982:

Sabre\DAV\Server->generatePathNodes()

/config/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php - line 1661:

Sabre\DAV\Server->getPropertiesIteratorForPath()

/config/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php - line 1646:

Sabre\DAV\Server->writeMultiStatus()

/config/www/nextcloud/3rdparty/sabre/dav/lib/DAV/CorePlugin.php - line 346:

Sabre\DAV\Server->generateMultiStatus()

/config/www/nextcloud/3rdparty/sabre/event/lib/WildcardEmitterTrait.php - line 89:

Sabre\DAV\CorePlugin->httpPropFind()

/config/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php - line 472:

Sabre\DAV\Server->emit()

/config/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php - line 253:

Sabre\DAV\Server->invokeMethod()

/config/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php - line 321:

Sabre\DAV\Server->start()

/config/www/nextcloud/apps/dav/appinfo/v1/webdav.php - line 84:

Sabre\DAV\Server->exec()

/config/www/nextcloud/remote.php - line 167:

require_once("/config/www ... p")

The output of your Apache/nginx/system log in /var/log/____:

2021/06/08 11:35:33 [error] 404#404: *250 FastCGI sent in stderr: "PHP message: richdocumentscode (proxy.php) error exit, PID: 450, Message: no_glibc" while reading upstream, client: 192.168.0.1, server: _, request: "POST /apps/richdocumentscode/proxy.php?req=/lool/convert-to/png HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "{MY HOST URL}"
2021/06/08 11:35:33 [error] 403#403: *252 FastCGI sent in stderr: "PHP message: richdocumentscode (proxy.php) error exit, PID: 450, Message: no_glibc" while reading upstream, client: 192.168.0.1, server: _, request: "POST /apps/richdocumentscode/proxy.php?req=/lool/convert-to/png HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "{MY HOST URL}"
2021/06/08 11:36:13 [alert] 404#404: *375 peer closed connection in SSL handshake (22: Invalid argument) while SSL handshaking, client: 172.17.0.1, server: 0.0.0.0:443
2021/06/08 11:36:15 [error] 403#403: *519 FastCGI sent in stderr: "PHP message: richdocumentscode (proxy.php) error exit, PID: 485, Message: no_glibc" while reading upstream, client: 192.168.0.1, server: _, request: "POST /apps/richdocumentscode/proxy.php?req=/lool/convert-to/png HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "{MY HOST URL}"
2021/06/08 11:36:15 [error] 403#403: *521 FastCGI sent in stderr: "PHP message: richdocumentscode (proxy.php) error exit, PID: 485, Message: no_glibc" while reading upstream, client: 192.168.0.1, server: _, request: "POST /apps/richdocumentscode/proxy.php?req=/lool/convert-to/png HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "{MY HOST URL}"
2021/06/08 11:36:15 [error] 404#404: *523 FastCGI sent in stderr: "PHP message: richdocumentscode (proxy.php) error exit, PID: 485, Message: no_glibc" while reading upstream, client: 192.168.0.1, server: _, request: "POST /apps/richdocumentscode/proxy.php?req=/lool/convert-to/png HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "{MY HOST URL}"
2021/06/08 11:36:39 [error] 404#404: *591 FastCGI sent in stderr: "PHP message: richdocumentscode (proxy.php) error exit, PID: 485, Message: no_glibc" while reading upstream, client: 192.168.0.1, server: _, request: "POST /apps/richdocumentscode/proxy.php?req=/lool/convert-to/png HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "{MY HOST URL}"
2021/06/08 11:36:39 [error] 401#401: *593 FastCGI sent in stderr: "PHP message: richdocumentscode (proxy.php) error exit, PID: 485, Message: no_glibc" while reading upstream, client: 192.168.0.1, server: _, request: "POST /apps/richdocumentscode/proxy.php?req=/lool/convert-to/png HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "{MY HOST URL}"
2021/06/08 11:48:23 [error] 404#404: *1359 FastCGI sent in stderr: "PHP message: richdocumentscode (proxy.php) error exit, PID: 523, Message: no_glibc" while reading upstream, client: 192.168.0.1, server: _, request: "POST /apps/richdocumentscode/proxy.php?req=/lool/convert-to/png HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "{MY HOST URL}"
2021/06/08 11:48:24 [error] 404#404: *1377 FastCGI sent in stderr: "PHP message: richdocumentscode (proxy.php) error exit, PID: 492, Message: no_glibc" while reading upstream, client: 192.168.0.1, server: _, request: "POST /apps/richdocumentscode/proxy.php?req=/lool/convert-to/png HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "{MY HOST URL}"
2021/06/08 11:48:24 [error] 404#404: *1381 FastCGI sent in stderr: "PHP message: richdocumentscode (proxy.php) error exit, PID: 485, Message: no_glibc" while reading upstream, client: 192.168.0.1, server: _, request: "POST /apps/richdocumentscode/proxy.php?req=/lool/convert-to/png HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "{MY HOST URL}"
2021/06/08 11:48:24 [error] 401#401: *1383 FastCGI sent in stderr: "PHP message: richdocumentscode (proxy.php) error exit, PID: 485, Message: no_glibc" while reading upstream, client: 192.168.0.1, server: _, request: "POST /apps/richdocumentscode/proxy.php?req=/lool/convert-to/png HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "{MY HOST URL}"
2021/06/08 11:48:43 [error] 403#403: *1424 FastCGI sent in stderr: "PHP message: richdocumentscode (proxy.php) error exit, PID: 523, Message: no_glibc" while reading upstream, client: 192.168.0.1, server: _, request: "POST /apps/richdocumentscode/proxy.php?req=/lool/convert-to/png HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "{MY HOST URL}"
2021/06/08 11:48:43 [error] 404#404: *1426 FastCGI sent in stderr: "PHP message: richdocumentscode (proxy.php) error exit, PID: 523, Message: no_glibc" while reading upstream, client: 192.168.0.1, server: _, request: "POST /apps/richdocumentscode/proxy.php?req=/lool/convert-to/png HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "{MY HOST URL}"
2021/06/08 11:48:52 [error] 404#404: *1478 FastCGI sent in stderr: "PHP message: richdocumentscode (proxy.php) error exit, PID: 517, Message: no_glibc" while reading upstream, client: 192.168.0.1, server: _, request: "POST /apps/richdocumentscode/proxy.php?req=/lool/convert-to/png HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "{MY HOST URL}"
2021/06/08 11:49:01 [error] 404#404: *1490 FastCGI sent in stderr: "PHP message: richdocumentscode (proxy.php) error exit, PID: 523, Message: no_glibc" while reading upstream, client: 192.168.0.1, server: _, request: "POST /apps/richdocumentscode/proxy.php?req=/lool/convert-to/png HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "{MY HOST URL}"
2021/06/08 11:49:09 [error] 404#404: *1508 FastCGI sent in stderr: "PHP message: richdocumentscode (proxy.php) error exit, PID: 523, Message: no_glibc" while reading upstream, client: 192.168.0.1, server: _, request: "POST /apps/richdocumentscode/proxy.php?req=/lool/convert-to/png HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "{MY HOST URL}"