Using Scrivener with Dropbox

User avatar
MimeticMouton
Posts: 8679
Joined: Wed May 05, 2010 5:39 am
Platform: Mac + Windows
Location: city of rain
Contact:

Fri Mar 18, 2011 10:39 pm Post

Hi sophifire,

Welcome to the forums!

My initial thought from your description is that you worked in Scrivener to do your outlining on the index cards or in the synopsis area of the outliner and those notes didn't transfer. If that's the case, that's to be expected--the sync feature only works with the main text of the documents, so the synopsis doesn't get exported. If you want to bring your synopsis notes over when you sync, you can open the document in Scrivener in the text view (if it has no subdocuments, just selecting the document in the binder will load it in text view) and copy and paste in the text from the index card in the inspector (View>Layout>Show Inspector if it's not visible). You'll presumably want to delete it later, if it's not supposed to be part of the final manuscript, but it will let you have it present on the iPhone while you're drafting.

For extra reference, the documents placed in the Notes folder are just documents that aren't contained in Scrivener's Draft folder in the binder. It's basically "notes" as opposed to "draft", but they're still just the documents, not the synopses or document/project notes.

Does that help? If not, could you explain a little more specifically what your process is and when the problem happened? Was there text in the files previously (viewable in Scrivener and on your iPhone) that is now missing?
Jennifer Hughes
(MM for short)

so
sophifire
Posts: 5
Joined: Fri Mar 18, 2011 8:40 pm
Platform: Mac

Sat Mar 19, 2011 12:02 pm Post

Further to the above, could I have permanently corrupted Dropbox in some way?
I've tried deleting the folder in Dropbox that I was syncing with and then resyncing, but that doesn't seem to have improved matters -- I still get just the headings, and not the text within them.
I've even started a new project in Scrivener, imported the project into it, and when I sync that with the external file (in Dropbox/Plaintext), now all I get in my Plaintext version is the Notes folder (& not the Draft folder). And the same problem is happening with the Notes -- just the headers, not the text within them.
Would be very grateful to find out what I'm doing wrong; I'm sure I waited until the Dropbox had its green tick, so not sure what the problem is...!
Many thanks

ca
carlaz
Posts: 29
Joined: Thu Oct 11, 2007 11:16 am
Platform: Mac + Windows
Location: Bogota, Colombia
Contact:

Wed Apr 06, 2011 6:48 pm Post

I have just been trying out keeping a "live" Scrivener project in Dropbox and accessing it from two different Macs (both running the current latest versions of Scrivener and OS X). Curiously, I always get the warning message about the project possibly being open on another machine, even in cases where the other possible machine is entirely off. Even in such cases, the warning is a little disconcerting.

Is the warning appearing simply because Scrivener recognizes that the project was last opened on another machine and that it has no security about whether or not it was ever closed? (If so, would it not be possible to have Scrivener write some blurb of metadata when closing a project to say "such and such project was closed on such and such machine" so that, when opening on another machine, it can be recognized whether the proejct was closed elsewhere or not?) Or is this not really uncertainty on Scrivener's part, but some Dropbox weirdness that prevent Scrivener from recognizing whether or not a project was closed elsewhere or not?

I'm keen to try out cross-platform Dropbox access using the Windows beta, as well, but I kind of want to see if the Mac-version Dropbox-related oddness has any explanation first. :)

(I did search the forum for info, but didn't readily come up with anything that looked directly applicable -- which is not to say that I might have missed it!)

Online
User avatar
AmberV
Posts: 22420
Joined: Sun Jun 18, 2006 4:30 am
Platform: Mac + Linux
Location: Santiago de Compostela, Galiza
Contact:

Wed Apr 06, 2011 7:15 pm Post

Are you positive you are actually closing the project before you leave? There is a difference between putting your computer to sleep and closing the file. If you sleep the computer with a file open, it remains opened the entire time. "Open" is a physical state on your hard drive, and the only way to negate that state is by instructing Scrivener to close the project fully. Easiest way to do that is to just quit Scrivener.

Otherwise, you could just be opening or shutting things down to fast. Make sure you are following all of the guidelines precisely. There should be no Dropbox network activity when you shut down for the night, and no activity when you load a project.
.:.
Ioa Petra'ka
“Whole sight, or all the rest is desolation.” —John Fowles

ca
carlaz
Posts: 29
Joined: Thu Oct 11, 2007 11:16 am
Platform: Mac + Windows
Location: Bogota, Colombia
Contact:

Thu Apr 07, 2011 12:04 am Post

I am not merely positive that I am closing the project, I am positive that I am turning off the computer on which the project was last open. Not slept: off. Powered down. Not actually unplugged :) but definitely not up and running, not even sleep-walking. Since it is at least an hour's drive between the locations of my two Macs that are accessing Dropbox, I am thinking that should be plenty be of time after shutting down before trying the open the Dropboxed file on whichever other machine

The even more curious thing is that when I try to open any of the various "safety" copies (that the warning message gives one the option to open), all of them likewise generate the warning message that this file seems to be in use (though, in fact, none of them are).

And even more curious than that, as an experiment, I saved a new copy of the project on Dropbox, closed Scrivener entirely, changed the name (System Prefs > Sharing) of my local computer, and then reopened the that latest copy of the project on Dropbox -- and it popped up the warning message that the project seems to be open on the computer with the old name. So not only was I pretty sure the project was not still open (having explicitly closed it and then reopened it), I was pretty sure that the computer name for which the project was said to seem to be open no longer (technically speaking) existed.

So far, I remain mystified as to why Scrivener thinks projects are open when I am absolutely as sure as can be sure that they are not. I am thinking of simply blowing away the copies on Dropbox, and replacing them with a handy local copy (not having really made any real changes to the project in the last few weeks while playing with Dropbox sync). Maybe something funky happened on Dropbox, or in the past without my noticing it, that now makes Scrivener think that all my Dropbox copies are open all the time. :?:

Online
User avatar
AmberV
Posts: 22420
Joined: Sun Jun 18, 2006 4:30 am
Platform: Mac + Linux
Location: Santiago de Compostela, Galiza
Contact:

Thu Apr 07, 2011 12:27 am Post

It's not impossible, there really is no such thing as flawless synchronisation, so maybe something is glitched on their server and isn't recovering gracefully. It would be unlikely though. The main trigger for this, by the way, is the "user.lock" file inside the project bundle, under the Files directory. If for some reason Dropbox is not cleanly removing that file when you quit, that would cause the program to think it's still open.

Since it is at least an hour's drive between the locations of my two Macs that are accessing Dropbox, I am thinking that should be plenty be of time after shutting down before trying the open the Dropboxed file on whichever other machine


Well, sorta. :) The time between using computer A and computer B is less important than getting a clean and full upload/download while still on A or B. In other words, if I shut down the Mac with the Apple menu while Scrivener is open, chances are extremely high that everything will be closed before Dropbox even gets a chance to upload the last set of changes you made (like removing that lock file). Even if you wait ten years to open it on the second computer, Dropbox will never know there was a last batch of changes pending on the first computer.

