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

Image uplaod not working #883

Closed
bellegarde-c opened this issue Mar 13, 2021 · 29 comments
Closed

Image uplaod not working #883

bellegarde-c opened this issue Mar 13, 2021 · 29 comments

Comments

@bellegarde-c
Copy link

Looks like it fails to access my photos:

OS : LineageOS 17.1

03-13 16:14:34.368 28394 28458 W System.err: java.io.FileNotFoundException: /storage/emulated/0/DCIM/Camera/IMG_20210220_164313.jpg: open failed: EACCES (Permission denied)
03-13 16:14:34.368 28394 28458 W System.err: 	at libcore.io.IoBridge.open(IoBridge.java:496)
03-13 16:14:34.368 28394 28458 W System.err: 	at java.io.FileInputStream.<init>(FileInputStream.java:159)
03-13 16:14:34.368 28394 28458 W System.err: 	at okio.Okio.source(Okio.java:167)
03-13 16:14:34.368 28394 28458 W System.err: 	at com.seafile.seadroid2.httputils.RequestManager$1.writeTo(RequestManager.java:108)
03-13 16:14:34.368 28394 28458 W System.err: 	at okhttp3.MultipartBody.writeOrCountBytes(MultipartBody.java:173)
03-13 16:14:34.369 28394 28458 W System.err: 	at okhttp3.MultipartBody.writeTo(MultipartBody.java:114)
03-13 16:14:34.369 28394 28458 W System.err: 	at okhttp3.internal.http.CallServerInterceptor.intercept(CallServerInterceptor.java:72)
03-13 16:14:34.369 28394 28458 W System.err: 	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147)
03-13 16:14:34.369 28394 28458 W System.err: 	at okhttp3.internal.connection.ConnectInterceptor.intercept(ConnectInterceptor.java:45)
03-13 16:14:34.369 28394 28458 W System.err: 	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147)
03-13 16:14:34.369 28394 28458 W System.err: 	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:121)
03-13 16:14:34.369 28394 28458 W System.err: 	at okhttp3.internal.cache.CacheInterceptor.intercept(CacheInterceptor.java:93)
03-13 16:14:34.369 28394 28458 W System.err: 	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147)
03-13 16:14:34.369 28394 28458 W System.err: 	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:121)
03-13 16:14:34.369 28394 28458 W System.err: 	at okhttp3.internal.http.BridgeInterceptor.intercept(BridgeInterceptor.java:93)
03-13 16:14:34.369 28394 28458 W System.err: 	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147)
03-13 16:14:34.369 28394 28458 W System.err: 	at okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.java:125)
03-13 16:14:34.369 28394 28458 W System.err: 	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147)
03-13 16:14:34.369 28394 28458 W System.err: 	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:121)
03-13 16:14:34.369 28394 28458 W System.err: 	at com.seafile.seadroid2.httputils.RequestManager$LoggingInterceptor.intercept(RequestManager.java:71)
03-13 16:14:34.369 28394 28458 W System.err: 	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147)
03-13 16:14:34.369 28394 28458 W System.err: 	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:121)
03-13 16:14:34.369 28394 28458 W System.err: 	at okhttp3.RealCall.getResponseWithInterceptorChain(RealCall.java:200)
03-13 16:14:34.369 28394 28458 W System.err: 	at okhttp3.RealCall.execute(RealCall.java:77)
03-13 16:14:34.369 28394 28458 W System.err: 	at com.seafile.seadroid2.SeafConnection.uploadFileCommon(SeafConnection.java:914)
03-13 16:14:34.369 28394 28458 W System.err: 	at com.seafile.seadroid2.SeafConnection.uploadFile(SeafConnection.java:884)
03-13 16:14:34.369 28394 28458 W System.err: 	at com.seafile.seadroid2.data.DataManager.uploadFileCommon(DataManager.java:711)
03-13 16:14:34.369 28394 28458 W System.err: 	at com.seafile.seadroid2.data.DataManager.uploadFile(DataManager.java:705)
03-13 16:14:34.369 28394 28458 W System.err: 	at com.seafile.seadroid2.transfer.UploadTask.doInBackground(UploadTask.java:95)
03-13 16:14:34.370 28394 28458 W System.err: 	at com.seafile.seadroid2.transfer.UploadTask.doInBackground(UploadTask.java:23)
03-13 16:14:34.370 28394 28458 W System.err: 	at android.os.AsyncTask$3.call(AsyncTask.java:378)
03-13 16:14:34.370 28394 28458 W System.err: 	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
03-13 16:14:34.370 28394 28458 W System.err: 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
03-13 16:14:34.370 28394 28458 W System.err: 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
03-13 16:14:34.370 28394 28458 W System.err: 	at java.lang.Thread.run(Thread.java:919)
03-13 16:14:34.370 28394 28458 W System.err: Caused by: android.system.ErrnoException: open failed: EACCES (Permission denied)
03-13 16:14:34.370 28394 28458 W System.err: 	at libcore.io.Linux.open(Native Method)
03-13 16:14:34.370 28394 28458 W System.err: 	at libcore.io.ForwardingOs.open(ForwardingOs.java:167)
03-13 16:14:34.370 28394 28458 W System.err: 	at libcore.io.BlockGuardOs.open(BlockGuardOs.java:252)
03-13 16:14:34.370 28394 28458 W System.err: 	at libcore.io.ForwardingOs.open(ForwardingOs.java:167)
03-13 16:14:34.370 28394 28458 W System.err: 	at android.app.ActivityThread$AndroidOs.open(ActivityThread.java:7255)
03-13 16:14:34.370 28394 28458 W System.err: 	at libcore.io.IoBridge.open(IoBridge.java:482)
03-13 16:14:34.370 28394 28458 W System.err: 	... 34 more
03-13 16:14:34.372 28394 28458 E UploadTask: Upload exception unexpected end of stream
03-13 16:14:34.372 28394 28458 W System.err: java.net.ProtocolException: unexpected end of stream
03-13 16:14:34.373 28394 28458 W System.err: 	at okhttp3.internal.http1.Http1Codec$FixedLengthSink.close(Http1Codec.java:304)
03-13 16:14:34.373 28394 28458 W System.err: 	at okio.ForwardingSink.close(ForwardingSink.java:47)
03-13 16:14:34.373 28394 28458 W System.err: 	at okio.RealBufferedSink.close(RealBufferedSink.java:236)
03-13 16:14:34.373 28394 28458 W System.err: 	at okhttp3.internal.http.CallServerInterceptor.intercept(CallServerInterceptor.java:73)
03-13 16:14:34.373 28394 28458 W System.err: 	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147)
03-13 16:14:34.373 28394 28458 W System.err: 	at okhttp3.internal.connection.ConnectInterceptor.intercept(ConnectInterceptor.java:45)
03-13 16:14:34.373 28394 28458 W System.err: 	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147)
03-13 16:14:34.373 28394 28458 W System.err: 	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:121)
03-13 16:14:34.373 28394 28458 W System.err: 	at okhttp3.internal.cache.CacheInterceptor.intercept(CacheInterceptor.java:93)
03-13 16:14:34.373 28394 28458 W System.err: 	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147)
03-13 16:14:34.373 28394 28458 W System.err: 	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:121)
03-13 16:14:34.373 28394 28458 W System.err: 	at okhttp3.internal.http.BridgeInterceptor.intercept(BridgeInterceptor.java:93)
03-13 16:14:34.373 28394 28458 W System.err: 	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147)
03-13 16:14:34.373 28394 28458 W System.err: 	at okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.java:125)
03-13 16:14:34.373 28394 28458 W System.err: 	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147)
03-13 16:14:34.373 28394 28458 W System.err: 	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:121)
03-13 16:14:34.373 28394 28458 W System.err: 	at com.seafile.seadroid2.httputils.RequestManager$LoggingInterceptor.intercept(RequestManager.java:71)
03-13 16:14:34.373 28394 28458 W System.err: 	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147)
03-13 16:14:34.373 28394 28458 W System.err: 	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:121)
03-13 16:14:34.373 28394 28458 W System.err: 	at okhttp3.RealCall.getResponseWithInterceptorChain(RealCall.java:200)
03-13 16:14:34.373 28394 28458 W System.err: 	at okhttp3.RealCall.execute(RealCall.java:77)
03-13 16:14:34.373 28394 28458 W System.err: 	at com.seafile.seadroid2.SeafConnection.uploadFileCommon(SeafConnection.java:914)
03-13 16:14:34.373 28394 28458 W System.err: 	at com.seafile.seadroid2.SeafConnection.uploadFile(SeafConnection.java:884)
03-13 16:14:34.373 28394 28458 W System.err: 	at com.seafile.seadroid2.data.DataManager.uploadFileCommon(DataManager.java:711)
03-13 16:14:34.373 28394 28458 W System.err: 	at com.seafile.seadroid2.data.DataManager.uploadFile(DataManager.java:705)
03-13 16:14:34.374 28394 28458 W System.err: 	at com.seafile.seadroid2.transfer.UploadTask.doInBackground(UploadTask.java:95)
03-13 16:14:34.374 28394 28458 W System.err: 	at com.seafile.seadroid2.transfer.UploadTask.doInBackground(UploadTask.java:23)
03-13 16:14:34.374 28394 28458 W System.err: 	at android.os.AsyncTask$3.call(AsyncTask.java:378)
03-13 16:14:34.374 28394 28458 W System.err: 	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
03-13 16:14:34.374 28394 28458 W System.err: 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
03-13 16:14:34.374 28394 28458 W System.err: 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
03-13 16:14:34.374 28394 28458 W System.err: 	at java.lang.Thread.run(Thread.java:919)

