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

Beta20161224: files don't get downloaded properly when SD card storage is selected #476

Closed
elpraga opened this issue Dec 27, 2016 · 38 comments
Assignees

Comments

@elpraga
Copy link

elpraga commented Dec 27, 2016

Actual behaviour

When external storage is selected, files fail to download. They do get downloaded to the tmp folder in the main storage, but they don't get transferred to the SD card and download ends with Failed message.

Expected behaviour

Files should get downloaded to the SD card

Steps to reproduce

  1. Set SD card as the storage
  2. Try to download a file.

Environment data

Android version: 6.0

Device model: Huawei Y6II

Stock or customized system:
Stock

@elpraga elpraga changed the title Beta20161224 Beta20161224: files don't get downloaded properly when SD card storage is selected Dec 27, 2016
@AndyScherzinger
Copy link
Member

Hi @elpraga do you see any error regarding it in the clients log?

@elpraga
Copy link
Author

elpraga commented Dec 27, 2016

I don't know anything about Android apps, but I just noticed there is a mention to com.android.owncloud...

I also have the official ownCloud (not nextCloud) app installed.

@AndyScherzinger
Copy link
Member

The error seems to be this line:

DownloadFileOperation : Download of /Documentos/España/Sevilla/Librería/IMG_20161202_143246.jpg to /storage/D805-1DED/Android/data/com.nextcloud.android.beta/files/nextcloud/tomas@elpraga.no-ip.biz%3A1943%2Fowncloud/Documentos/España/Sevilla/Librería/IMG_20161202_143246.jpg: Error while moving file to final directory

can you check if you have the following folder structure on your device:

/storage/D805-1DED/Android/data/com.nextcloud.android.beta/files/nextcloud/tomas@elpraga.no-ip.biz%3A1943%2Fowncloud/

which would then be the apps file root folder.

@elpraga
Copy link
Author

elpraga commented Dec 27, 2016

This might be the preferable way to add the log I guess..

currentLog.txt

@elpraga
Copy link
Author

elpraga commented Dec 27, 2016

Yes @AndyScherzinger I do. In fact when I move manually the files to the location in SD card, I can see them in the application without any problems.

@elpraga
Copy link
Author

elpraga commented Dec 27, 2016

Maybe some issues with writing to the SD card. Could the broadcast to com.android.owncloud... Be the cause?

Please let me know if I can add other useful info..

@elpraga
Copy link
Author

elpraga commented Dec 27, 2016

It just occurred to me that the escape characters might cause done problems, but I just tried

cd /storage/D805-1DED/Android/data/com.nextcloud.android.beta/files/nextcloud/tomas@elpraga.no-ip.biz%3A1943%2Fowncloud/

in a terminal and I got there without any problems

@elpraga
Copy link
Author

elpraga commented Dec 27, 2016

Two observations:

1

The application does create the appropriate folder structure on the SD card.

2

The temp file is located in
/storage/emulated/0/nextcloud/tmp

But the log is located in
/storage/emulated/0/nextcloudbeta/log

Could it be possible that the app is trying to copy the file from a wrong direction (expecting it to be in the nextcloudbeta folder)?

What do you think @AndyScherzinger ?

@AndyScherzinger
Copy link
Member

ooooouuh.... Yeah, my guess would be that it should be /storage/emulated/0/nextcloudbeta/tmp What do you think @tobiasKaminsky @przybylski ?

@elpraga
Copy link
Author

elpraga commented Dec 28, 2016

Thinking about it a little bit more.. shouldn't the tmp directory be located on the SD card as well, when SD card is selected as the storage path? The current solution might bring a surprise when you're his try to download a large file with not enough space on the internal storage, but plenty of free space on the SD card.

Is there any real reason for the temp directory being on the internal storage?

@elpraga
Copy link
Author

elpraga commented Dec 28, 2016

Can you reproduce the error?

@OlivierS1
Copy link

Having same issue with Nextcloud Beta 20161231.
Storage on SD card.
Some files gets downloaded if I select them once at a time, but as soon as I select the upper folder and do "Synchronize" then downloads start failing.
I am not certain this step is what's causing the issue though.

@elpraga
Copy link
Author

elpraga commented Jan 2, 2017

I upgraded my server to NC11 and downloaded NC android app.

I can confirm that downloading files con NC official app work fine even when SD card storage is selected.

The app also uses SD card to store the tmp files.

Maybe just some mismatch when building the Beta app?

@elpraga
Copy link
Author

elpraga commented Jan 11, 2017

@tobiasKaminsky were you able to reproduce this? I would guess you use the files on SD card as well..

@OlivierS1
Copy link

Nextcloud Beta 20170111 broke SD card download again.
It seems it was working fine with 20170106 or 20170109.