Same thing can happen in inverse on machine B. If you fire it up and instantly open your project while Dropbox is still downloading the latest version, you'd actually end up loading a partial copy of the changed project since your local computer is completely up to date from the server yet.

I'd suspect the first problem though, based on your description. It's more likely you are shutting down to quickly on both computers and so the last set of edits aren't on Dropbox at all. If you do this a lot, you'll end up with a bunch of "Conflicted" files in the bundle which can, over time, lead to instability (a problem which can be reversed with a little diligent manual labour of going through all the conflicted files and erasing everything but the latest copy of each one, and renaming it to not have the parenthetical that Dropbox adds, if the conflicted copy is the most recent).

To avoid this, quit Scrivener and *then* shut down the computer only after the Dropbox icon in the menu bar has stopped "spinning" and has a green checkmark beside it (or if you are using the black and white theme, when it looks like a solid box, sans any animations).

And even more curious than that, as an experiment, I saved a new copy of the project on Dropbox, closed Scrivener entirely, changed the name (System Prefs > Sharing) of my local computer, and then reopened the that latest copy of the project on Dropbox


I've never actually tried doing that, but it wouldn't surprise me if that causes Dropbox to re-download everything from scratch, regarding the machine as a "new" computer in the network---so you'd have the same problem if you did that and then quickly tried to do something in that folder. Even worse, because a full download could take hours rather than seconds.
.:.
Ioa Petra'ka
“Whole sight, or all the rest is desolation.” —John Fowles

ca
carlaz
Posts: 29
Joined: Thu Oct 11, 2007 11:16 am
Platform: Mac + Windows
Location: Bogota, Colombia
Contact:

Thu Apr 07, 2011 2:25 am Post