@Ezwen
Copy link

Ezwen commented Mar 29, 2021

Using seadroid 2.2.33, I am also unable to make image upload work. I've tried triggering the sync manually, with no more success than the automated upload that is supposed to work.

@bellegarde-c Could you share with me how you obtained these logs? Are they stored by seadroid on the phone storage?

@bellegarde-c
Copy link
Author

You need to enable adb and then launch adb logcat

@Ezwen
Copy link

Ezwen commented Mar 29, 2021

Thanks, that worked. Unfortunately, I cannot find a similar exception as you, and overall my logs do not contain anything wrong concerning seafile. But automatic image upload still does not work on my device, it seems stuck at "Upload info: Scanning".

@fdisamuel
Copy link

fdisamuel commented Mar 29, 2021

I am on seadroid 2.2.34 (MIUI global 12.0.4) and my upload info status stuck at "scanning" stage too. Automatic image upload does not work for me.

EDIT: It seems image upload is working now , although the scanning stage took way too long ( 10 minute ) so I thought it is stuck.

@Ezwen
Copy link

Ezwen commented Mar 29, 2021

In my case the app has been installed and configured on my phone several days ago (thus much more than 10 min), and unfortunately no photo has been uploaded since then. Whenever I look at the Upload Info, it says either "Scanning" or "Upload waiting" (while when I wrote my previous message I thought it was only stuck at "Scanning").

