Fixed
Status Update
Comments
al...@gmail.com <al...@gmail.com> #2
Same for me, problem is severe and Google lacks any response. Please update if you find a solution, I'll do the same.
as...@gmail.com <as...@gmail.com> #3
The only "workaround" I've found is the one mentioned at the end #1 (repeating the steps and selecting the 0 byte file instead of creating a new one).
al...@gmail.com <al...@gmail.com> #4
Can the Drive team please tell me why they are deliberately ignoring bug reports about SAF? Yet at the same time they're deprecating the Android API and suggesting the use of... SAF!?
ra...@gmail.com <ra...@gmail.com> #5
This is how it happens for me :
1) Start activity for result :
ACTION_CREATE_DOCUMENT, CATEGORY_OPENABLE, "*/*"
2) Persist the URI permissions :
ContentResolver.takePersistableUriPermission(uri, R + W),
3) Check that we have read and write permission :
ContentResolver.getPersistedUriPermissions()
3) Read the content (in case the user chose an existing document) :
ContentResolver.openFileDescriptor(uri, "r") then a FileInputStream
4) Overwrite the content :
ContentResolver.openFileDescriptor(uri, "w")
used in a FileOutputStream
This fails :
java.io.FileNotFoundException: File not found: acc=1;doc=encoded=...
at android.database.DatabaseUtils.readExceptionWithFileNotFoundExceptionFromParcel(DatabaseUtils.java:144)
at android.content.ContentProviderProxy.openAssetFile(ContentProviderNative.java:625)
at android.content.ContentResolver.openAssetFileDescriptor(ContentResolver.java:1271)
at android.content.ContentResolver.openFileDescriptor(ContentResolver.java:1106)
at my.application
From now on we can't use the URI at all :
SecurityException : Permission Denial: reading com.google.android.apps.docs.storagebackend.StorageBackendContentProvider uri content://com.google.android.apps.docs.storage/document/acc%3D1%3Bdoc%3Dencoded%3Daa... from pid=13774, uid=10181 requires that you obtain access using ACTION_OPEN_DOCUMENT or related APIs
Remarks :
- The file is actually created an uploaded, with a 0 size.
- Selecting it again (still with ACTION_CREATE_DOCUMENT) show a dialog "Overwrite ...", then everything work.
- Selecting an existing document with ACTION_OPEN_DOCUMENT work.
- Everything work with the 'local storage' provider.
- Skipping the step 3 makes the step 4 works, but reading the document later fails.
1) Start activity for result :
ACTION_CREATE_DOCUMENT, CATEGORY_OPENABLE, "*/*"
2) Persist the URI permissions :
ContentResolver.takePersistableUriPermission(uri, R + W),
3) Check that we have read and write permission :
ContentResolver.getPersistedUriPermissions()
3) Read the content (in case the user chose an existing document) :
ContentResolver.openFileDescriptor(uri, "r") then a FileInputStream
4) Overwrite the content :
ContentResolver.openFileDescriptor(uri, "w")
used in a FileOutputStream
This fails :
java.io.FileNotFoundException: File not found: acc=1;doc=encoded=...
at android.database.DatabaseUtils.readExceptionWithFileNotFoundExceptionFromParcel(DatabaseUtils.java:144)
at android.content.ContentProviderProxy.openAssetFile(ContentProviderNative.java:625)
at android.content.ContentResolver.openAssetFileDescriptor(ContentResolver.java:1271)
at android.content.ContentResolver.openFileDescriptor(ContentResolver.java:1106)
at my.application
From now on we can't use the URI at all :
SecurityException : Permission Denial: reading com.google.android.apps.docs.storagebackend.StorageBackendContentProvider uri content://com.google.android.apps.docs.storage/document/acc%3D1%3Bdoc%3Dencoded%3Daa... from pid=13774, uid=10181 requires that you obtain access using ACTION_OPEN_DOCUMENT or related APIs
Remarks :
- The file is actually created an uploaded, with a 0 size.
- Selecting it again (still with ACTION_CREATE_DOCUMENT) show a dialog "Overwrite ...", then everything work.
- Selecting an existing document with ACTION_OPEN_DOCUMENT work.
- Everything work with the 'local storage' provider.
- Skipping the step 3 makes the step 4 works, but reading the document later fails.
al...@gmail.com <al...@gmail.com> #6
We need someone to solve this issue ASAP, but it seems no one is listening to our complaints... :(
HEY GOOGLE!!!
HEY GOOGLE!!!
ha...@google.com <ha...@google.com> #7
Hello, thanks to original poster for reporting this bug and to all for the technical details to help isolate it. We understand this was an important issue and prioritized a fix. This has now been fixed and will be rolling out to production soon.
al...@gmail.com <al...@gmail.com> #8
Thank you so much, I'm starting to breathe again. This issue almost destroyed my app. Hope to see the release soon. Again, thank you!
go...@schildbach.de <go...@schildbach.de> #9
The problem is still ongoing, and it's pretty severe. Our users are loosing their data! For them, this likely means severe financial loss.
ra...@gmail.com <ra...@gmail.com> #10
For my use case (#5) the issue was fixed by version 2.19.112.05.40
go...@schildbach.de <go...@schildbach.de> #11
Yes, for me 2.19.112.05.45. Problem is these versions aren't rolling out yet.
al...@gmail.com <al...@gmail.com> #12
We're still waiting for the fix. This behavior by Google is not acceptable...
[Deleted User] <[Deleted User]> #13
Managed to reproduce the issue in our production app.
Android 8.1.0
Versions: 2.19.212.04.80, 2.19.492.80
Saving via SAF (ACTION_CREATE_DOCUMENT) to Google Drive does not work.
Saving via SAF (ACTION_CREATE_DOCUMENT) to a Local Storage or SD Card does work.
Android 8.1.0
Versions: 2.19.212.04.80, 2.19.492.80
Saving via SAF (ACTION_CREATE_DOCUMENT) to Google Drive does not work.
Saving via SAF (ACTION_CREATE_DOCUMENT) to a Local Storage or SD Card does work.
ma...@outlook.com <ma...@outlook.com> #14
Still encountering this issue on 2.20.075.05.40
Android: 9
al...@gmail.com <al...@gmail.com> #15
I confirm this problem has started plaguing my users again... and it's very frustrating because it's the recommended way and I've nothing to do about it.
mo...@gmail.com <mo...@gmail.com> #16
still not works
pr...@gmail.com <pr...@gmail.com> #17
Not working till now.
me...@gmail.com <me...@gmail.com> #18
Intrusos imbaden privacidad
Description
When creating a new file in Drive using the Storage Access Framework, the file is created but the contents are never saved/uploaded to Drive. The new file remains 0 bytes in Drive.
What version(s) have you tested?
Android Drive 2.19.072.05.44 (on Nexus 9 with Android 7.1.1)
Android Drive 2.19.072.05.33 (on Samsung Chromebook Plus with Android 7.1.1 and Chrome OS 71.0.3578.127)
What steps will reproduce the problem?
1. Open any app that can save a file to Drive via the Storage Access Framework (i.e. Android file browser UI). For example, open Squid, go to the Squid settings, tap Backup and restore, tap Local backup, tap Create backup, and choose a Drive account from the navigation drawer.
2. Save a new file to Drive via the Storage Access Framework.
3. Open Drive and observe the outcome.
Expected outcome:
The new file is uploaded to Drive.
Actual outcome:
The new file is 0 bytes in Drive and the contents are never uploaded.
Other notes:
This is a regression in a recent version of Drive on Android (it has never been an issue in the past).
During my initial testing, I was occasionally able to get a file to upload to Drive. I finally determined that it would work only the first time after force stopping Drive. After that, it would no longer work (until force stopping the app again). This was on Drive 2.19.032.05.33. However, after updating to the latest version of Drive (2.19.072.05), I haven't been able to get uploading a new file from the Storage Access Framework to work at all.
With the latest version of Drive, I have been able to get overwriting an existing file to work properly. In this case you would follow the same steps above, except instead of creating a new file you would select an existing file (such as the 0 byte file you created previously), then this file is overwritten and the contents are uploaded to Drive.