Dropbox and Briefcase- Error in Decrypting/Exporting

I have been copying all ODK directories off of SD cards onto dropbox before
pulling data to a briefcase storage folder also located on Dropbox, so that
all data is automatically backed up on the computers of other people
working on the project. They can then easily export data off of the
briefcase storage onto their own computers, which allows us to share data
without ever emailing or putting unencrypted data on dropbox (as it is
encrypted until exported).

For some reason, when I try to decrypt/export the data from the Briefcase
Storage location on dropbox, I get the following error: "Unable to remove
decrypted files: unable to delete directory: 'instance name/temp' " Then
when I look in the briefcase storage, I see that an empty "temp" file has
been created in the instance folder indicated in the error message. When I
delete this tempfile and attempt to export again, the same thing happens
with a different instance. Sometimes it makes it through 30% of the
instances, sometimes through 10%.... it seems completely random.

I tried copying the directory folder off of dropbox into My documents, and
reset the briefcase directory to the one located in My Documents, and
exported/decrypted with absolutely no problem. I was able to export
successfully a couple of times once I copied the folder off of dropbox, so
I think that this is where the problem is coming from.

To complicate matters, one of my colleagues successfully exported data off
of the briefcase storage on dropbox. I have no idea what is going on here.
At first I thought that it was because dropbox hadn't finished syncing,
but I tried doing it again later after it had been synced for a while and
had the same problem. I can get around this by pulling data onto the
briefcase storage on dropbox, and then copying the storage area to My
Documents (overwriting the previous folder), but this is kind of annoying.
Is this a bug? Am I doing something wrong here?

Hi Allyson,

There are loads of potential problems that you run into when you "use"
files directly out of Dropbox. Even just opening MS Office documents
directly in Dropbox locations causes lots of funny syncing of temporary
files, etc. My guess here is that the following is happening: (1) a temp
file gets written, (2) Dropbox sees a new file and starts to sync it to the
central Dropbox server (where it will then be sync'd to everybody who
shares that folder), (3) Briefcase finishes with the temp file and wants to
delete it, and (4) it can't delete the file because it's currently being
used by another process (Dropbox, which has the file open as it syncs it).

My guess is that if you pause syncing in Dropbox (one of the options from
its context menu) while exporting, you won't have any trouble. You might
consider either pausing or somehow arranging things so that Briefcase is
not directly using a Dropbox folder -- because my guess is that, even if
you solve this particular problem somehow, others will crop up. You just
don't want Dropbox syncing things when Briefcase is in the middle of
working.

For similar reasons, I have sometimes used Microsoft's SyncToy to have a
semi-automatic method of syncing between Dropbox and non-Dropbox locations
(and indeed, I never ever work directly out of Dropbox folders for any
reason). Thus, you could run Briefcase tasks, then run SyncToy to sync the
local Briefcase directory with the Dropbox one. I know it's awkward, but
I'm not sure of a better solution. Maybe somebody else will have a better
idea.

Chris

··· On Friday, August 31, 2012, Allyson Barnett wrote:

I have been copying all ODK directories off of SD cards onto dropbox
before pulling data to a briefcase storage folder also located on Dropbox,
so that all data is automatically backed up on the computers of other
people working on the project. They can then easily export data off of the
briefcase storage onto their own computers, which allows us to share data
without ever emailing or putting unencrypted data on dropbox (as it is
encrypted until exported).

For some reason, when I try to decrypt/export the data from the Briefcase
Storage location on dropbox, I get the following error: "Unable to remove
decrypted files: unable to delete directory: 'instance name/temp' " Then
when I look in the briefcase storage, I see that an empty "temp" file has
been created in the instance folder indicated in the error message. When I
delete this tempfile and attempt to export again, the same thing happens
with a different instance. Sometimes it makes it through 30% of the
instances, sometimes through 10%.... it seems completely random.

I tried copying the directory folder off of dropbox into My documents, and
reset the briefcase directory to the one located in My Documents, and
exported/decrypted with absolutely no problem. I was able to export
successfully a couple of times once I copied the folder off of dropbox, so
I think that this is where the problem is coming from.

To complicate matters, one of my colleagues successfully exported data off
of the briefcase storage on dropbox. I have no idea what is going on here.
At first I thought that it was because dropbox hadn't finished syncing,
but I tried doing it again later after it had been synced for a while and
had the same problem. I can get around this by pulling data onto the
briefcase storage on dropbox, and then copying the storage area to My
Documents (overwriting the previous folder), but this is kind of annoying.
Is this a bug? Am I doing something wrong here?