No, I don't think what you describe are necessarily the problems. For one thing, I am not shutting down the computer (after closing Scrivener) until the Dropbox icons indicate that sync is completed (with the little green checkmark). If there is something else that needs to happen for a clean save and sync to Dropbox, I am not sure what it is.

Also, I can confirm that Dropbox did not re-sync files to the local machine after changing its name -- not even after restart. All was looking as right and proper.

In any case, I am not sure any of that matters because the plot thickens ....

So I had started with computers named A and B (for the sake of argument). I had already arbitrarily renamed computer A to A2. Then (as I suggested I would) I blew away (from A2) the Dropbox copies of the project (and its various safety copies). All gone, both from online and from the local Dropbox folder. I restarted A2, and copied an untouched-for-two-or-three-weeks-whilst-I-played-with-Dropbox copy of the project to Dropbox. Natch, the little green checkmark was waited for. But when I tried to open it, I got the warning message that the file seemed to be open on A (not A2). Of course, there is (technically) no longer a computer named A. Also, there were no projects of any kind open on A2 (or B for that matter). And perhaps most curiously of all, the clean local copy on what is now A2 also gives a warning message about being open on A when I try to open it. Of course, it was not open when I changed the computer name, nor was Scrivener even running when I changed the computer name -- though, of course, when it was last saved, it was running on a computer named A.

Well, perhaps what I will do is open and then save a "safety copy" of the local copy of the project, rename the original local copy to _old or something, change the "safety copy" name to my usual proj file name, and then see if I can get Scrivener to agree that "former-safety copy" is only open on the one local machine A2. Then (assuming success), I can copy that to Dropbox (with appropriate saving, closing of Scrivener, and awaiting green Dropbox checkmarks) and see if Scrivener agrees that the newly Dropboxed copy is not open on A2 (or anywhere else). If that works, I can then play with trying to open from Dropbox on B ....
Last edited by carlaz on Thu Apr 07, 2011 2:42 am, edited 1 time in total.

ca
carlaz
Posts: 29
Joined: Thu Oct 11, 2007 11:16 am
Platform: Mac + Windows
Location: Bogota, Colombia
Contact:

Thu Apr 07, 2011 2:31 am Post

OK, so far so good: Scrivener agrees that my (newly made from safety to live) local copy of the project on A2 is not open anywhere else.

So, Scrivener closed. A pause for breath. Project copied to Dropbox. Another pause for breath. (Or, actually, changing my baby daughter ;)) So, now to see what happens when I try to open the DB copy ....

ca
carlaz
Posts: 29
Joined: Thu Oct 11, 2007 11:16 am
Platform: Mac + Windows
Location: Bogota, Colombia
Contact:

Thu Apr 07, 2011 2:36 am Post

Awesomeness. The new copy of the project (copied from A2 to Dropbox) also now opens from Dropbox without Scrivener thinking it is anywhere else. :)

Close Scrivener. Confirm that Dropbox shows happy green checkmarks. Now will shut down A2 entirely. In about 12-18 hours, I will fire up B, wait for Dropbox sync, and then try to launch the DB copy from B. Fingers crossed that that I don't get a message that it's open on A2 (which should be impossible, as the computer will be powered off) .....

If that works happily, then I will try opening it with the Windows beta (from a third computer, W) as well. If that works, then ... :D Endless awesomeness. :)

I have high hopes! I am not sure what happened to get Scrivener thinking that projects were always opened somewhere else. There must have been some weird error in syncing or something (not that it matters for the integrity of the project, since I now have a new copy that never previously went through sync, as well as a local backup of that, and all the backup zip files) that threw it for a loop. I have been pretty careful all along, but it's always possible that I or a network connection sneezed somewhere .....

User avatar
MimeticMouton
Posts: 8679
Joined: Wed May 05, 2010 5:39 am
Platform: Mac + Windows
Location: city of rain
Contact:

Thu Apr 07, 2011 3:53 am Post

carlaz wrote:There must have been some weird error in syncing or something


I haven't tested this, but I've had little Dropbox issues in the past (mostly due to large file and a lousy network connection, nothing ever horrifying and only when I was testing anyway). I wonder if you did get a sync error once where the user.lock file was copied to Dropbox and then never got removed, and now it's just persistent--possibly having gotten the name changed or whatever, so that Scrivener isn't touching it to remove it but is still recognizing it as a "this project is open" warning. (As far as the computer name, that's just stored statically in the user.lock file, so once it's created it isn't changed. Thus your changing the computer name doesn't affect that file, which was created back when you last opened the project on that computer.)
Jennifer Hughes
(MM for short)

