Where is my text?

da
darinb
Posts: 33
Joined: Mon Sep 25, 2017 11:16 pm
Platform: Mac

Wed Jan 31, 2018 12:14 am Post

Hello,

I'm just getting rolling with Scrivener. I'm working on a new project and I seem to have lost some text.

I have a laptop and an iMac, I use the iCloud feature where the desktops are mirrored (and my Scrivener folder is on the desktop, so it, too, is mirrored). I've been using it this way since just before the new version of Scrivener came out with no problems at all.

But just now I opened a file on my laptop. I created it on my laptop yesterday. I opened it last night on my iMac and made a few corrections and added a few notes. So far, so good.

Just now, on my laptop I opened the file and none of the corrections or notes are there. There was no warning dialog box or other indication that anything was amiss. It looked fine until I looked more closely.

As I pondered the issue I realized that my laptop was still syncing my desktop with iCloud. There was a new large video file that I had created last night on my iMac and thus (almost invisibly to me) it as taking longer than expected to sync upon the desktops. Realizing this I closed the Scrivener document (I had made no changes and it did not ask me to re-save). I waited until the iCloud sync was complete and opened the Scrivener document again. Same result--last night's changes were not there.

So, what happened?

--Darin

da
darinb
Posts: 33
Joined: Mon Sep 25, 2017 11:16 pm
Platform: Mac

Wed Jan 31, 2018 12:18 am Post

I just posted a follow up that was in error. I deleted it, fyi...

da
darinb
Posts: 33
Joined: Mon Sep 25, 2017 11:16 pm
Platform: Mac

Wed Jan 31, 2018 12:24 am Post

Another follow up.

Before I was opening the file from the "Open Recent" drop down box.

Just now I tried opening the same file via the Finder. I was presented with a dialog box warning me that there were two versions of there file, one dated last night from my iMac and the other from my laptop, that one dated a few minutes earlier. (As a reminder, the file was created yesterday, modified last night, and today opened but not edited or saved.)

is this a bug?

[Update] I double-checked. I canceled that dialog box and I went back to the :Open Recent" and it still happily opened the earlier version without complaint. I then opened the file once again from the Finder, got the dialog box, chose the older, desktop version, and opened the file. My notes and changes are all there. I then closed the file and tried to reopen it via the "Open Recent" drop down. This time it opened the correct, modified version.

--Darin
Attachments
Screen Shot 2018-01-30 at 4.19.13 PM.png
Screen Shot 2018-01-30 at 4.19.13 PM.png (65.98 KiB) Viewed 2147 times

User avatar
AmberV
Posts: 24876
Joined: Sun Jun 18, 2006 4:30 am
Platform: Mac + Linux
Location: Ourense, Galiza
Contact:

Wed Jan 31, 2018 3:09 pm Post

This all sounds like how iCloud Drive works to me. If it detects a conflict, which probably originated from your description of having opened the project before it finished syncing in the first post, then it will sometimes produce a choice like you see in the dialogue. That isn’t Scrivener, Finder will do that for any kind of file or package format.

It sounds like you have everything in order now, but in cases where the knot gets too tangled to easily unravel, it is sometimes best to make use of Scrivener’s automatic backups from the machine you most recently worked on, to resurrect a clean copy and replace the conflicted one.
.:.
Ioa Petra'ka
“Whole sight, or all the rest is desolation.” —John Fowles

da
darinb
Posts: 33
Joined: Mon Sep 25, 2017 11:16 pm
Platform: Mac

Thu Feb 01, 2018 1:22 am Post

Thanks, AmberV.

Your point of going back to the back-up is good one--except that it is quite likely that the user may have clue that he has opened an older file. say you heavily edited chapters 1 through 7, but you open it up and start working on chapter 8. It could be a very long time before you looked back and discovered all that work was missing. And god forbid this program occurred multiple time. It would be an out-of-sync mess.

I know you don't officially recommend using the iCloud desktop sync but it is a wonderful feature for all my other uses, and seems to be the direction that Apple is going.

I wonder, given this, if Scrivener could make it a tad safer to use for its own files.

Are any of these possible?

1). I go to open a Scrivener file and it warns me "Hey, your desktop is still syncing. Are you sure that your Scrivener file has already synced?"

2). And/or, since the MacOS sort of hides the syncing progress icon, could Scrivener have a more obvious one?

