Still issue: Can't get app storage, app files_external, user not logged in

When using sftp I am getting the following error:
“Can’t get app storage, app files_external, user not logged in”

I am using NC 27.02 and I guess the issue is not new. Any ideas how to get this problem solved?

1 Like

What are you doing, specifically, when you see this error message?

Is this from the Web UI or from a mobile/desktop client?

And what is your authentication mode for the External Storage mount?

I believe that particular error should only come up if either your user isn’t in the allowed groups for the files_external app (if it’s been restricted) or if you’re not fully authenticated into NC.

The message “Can’t get app storage, app files_external, user not logged in” is reported every 5 Minutes (cron job) in the protocoll file (see picture).

I mounted a folder from my NAS via SFTP with the login and password of my NAS.

I have been seeing behavior too. All my external storage is SFTP. I have been unable to track down which “user” it is complaining about.

Here is a an excerpt from the log.

{“reqId”:“7hC7plYXeSDU50aDf3ix”,“level”:3,“time”:“2023-10-23T12:30:53-05:00”,“remoteAddr”:“”,“user”:“–”,“app”:“core”,“method”:“”,“url”:“–”,“message”:“Can’t get app storage, app files_external, user not logged in”,“userAgent”:“–”,“version”:“27.1.2.1”,“data”:{“app”:“core”}}

I also have the same problem and I have no idea how to fix it. I can regularly access my SFTP external storage, but I still get my log clogged with this error message twice every 15-20 minutes.

{"reqId":"uKvGcvdPdH0LPYLQb9Gi","level":3,"time":"2023-11-09T16:25:03+00:00","remoteAddr":"","user":"--","app":"core","method":"","url":"--","message":"Can't get app storage, app files_external, user not logged in","userAgent":"--","version":"27.1.3.2","data":{"app":"core"},"id":"654d07dfbc521"}

Any idea what to do to debug it?

Got exactly the same error, mounted a folder from my NAS via SFTP with user/password. Nextcloud release is 28.0.1. Access to mounted folder works but error message appears every 5 minutes in log. Seems, that cron-job tries to do something in the mounted folder.

Aren’t there any ideas?

1 Like

Nextcloud Hub 7 (28.0.1) Docker, Ubuntu 22.04 in a Hyper-V VM

You are not alone, my log is spammed by this message, sftp too

sftp access work like a charm, and no error in the sftp server software, tried some custom and change, but not lucky for now :frowning:

I had the same problem and I figured out the reason, at least for my installation.

When I configured my external SFTP storage, I made a few mistakes, like not entering the non-standard port I was using correctly. This old configuration that I changed during setup and never used is not visible in the webUI, but it’s still in the database, specifically in the oc_storages table.

After I removed those, I stopped getting the error in my logs.

The external storage app should probably have cleaned this up automatically, but didn’t.

1 Like

Seem interesting solution !

Do you have the occ command line available ? Thanks !

EDIT : i am in docker version, with a MariaDB docker.

This is far what i found :

docker exec -it nextcloud_bdd /bin/bash   # edit bash command inside mariadb docker
mariadb -uroot -p                         # log into mariadb as root
use nextcloud;                            # select database
select * from oc_storages;                # show oc_storage

image

Why line 4 have // and line 11 have /// ?
11 seem to be an error, confirmed by available = 0
And it seem that 12 to 14 are very strange like orphan information…

can i securely delete 11 to 14 ?

I think nextcloud adds a / after the path, so if you entered one, you get two :slight_smile:
11 is ftp, not sftp (SSH File transfer protocol). If that’s not what you intended, you can safely remove it if it’s not showing up in the WebUI, especially since it’s not working.

I have no idea what 12-14 is, so I wouldn’t touch them.

Also, I spoke too soon. The errors came back after a short nap, so I still get the errors “[core] Error: Can’t get app storage, app files_external, user not logged in” twice every 10 minutes.

1 Like

Thanks, will try this.

Here is my current workarround :

/5 * * * * sed -i '/Can'\''t get app storage/d' /home/docker/nextcloud/data/nextcloud.log

I have the same issue. The drives on sFTP are set to sleep if not used for 10 minutes. May this be the problem?

I am using nextcloud over docker-compose.

i am having the same errors in my log after attaching sftp storage with the external storage app.

It all works and so on but i get theese errors all the time.

A solution to how to remedy it would be nice.

I am using the lsio docker version of Nextcloud.

1 Like

Since there’s no stack trace, you may be able to get a backtrace by temporarily (because it’ll generate a lot of logs) adding log.backtrace => true, to your config.php. Then wait for the error to be triggered. Once it’s triggered you can remove the option from your config. The stack trace may provide the hints needed to track this down.

Has anyone opend an issue on this already?
I get the same error and it could easily be the drives going to sleep / sleeping. It appeared in one of the later versions and wasn’t there from when I added the external drives. (have been updating NC continously).

Edit:
Here: [Bug]: Can't get app storage, app files_external, user not logged in · Issue #38940 · nextcloud/server · GitHub