ca
carlaz
Posts: 29
Joined: Thu Oct 11, 2007 11:16 am
Platform: Mac + Windows
Location: Bogota, Colombia
Contact:

Thu Apr 07, 2011 1:10 pm Post

Yes, based on what you describe, a somewhat random error acting on the user.lock file would seem a plausible culprit.

I have now actually deviated from my test plan slightly by opening the project (last saved to Dropbox from Mac A2, itself currently powered down) on my Windows machine W. Although I did see some funkiness in the displayed content, I got no messages about the file being open elsewhere -- which I take as a good sign. :) The visible funkiness may be Mac-Winbeta issues (?) and quite likely nothing to do with Dropbox, though I shall go away and start studying the Scrivener for Windows forums to learn about that. With the Windows beta and project now closed on the Windows machine, I'll trying opening from Dropbox on Mac B later on today.

so
sophifire
Posts: 5
Joined: Fri Mar 18, 2011 8:40 pm
Platform: Mac

Tue May 17, 2011 11:46 am Post

Hello,
Thanks for help with my previous query: I think I've got the synopsis/note card deal now, and the Scrivener /Dropbox/ Plaintext has been working a dream....

Until today!:
I did a chunk of work on Plaintext (via iphone) and then synced it to the project on my laptop, but it didn't upload the new work. When I opened it on Plaintext -- gah! -- it synced with dropbox and got the old version, in other words I lost 1000 words. Is there any way of retrieving it? I know with Scrivener and you see the pre-sync snapshots, but this was on plaintext.
And if not, any tips for not letting this happen again?
Have also been having problems with plaintext rolling back a few minutes and reverting to previous versions of sentences etc. while using a document. Anyone else had this?
Don't want to drop this system as when it works it's great...but problems beginning to outweigh convenience...
thanks
Sophifire

Online
User avatar
AmberV
Posts: 22420
Joined: Sun Jun 18, 2006 4:30 am
Platform: Mac + Linux
Location: Santiago de Compostela, Galiza
Contact:

Tue May 17, 2011 8:03 pm Post

I'm concerned, based on the comments you made toward the end, that PlainText might never have saved your work to Dropbox in the first place. But, if it did, you might be luck. Use the Dropbox icon in your menu bar to "Launch Dropbox Website". In the web interface, locate the files that reverted, and for each one, click the down-arrow to the right of it. At the top of the drop-down menu, you should see an option titled, "Previous Versions". Click that, and you'll go to a snapshot list (quite a bit like Scrivener's snapshots, really) where you can select a prior version and roll it back up to the top.

Like I said though, if PlainText never wrote your changes to the server in the first place, this list will not contain your edits, and you should get in touch with Hog Bay Software and see if there is anything you can do to help resolve what is happening with the program. Some basic advice though, just make sure you have a steady 'net connexion whenever you are working on Dropbox files with your iPad. There is an icon in the top-left corner that indicates when you are online. If that icon disappears, any work you are doing will not be synced until you get back within a WiFi zone.

To ease your mind on our side of the coin, I doubt anything went afoul with Scrivener---but when it does, you can usually revert mistakes by examining the Snapshots for the files in question. Unless you disable that option (which I really don't recommend unless you must), every time Scrivener makes a change to a file it backs up the original, first.
.:.
Ioa Petra'ka
“Whole sight, or all the rest is desolation.” —John Fowles

so
sophifire
Posts: 5
Joined: Fri Mar 18, 2011 8:40 pm
Platform: Mac

Fri May 20, 2011 9:22 am Post

Thanks so much AmberV. I did manage to retrieve some text through the dropbox site -- but there's something odd going on. The full text was in Scrivener, but in a different document, one that was saved in a file called Old Drafts. I'm sure I didn't put it there. If it was a one-time thing I'd put it down to me being mental, but it's happened again with another document. Not sure what's going on!
Thanks again, and if you have any idea what this problem might be about i'd be glad to hear it.
Thanks
Sophifire

so
sophifire
Posts: 5
Joined: Fri Mar 18, 2011 8:40 pm
Platform: Mac

Fri May 20, 2011 9:23 am Post

Sorry, scratch that. The new files are not within another file, but at the very bottom of the Draft folder...