3). Display the last revision date in the "Open Recent" menu--to give us a chance to note the age of the file?

All of which assumes the discussions the developer is having with Apple regarding iCloud and packages does not bear fruit that results in a seamless solution....

The desktop mirroring works well, just trying to avoid that tiny little itty-bitty smidgen of doubt about my data integrity using the program

--Darin

User avatar
lunk
Posts: 4478
Joined: Wed Aug 21, 2013 4:24 pm
Platform: Mac + iOS
Location: Sweden 64° N

Thu Feb 01, 2018 7:45 am Post

darinb wrote:I know you don't officially recommend using the iCloud desktop sync but it is a wonderful feature for all my other uses, and seems to be the direction that Apple is going.


iCloud Desktop and iCloud Drive can be used in two ways. There is a tick box for ”Optimize Mac Storage”. If you turn that feature on, ”your Mac keeps all of your recent files on your computer, but keeps your older ones only in iCloud, ready for you to download when you need them again.”

With a project built as a package which could contain an almost unlimited number of files, I suspect that a project could easily become corrupted if not everything is downloaded to your Mac and kept in sync from there, like with Dropbox. Maybe Someone at L&L knows how this works? W ould all content in the package be downloaded to the Mac irrespective of its size and the number of files it contain?
I am a user, writing non-fiction and science, using:
* Mac Scrivener 3 on a Macbook 12”, MacBook Pro 13”, and iMac 27”, running different OS.
* iOS Scrivener 1 on an iPhone 11 Pro, iPad Air 9.7”, and iPad Pro 12.9”, all running the latest iOS

User avatar
AmberV
Posts: 24876
Joined: Sun Jun 18, 2006 4:30 am
Platform: Mac + Linux
Location: Ourense, Galiza
Contact:

Thu Feb 01, 2018 3:53 pm Post

This isn’t really the kind of technology you seem to be thinking it is, where there is an active relationship between the system that is manipulating your data on the device, and the software that makes use of that data. The way iCloud Drive works is, at the level we’re talking about, indistinguishable from how Finder works when you copy data around between folders.

Put aside all of the mystical abstractions and “just works” talk that Apple pushes in their marketing and look at the basic concept of what is happening here:

  • You use Preview to load a PDF that was modified on the 25th of January.
  • You close it.
  • You replace the PDF with one that was modified on the 27th. (Or if you wish to think of it differently, some automated system like iCloud or Box or whatever replaces the PDF.)
  • You use Preview to load a PDF that was modified on the 27th of January.

How, given that, is Preview supposed to know that later on when you replace that file with the one from the 25th, that what you really meant to do was open the one from the 27th—one that there is now zero evidence for having ever existed, on the disk?

That is the level Scrivener works at. If you cause something to replace its files with older versions, then when you ask it to load with that it is no different than when it loaded the project in that very state on the 25th. There was nothing suspicious about the project then, and there is nothing suspicious about it now.

darinb wrote:I go to open a Scrivener file and it warns me “Hey, your desktop is still syncing. Are you sure that your Scrivener file has already synced?”


I don’t think there is a way for one program to detect the state of iCloud and do anything about it—but even if it could, that would be something that most people disable fairly quickly as an option. You might be underestimating how often these services “work” in the background, and how completely unrelated 99% of those interruptions would be to what you are currently working on. It wouldn’t surprise me if you’d be dismissing that checkbox several times per hour even on a fairly basic setup.

And/or, since the MacOS sort of hides the syncing progress icon, could Scrivener have a more obvious one?


For that same reason, something spinning in your project window toolbar every time you get an email or whatever it takes to trigger networking with iCloud would very quickly become meaningless and ignored—or worse it would cause senseless confusion and unnecessary worry.

Besides those problems with the idea, I don’t think it is the role of all Mac developers to fix Apple’s broken UI, which seems to be the overall suggestion you’re making.

Surely the best response is to evaluate alternatives to what is causing the root problem? The system I use gives me precise millisecond accurate percentages on upload and download transactions and a full file queue of what is left to be transferred in either direction. I don’t have to guess or just wait for general overall status to complete, because I know for a fact whether or not the project I want to open is copied over and ready to open.

Display the last revision date in the “Open Recent” menu–to give us a chance to note the age of the file?


The recent-documents menu is an automated service that macOS injects into the menu system. What I do is use something equivalent to smart folder technology that gathers are all recently edited projects and sorts them by modification date. There are plenty of better tools for that job, if you need more of it than a simple list.