--
Post: opendatakit@googlegroups.com <javascript:_e({}, 'cvml',
'opendatakit@googlegroups.com');>
Unsubscribe: opendatakit+unsubscribe@googlegroups.com <javascript:_e({},
'cvml', 'opendatakit%2Bunsubscribe@googlegroups.com');>
Options: http://groups.google.com/group/opendatakit?hl=en

Please "Star" this issue:
http://code.google.com/p/opendatakit/issues/detail?id=676 to be notified of
code changes to rectify this problem.

The ODK Briefcase storage area was never designed as a network storage
location.

During the decryption process, a temp directory is created in which the
encrypted form data and the media files of the encrypted submission are
decrypted. The decrypted files are then read (if form data) or copied (if
media file) to the CSV export destination location. Once that submission
has been processed, the temp directory and its files are deleted.

The issue is that the temp directory is being created within the ODK
Briefcase Storage location. If it were instead created under the CSV export
destination directory, then you would not have this problem and could
likely have the ODK Briefcase Storage location be a read-only share.

Mitch

··· On Fri, Aug 31, 2012 at 11:10 AM, Christopher Robert <chrislrobert@gmail.com wrote:

Hi Allyson,

There are loads of potential problems that you run into when you "use"
files directly out of Dropbox. Even just opening MS Office documents
directly in Dropbox locations causes lots of funny syncing of temporary
files, etc. My guess here is that the following is happening: (1) a temp
file gets written, (2) Dropbox sees a new file and starts to sync it to the
central Dropbox server (where it will then be sync'd to everybody who
shares that folder), (3) Briefcase finishes with the temp file and wants to
delete it, and (4) it can't delete the file because it's currently being
used by another process (Dropbox, which has the file open as it syncs it).

My guess is that if you pause syncing in Dropbox (one of the options from
its context menu) while exporting, you won't have any trouble. You might
consider either pausing or somehow arranging things so that Briefcase is
not directly using a Dropbox folder -- because my guess is that, even if
you solve this particular problem somehow, others will crop up. You just
don't want Dropbox syncing things when Briefcase is in the middle of
working.

For similar reasons, I have sometimes used Microsoft's SyncToy to have a
semi-automatic method of syncing between Dropbox and non-Dropbox locations
(and indeed, I never ever work directly out of Dropbox folders for any
reason). Thus, you could run Briefcase tasks, then run SyncToy to sync the
local Briefcase directory with the Dropbox one. I know it's awkward, but
I'm not sure of a better solution. Maybe somebody else will have a better
idea.

Chris

On Friday, August 31, 2012, Allyson Barnett wrote:

I have been copying all ODK directories off of SD cards onto dropbox
before pulling data to a briefcase storage folder also located on Dropbox,
so that all data is automatically backed up on the computers of other
people working on the project. They can then easily export data off of the
briefcase storage onto their own computers, which allows us to share data
without ever emailing or putting unencrypted data on dropbox (as it is
encrypted until exported).

For some reason, when I try to decrypt/export the data from the Briefcase
Storage location on dropbox, I get the following error: "Unable to remove
decrypted files: unable to delete directory: 'instance name/temp' " Then
when I look in the briefcase storage, I see that an empty "temp" file has
been created in the instance folder indicated in the error message. When I
delete this tempfile and attempt to export again, the same thing happens
with a different instance. Sometimes it makes it through 30% of the
instances, sometimes through 10%.... it seems completely random.

I tried copying the directory folder off of dropbox into My documents,
and reset the briefcase directory to the one located in My Documents, and
exported/decrypted with absolutely no problem. I was able to export
successfully a couple of times once I copied the folder off of dropbox, so
I think that this is where the problem is coming from.

To complicate matters, one of my colleagues successfully exported data
off of the briefcase storage on dropbox. I have no idea what is going on
here. At first I thought that it was because dropbox hadn't finished
syncing, but I tried doing it again later after it had been synced for a
while and had the same problem. I can get around this by pulling data onto
the briefcase storage on dropbox, and then copying the storage area to My
Documents (overwriting the previous folder), but this is kind of annoying.
Is this a bug? Am I doing something wrong here?

--
Post: opendatakit@googlegroups.com
Unsubscribe: opendatakit+unsubscribe@googlegroups.com
Options: http://groups.google.com/group/opendatakit?hl=en

--
Post: opendatakit@googlegroups.com
Unsubscribe: opendatakit+unsubscribe@googlegroups.com
Options: http://groups.google.com/group/opendatakit?hl=en

--
Mitch Sundt
Software Engineer
University of Washington
mitchellsundt@gmail.com

Thanks Mitch and Chris-- Pausing syncing solved the problem.