@maxiaoping
Copy link
Contributor

Please update the latest version

@maxiaoping
Copy link
Contributor

I am on seadroid 2.2.34 (MIUI global 12.0.4) and my upload info status stuck at "scanning" stage too. Automatic image upload does not work for me.

EDIT: It seems image upload is working now , although the scanning stage took way too long ( 10 minute ) so I thought it is stuck.

On the one hand, there are many photos in the album, and it takes time to scan whether the album matches have been backed up. On the other hand, due to the performance of the mobile phone, it is normal for the above to take a lot of time.

@Ezwen
Copy link

Ezwen commented Apr 10, 2021

Please update the latest version

I've upgraded to 2.2.34, but the problem remains.

@maxiaoping
Copy link
Contributor

Please update the latest version

I've upgraded to 2.2.34, but the problem remains.

Delete the local seafile cache directory (under the root directory or /Android/data/com.seafile.seadroid2) and reset the backup file

@fdisamuel
Copy link

I am on seadroid 2.2.34 (MIUI global 12.0.4) and my upload info status stuck at "scanning" stage too. Automatic image upload does not work for me.
EDIT: It seems image upload is working now , although the scanning stage took way too long ( 10 minute ) so I thought it is stuck.

On the one hand, there are many photos in the album, and it takes time to scan whether the album matches have been backed up. On the other hand, due to the performance of the mobile phone, it is normal for the above to take a lot of time.

I understand that it takes time to scan my gallery for changed files, It is just strange to me, that with previous version of the app (Seafile 2.2.31) the scan takes about 1 minute to complete, not 10 (or more).

@Ezwen
Copy link

Ezwen commented Apr 10, 2021

Please update the latest version

I've upgraded to 2.2.34, but the problem remains.

Delete the local seafile cache directory (under the root directory or /Android/data/com.seafile.seadroid2) and reset the backup file

I have deleted the seafile cache directory, but the problem remains.

Could you tell me what you mean by "reset the backup file"?

@maxiaoping
Copy link
Contributor

Please update the latest version

I've upgraded to 2.2.34, but the problem remains.

Delete the local seafile cache directory (under the root directory or /Android/data/com.seafile.seadroid2) and reset the backup file

I have deleted the seafile cache directory, but the problem remains.

Could you tell me what you mean by "reset the backup file"?

Clean up app cache files,Reset the upload file

@maxiaoping
Copy link
Contributor

I am on seadroid 2.2.34 (MIUI global 12.0.4) and my upload info status stuck at "scanning" stage too. Automatic image upload does not work for me.
EDIT: It seems image upload is working now , although the scanning stage took way too long ( 10 minute ) so I thought it is stuck.

On the one hand, there are many photos in the album, and it takes time to scan whether the album matches have been backed up. On the other hand, due to the performance of the mobile phone, it is normal for the above to take a lot of time.

I understand that it takes time to scan my gallery for changed files, It is just strange to me, that with previous version of the app (Seafile 2.2.31) the scan takes about 1 minute to complete, not 10 (or more).

The picture and the video are scanned separately, maybe when you see it, the picture is scanned, and then the video is scanned.

@Ezwen
Copy link

Ezwen commented Apr 10, 2021

Clean up app cache files,Reset the upload file

I've cleared the app cache + deleted the local files + deleted /Android/data/com.seafile.seadroid2, but the problem remains: I can go no farther than Upload Info: Scanning.

I've also tried uninstalling and reinstalling the app, but that did not change anything either.

@maxiaoping
Copy link
Contributor

Clean up app cache files,Reset the upload file

I've cleared the app cache + deleted the local files + deleted /Android/data/com.seafile.seadroid2, but the problem remains: I can go no farther than Upload Info: Scanning.

I've also tried uninstalling and reinstalling the app, but that did not change anything either.

What is your phone model and Android system?

@Ezwen
Copy link

Ezwen commented Apr 10, 2021

Clean up app cache files,Reset the upload file

I've cleared the app cache + deleted the local files + deleted /Android/data/com.seafile.seadroid2, but the problem remains: I can go no farther than Upload Info: Scanning.
I've also tried uninstalling and reinstalling the app, but that did not change anything either.

What is your phone model and Android system?

Xiaomi Mi Mix 2, LineageOS 17.1 + microG

@Ezwen
Copy link

Ezwen commented Apr 11, 2021

After checking today, for some reason the Upload Info is not Scanning anymore, and is now Last sync finished at 04-11 11:19. But I have checked and unfortunately exactly zero pictures have been uploaded.

I've manually triggered a new sync, and now it's once again stuck at Scanning.

@Yyuzu
Copy link

Yyuzu commented Apr 13, 2021

Hello,

I've got the same problem with latest app 2.2.34 from F-Droid repo on my two Asus Zenfone Max Pro M1 running LineageOS 15.1.

In settings, the app is Scanning for updates to upload, then it hangs (I'm unable to scroll up / down in the settings screen) and then it displays Last sync with current timestamp but nothing has been uploaded.

I was running Seafile Server 7.0 so I upgraded to 8.0 but with no more success.

After clearing the in-app cache and system's app cache, the behavior has changed: app displays Scanning, then crashes. Upon restarting, app displays Upload waiting while network is up, then starts scanning and crashes again after down/up the wifi.

Last uploaded picture is from late January on both phones using the auto upload feature. But then I've been having an issue with the upload feature: I had to manually launch it so it starts scanning and uploading images. So maybe the late January date is not really reliable.

@Yyuzu
Copy link

Yyuzu commented Apr 13, 2021

More details: upload works properly when I deselect the relatively large Camera folder (2090 files) from the scan folder list.
Edit: when disabling / enabling picture upload, it seems to scan again each picture, like there is no cache at all.

@JavaSCU
Copy link

JavaSCU commented Apr 26, 2021

same problem with Seafile-2.2.35.
uninstall and re-install Seafile-2.2.31, it's working. app config and server(linux 7.1.5 64bit) nothing changed.

from adb logcat, get nothing log from "seadroid-2.2.35\app\src\main\java\com\seafile\seadroid2\cameraupload\CameraSyncAdapter.java" with Utils.utilsLogInfo function.

and I create a new accout for albums sync test with Seafile-2.2.35 and linux server 8.0.4 64bit. after scan finish, every album make a directory in server, but no any files are uploaded, all directories are empty. but Seafile-2.2.31 is ok.

@jho1670
Copy link

jho1670 commented Apr 30, 2021

Upgraded to 2.2.35 and picture+video uploads broke. I removed my account, cleared cache, and wiped app data -- uploads still broken. Scans run, finds no files to upload. I've tried pointing it to a new server-side library as well.

Downgraded to 2.2.31 and photo uploads are working again. No videos are uploading, still.

@AlterMax
Copy link

AlterMax commented May 11, 2021

I have the same trouble on my Samsung A72. After downgrade to Seafile-2.2.31 all photo and video uploads normal.

@Ezwen
Copy link

Ezwen commented May 18, 2021

I've upgraded to Seafile-2.2.36 today, but unfortunately the problem remained.

However, I can confirm that downgrading to Seafile-2.2.31 does solve the problem! For the first time ever, automatic upload has started on my phone! 🎊

@marcobehler
Copy link

Same here, downgrading to Seafile-2.2.31 surprisingly worked. All later ones are broken.

@groug
Copy link

groug commented May 19, 2021

Not to be redundant but same here. Tried to delete cache, upgrade to 2.2.36, nothing.
Tested with 2 small folders (50 and 300) and it worked perfectly, just the Camera folder is not working. I have 7000+ and 30+ GB of photos/videos inside (I have my phone, OnePlus 5, since 2017).

Tried to downgrade to 2.2.31 and it worked! It took 15-20 hours to fully sync but it worked.

@Jesse-XIE
Copy link

Same issue here. In 2.2.36 auto uploading not working.

When downgrade to 2.2.31, auto uploading start working, but it reuploads all things that were uploaded before. On the server side, the new uploaded photos are named as xxx_(1).png

@bertvandepoel
Copy link

bertvandepoel commented Jun 3, 2021

Thread outlining the same issue on the forums https://forum.seafile.com/t/android-2-2-32-camera-upload-failed/13708/

It reminds me of #800 which @freeplant solved previously. Perhaps it's a regression bug? Hopefully this is something that can be resolved. I don't mind helping to debug/test!

@bertvandepoel
Copy link

As outlined in the forum threads, this issue has been fixed for me in 2.2.39 after disabling and re-enabling camera upload.

@maxiaoping
Copy link
Contributor

Please update the latest version

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

No branches or pull requests