All of which assumes the discussions the developer is having with Apple regarding iCloud and packages does not bear fruit that results in a seamless solution….


I think maybe two different topics are getting mixed up here. This problem you are referring to involves the use of iCloud Drive. Packages are entirely irrelevant to iCloud Drive. It keeps files and folders in sync, that is all. Packages are folders with files in them. Thus packages sync just as well as ~/Documents does. There is technologically no difference between the two, and every difference you perceive as a user is merely an illusion painted by the front-end interface.

The desktop mirroring works well, just trying to avoid that tiny little itty-bitty smidgen of doubt about my data integrity using the program


It doesn’t though. :) You’re talking about the desktop mirroring here and how it generated a confusing integrity issue, resulting in a reversion of your hard work. You’re looking at the lens that you used to see the problem and blaming the lens. The problem isn’t in the software that tried to open the confused data—it’s the desktop mirroring software that confused your data! So long as the latter produces a result that appears coherent to the software that loads said data, there is no way for software to know that you as a human meant anything different to happen.

We’re back to the start, where a PDF program cannot know that there were other, maybe even newer, versions of the PDF that once existed.

lunk wrote:Maybe Someone at L&L knows how this works? W ould all content in the package be downloaded to the Mac irrespective of its size and the number of files it contain?


Perhaps someone has looked into it, but Apple would probably be the better authority to ask on the matter of whether it preserves the integrity of folders denominated as packages.
.:.
Ioa Petra'ka
“Whole sight, or all the rest is desolation.” —John Fowles

da
darinb
Posts: 33
Joined: Mon Sep 25, 2017 11:16 pm
Platform: Mac

Fri Feb 02, 2018 8:29 am Post

I'm not sure I completely follow what your e-mail is getting at--my base concern is this:

When I open a file from within Scrivener I am not warned of a conflict. When I the open same file from within the Finder I am warned of a conflict.

Why doesn't Scrivener warn me about the conflict?

--Darin

User avatar
AmberV
Posts: 24876
Joined: Sun Jun 18, 2006 4:30 am
Platform: Mac + Linux
Location: Ourense, Galiza
Contact:

Fri Feb 02, 2018 1:05 pm Post

Why doesn’t Scrivener warn me about the conflict?


That’s what I was trying to explain, Scrivener isn’t involved in loading the project at the level you are talking about, where iCloud conflict conditions would be flagged to the operation. That’s an iCloud/Finder feature. I would certainly agree that the following methods should raise a conflict warning, but we cannot do anything about the fact that they do not:

  • Recent Projects method: that’s an Apple feature. The very same thing in fact as what you see off of the  ▸ Recent Items ▸  submenu. I believe also the capability to reopen projects automatically on load is also based on this same technology.
  • File ▸ Open... method: the dialogue box that lets you choose a file and open it is entirely macOS code.

Again think of the PDF analogy: Scrivener knows about the PDF from the 25th because that is what is stored on the disk. iCloud knows there is a PDF from the 27th, but that copy is stored in a cached area of the drive, not available to Scrivener or any other software. It is being held there, waiting for your answer on which version to use. iCloud, or one of Apple’s technologies for interfacing with files, must present that question to you and have an answer before the January 27th PDF is copied onto the public area of the disk that Scrivener loads from.
.:.
Ioa Petra'ka
“Whole sight, or all the rest is desolation.” —John Fowles

da
darinb
Posts: 33
Joined: Mon Sep 25, 2017 11:16 pm
Platform: Mac

Fri Feb 02, 2018 4:43 pm Post

O.K., I see what you are saying now. Thanks. I need to ponder what to do....

Meanwhile, just to dot the i's here, one more question:

If if the "Open Recent" drop down is a MacOS thing, why doesn't it warn of conflicts since it knows about them? Something seems wrong. :)

--Darin

User avatar
AmberV
Posts: 24876
Joined: Sun Jun 18, 2006 4:30 am
Platform: Mac + Linux
Location: Ourense, Galiza
Contact:

Fri Feb 02, 2018 6:30 pm Post

That's a very good question. :) I don't know the answer, but it does seem like an oversight to me. I would say the Open dialogue should warn you as well if it isn't.
.:.
Ioa Petra'ka
“Whole sight, or all the rest is desolation.” —John Fowles