··· On Friday, August 31, 2012 10:03:12 PM UTC, Mitch wrote: > > Please "Star" this issue: > http://code.google.com/p/opendatakit/issues/detail?id=676 to be notified > of code changes to rectify this problem. > > The ODK Briefcase storage area was never designed as a network storage > location. > > During the decryption process, a temp directory is created in which the > encrypted form data and the media files of the encrypted submission are > decrypted. The decrypted files are then read (if form data) or copied (if > media file) to the CSV export destination location. Once that submission > has been processed, the temp directory and its files are deleted. > > The issue is that the temp directory is being created within the ODK > Briefcase Storage location. If it were instead created under the CSV export > destination directory, then you would not have this problem and could > likely have the ODK Briefcase Storage location be a read-only share. > > Mitch > > On Fri, Aug 31, 2012 at 11:10 AM, Christopher Robert <chrisl...@gmail.com wrote: > >> Hi Allyson, >> >> There are loads of potential problems that you run into when you "use" >> files directly out of Dropbox. Even just opening MS Office documents >> directly in Dropbox locations causes lots of funny syncing of temporary >> files, etc. My guess here is that the following is happening: (1) a temp >> file gets written, (2) Dropbox sees a new file and starts to sync it to the >> central Dropbox server (where it will then be sync'd to everybody who >> shares that folder), (3) Briefcase finishes with the temp file and wants to >> delete it, and (4) it can't delete the file because it's currently being >> used by another process (Dropbox, which has the file open as it syncs it). >> >> My guess is that if you pause syncing in Dropbox (one of the options from >> its context menu) while exporting, you won't have any trouble. You might >> consider either pausing or somehow arranging things so that Briefcase is >> not directly using a Dropbox folder -- because my guess is that, even if >> you solve this particular problem somehow, others will crop up. You just >> don't want Dropbox syncing things when Briefcase is in the middle of >> working. >> >> For similar reasons, I have sometimes used Microsoft's SyncToy to have a >> semi-automatic method of syncing between Dropbox and non-Dropbox locations >> (and indeed, I never ever work directly out of Dropbox folders for any >> reason). Thus, you could run Briefcase tasks, then run SyncToy to sync the >> local Briefcase directory with the Dropbox one. I know it's awkward, but >> I'm not sure of a better solution. Maybe somebody else will have a better >> idea. >> >> Chris >> >> >> On Friday, August 31, 2012, Allyson Barnett wrote: >> >>> I have been copying all ODK directories off of SD cards onto dropbox >>> before pulling data to a briefcase storage folder also located on Dropbox, >>> so that all data is automatically backed up on the computers of other >>> people working on the project. They can then easily export data off of the >>> briefcase storage onto their own computers, which allows us to share data >>> without ever emailing or putting unencrypted data on dropbox (as it is >>> encrypted until exported). >>> >>> For some reason, when I try to decrypt/export the data from the >>> Briefcase Storage location on dropbox, I get the following error: "Unable >>> to remove decrypted files: unable to delete directory: 'instance name/temp' >>> " Then when I look in the briefcase storage, I see that an empty "temp" >>> file has been created in the instance folder indicated in the error >>> message. When I delete this tempfile and attempt to export again, the same >>> thing happens with a different instance. Sometimes it makes it through 30% >>> of the instances, sometimes through 10%.... it seems completely random. >>> >>> I tried copying the directory folder off of dropbox into My documents, >>> and reset the briefcase directory to the one located in My Documents, and >>> exported/decrypted with absolutely no problem. I was able to export >>> successfully a couple of times once I copied the folder off of dropbox, so >>> I think that this is where the problem is coming from. >>> >>> To complicate matters, one of my colleagues successfully exported data >>> off of the briefcase storage on dropbox. I have no idea what is going on >>> here. At first I thought that it was because dropbox hadn't finished >>> syncing, but I tried doing it again later after it had been synced for a >>> while and had the same problem. I can get around this by pulling data onto >>> the briefcase storage on dropbox, and then copying the storage area to My >>> Documents (overwriting the previous folder), but this is kind of annoying. >>> Is this a bug? Am I doing something wrong here? >>> >>> -- >>> Post: opendatakit@googlegroups.com >>> Unsubscribe: opendatakit+unsubscribe@googlegroups.com >>> Options: http://groups.google.com/group/opendatakit?hl=en >>> >> -- >> Post: opend...@googlegroups.com >> Unsubscribe: opendatakit...@googlegroups.com >> Options: http://groups.google.com/group/opendatakit?hl=en >> > > > > -- > Mitch Sundt > Software Engineer > University of Washington > mitche...@gmail.com >