0

Can't sync with dropbox or drive

Andy Kang 12 aastat tagasi uuendaja Adrian 12 aastat tagasi 4

Like the title says, I can't sync with dropbox or drive. When I try to upload to dropbox, I just get a blank toast and nothing shows up on my dropbox. Every time I try to upload to drive I get an "Upload Failed" error.


Here is the logcat for when I try to upload to dropbox:


04-03 19:34:48.409: W/System.err(5998): java.io.FileNotFoundException: /sdcard/Fuelio/sync/vehicle-1-sync.csv: open failed: ENOENT (No such file or directory)

04-03 19:34:48.409: W/System.err(5998): at libcore.io.IoBridge.open(IoBridge.java:416)

04-03 19:34:48.409: W/System.err(5998): at java.io.FileInputStream.<init>(FileInputStream.java:78)

04-03 19:34:48.409: W/System.err(5998): at com.kajda.fuelio.ft.a(DropboxSyncTo.java:142)

04-03 19:34:48.409: W/System.err(5998): at com.kajda.fuelio.ft.doInBackground(DropboxSyncTo.java:1)

04-03 19:34:48.409: W/System.err(5998): at android.os.AsyncTask$2.call(AsyncTask.java:287)

04-03 19:34:48.409: W/System.err(5998): at java.util.concurrent.FutureTask.run(FutureTask.java:234)

04-03 19:34:48.409: W/System.err(5998): at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:230)

04-03 19:34:48.409: W/System.err(5998): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1080)

04-03 19:34:48.409: W/System.err(5998): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:573)

04-03 19:34:48.409: W/System.err(5998): at java.lang.Thread.run(Thread.java:856)

04-03 19:34:48.409: W/System.err(5998): Caused by: libcore.io.ErrnoException: open failed: ENOENT (No such file or directory)

04-03 19:34:48.409: W/System.err(5998): at libcore.io.Posix.open(Native Method)

04-03 19:34:48.409: W/System.err(5998): at libcore.io.BlockGuardOs.open(BlockGuardOs.java:110)

04-03 19:34:48.416: W/System.err(5998): at libcore.io.IoBridge.open(IoBridge.java:400)

04-03 19:34:48.416: W/System.err(5998): ... 9 more



And here is the logcat for when I try to upload to drive:


04-03 19:37:22.323: W/System.err(5998): java.io.FileNotFoundException: /sdcard/Fuelio/sync/vehicle-1-sync.csv: open failed: ENOENT (No such file or directory)

04-03 19:37:22.338: W/System.err(5998): at libcore.io.IoBridge.open(IoBridge.java:416)

04-03 19:37:22.338: W/System.err(5998): at java.io.FileInputStream.<init>(FileInputStream.java:78)

04-03 19:37:22.338: W/System.err(5998): at com.google.api.client.http.FileContent.getInputStream(FileContent.java:71)

04-03 19:37:22.338: W/System.err(5998): at com.google.api.client.googleapis.media.MediaHttpUploader.upload(MediaHttpUploader.java:275)

04-03 19:37:22.338: W/System.err(5998): at com.google.api.client.googleapis.services.AbstractGoogleClientRequest.executeUnparsed(AbstractGoogleClientRequest.java:408)

04-03 19:37:22.338: W/System.err(5998): at com.google.api.client.googleapis.services.AbstractGoogleClientRequest.executeUnparsed(AbstractGoogleClientRequest.java:328)

04-03 19:37:22.338: W/System.err(5998): at com.google.api.client.googleapis.services.AbstractGoogleClientRequest.execute(AbstractGoogleClientRequest.java:449)

04-03 19:37:22.338: W/System.err(5998): at com.kajda.fuelio.ho.a(GoogleDriveSyncTo.java:190)

04-03 19:37:22.338: W/System.err(5998): at com.kajda.fuelio.ho.doInBackground(GoogleDriveSyncTo.java:1)

04-03 19:37:22.338: W/System.err(5998): at android.os.AsyncTask$2.call(AsyncTask.java:287)

04-03 19:37:22.338: W/System.err(5998): at java.util.concurrent.FutureTask.run(FutureTask.java:234)

04-03 19:37:22.338: W/System.err(5998): at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:230)

04-03 19:37:22.338: W/System.err(5998): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1080)

04-03 19:37:22.338: W/System.err(5998): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:573)

04-03 19:37:22.338: W/System.err(5998): at java.lang.Thread.run(Thread.java:856)

04-03 19:37:22.338: W/System.err(5998): Caused by: libcore.io.ErrnoException: open failed: ENOENT (No such file or directory)

04-03 19:37:22.346: W/System.err(5998): at libcore.io.Posix.open(Native Method)

04-03 19:37:22.346: W/System.err(5998): at libcore.io.BlockGuardOs.open(BlockGuardOs.java:110)

04-03 19:37:22.346: W/System.err(5998): at libcore.io.IoBridge.open(IoBridge.java:400)

04-03 19:37:22.346: W/System.err(5998): ... 14 more


I believe both errors are because my phone (Droid Bionic) has both internal storage and external storage. It is looking for the vehicle-1-sync.csv file in /sdcard/Fuelio/sync/ but that file is actually in /sdcard-ext/Fuelio/sync/vehicle-1-sync.csv

That's very strange. I need to check my code but I'm getting /sdcard directory in google's way.

Environment.getExternalStorageDirectory();

So Android should detecy your sdcard directory. This could be your ROM problem but I need to check it. Maybe there is a bug and in Dropbox functions I've used fixed directory solution. 


What about standard CSV export - can you find the file /sdcard/ od /sdcard-ext/ - there should be Fuelio directory.

When I do the standard CSV export it works but I get the message that the file was saved to /SDCARD/Fuelio/backup-csv/ but in actuality the file is in /sdcard-ext/Fuelio/backup-csv/.


Both Export CSV and regular Export works and they both save to sdcard-ext.


Another weird thing is that exporting selectively doesn't work with Dropbox, but it does work with Drive. Not really sure why that is.

OK. So this could be bug. Probably there is something wrong with my Dropbox functions - with detecting your SDCARD directory.