@elpraga
Copy link
Author

elpraga commented Jan 14, 2017

Are there any news regarding this issue?

@AndyScherzinger
Copy link
Member

Not yet. Tobias is on vacation and I am ill which completely knocks me out at the moment :(

@elpraga
Copy link
Author

elpraga commented Jan 15, 2017

Ahh. Get well soon then! 👍 ;-)

@elpraga
Copy link
Author

elpraga commented Jan 28, 2017

Beta20170122 still fails to download files correctly. Were you able to identify why @tobiasKaminsky?

@tobiasKaminsky
Copy link
Member

Sorry currently I do not have a device with an external sdcard.
@mario do you have such a device?

@elpraga
Copy link
Author

elpraga commented Jan 29, 2017

@tobiasKaminsky the issue seems to be that when the SD card is selected as storage, the BETA app still creates the tmp directory in the main storage. I assume that is en error, and then the app searches for the tmp file on the SD card and doesn't find it. Hance it reports an error.

If you were willing just like look into this behavior, I'll be willing to test it then..

@mario
Copy link
Contributor

mario commented Jan 29, 2017

@tobiasKaminsky I'll take a look cc @elpraga, I do have such a device.

@bekl101
Copy link

bekl101 commented Feb 6, 2017

still the same problem in beta 20170206. App logs in directory "nextcloudbeta" and the temporary file resides in "nextcloud" at internal storage. No file can be stored in the selected directory at the SD-Card.
download crashes.

@bekl101
Copy link

bekl101 commented Feb 8, 2017

tested with beta 20170208, same behavior as described above. (SGS7 Android 7.0 VD2)

@mario
Copy link
Contributor

mario commented Feb 8, 2017

@bekl101 I didn't touch this part and it's unlikely I'll be able to touch it for 1.4.2 :( Maybe later - sorry!

@mario mario self-assigned this Feb 8, 2017
@bekl101
Copy link

bekl101 commented Feb 8, 2017

@mario
doesn´t matter.
i wonder because this function was ok in the stable release.

@mario
Copy link
Contributor

mario commented Feb 8, 2017

Well, that is strange then ... @AndyScherzinger any more insights since you last wrote here? :)

@elpraga
Copy link
Author

elpraga commented Feb 8, 2017

@mario I can confirm that it is working in the stable release. In my opinion, it is a mishap with the paths where temp files are created. The Beta app most likely creates the tmp file somewhere and looks for it somewhere else.

I guess it should be very easy to fix just by checking where the tmp file is created when SD card is selected as storage (it should be created on the SD card, not in the main storage).

It would be great if you could have a look at it soon (at least a quick one to see if it is really as simple to fix as I think), because it is extremely inconvenient not to be able to download the files properly. Between the stable app that is slow as it has to redownload the previews over and over again due to small cache size and this error, it is much more difficult to access the files on the server than it was before.

@mario
Copy link
Contributor

mario commented Feb 8, 2017

@elpraga I wonder if the issue is specific to the beta app ... maybe once we release this'll automagically work :)

But ok, I'll try to check.

@bekl101
Copy link

bekl101 commented Feb 8, 2017

i agree with elpraga
it seems not to be an issue which is specific for an android version becaus he uses 6.0 and my mobile has 7.0.
Maybe only typo or little mismatch or only the word "beta" in app and filepath
in my opinion its ab big restriction for me too.

@tobiasKaminsky
Copy link
Member

@przybylski can you shed us some light here? :)

@mario
Copy link
Contributor

mario commented Feb 13, 2017

@tobiasKaminsky I fixed this. The issue was only in beta because some things weren't merged properly ages ago. Whenever we build new beta (tomorrow?) this will be fixed! Thank you @bekl101 and @elpraga for the patience!

@mario mario closed this as completed Feb 13, 2017
@elpraga
Copy link
Author

elpraga commented Feb 13, 2017

That would be great news @mario ! Thank you so much! I will confirm that it is working as soon as you release a new beta.

@bekl101
Copy link

bekl101 commented Feb 13, 2017

@mario
i agree with elpraga. Good news. I will test it too.

@mario
Copy link
Contributor

mario commented Feb 13, 2017

@bekl101
Copy link

bekl101 commented Feb 13, 2017

Only a short review. Download latest.apk, fresh install.
Selected files were transfered correct fom NC to SD-Card on my phone.
No error or other issues i can see for now.
Very good work. thanks

@elpraga
Copy link
Author

elpraga commented Feb 13, 2017

Great @mario ! The second Beta20170213 is working again! Files can be downloaded! Thanks a lot mate! 😄 👍

@mario
Copy link
Contributor

mario commented Feb 13, 2017

Glad it's working for you folks! ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants