client icon indicating copy to clipboard operation
client copied to clipboard

OSX client poorly detects remote changes

Open rfpn311 opened this issue 13 years ago • 28 comments

I'm currently running the OSX Client 1.3.0beta3. The same behavior exists with 1.2.5.

Here's the setup: client1 - OSX client2 - iOS server - CentOS 6.4 running 5.0.7. type of files edited: .txt and .md

If OSX makes the change, it successfully gets updated on the server. The iOS app has no trouble detecting the change.

If the iOS app makes the change, the file still successfully gets updated on the server. However, the OSX client (both 1.30beta3 and 1.2.5) fail to detect changes. This is reproducible every time. I can see the updated file from the ownCloud server web interface and the outdated file sitting on my OSX client.

To take this one step further, if I create a totally new file on iOS, the OSX client finds out about that file and the files above that it previously missed. All files are synced as they should.

There is something not quite right with how the OSX client is detecting remote changes.

rfpn311 avatar Jun 20 '13 19:06 rfpn311

Please follow the guidelines for contributing (https://github.com/owncloud/mirall/blob/master/CONTRIBUTING.md). I need a full log of the client while it happens.

danimo avatar Jun 20 '13 19:06 danimo

Could you also try beta4 (http://owncloud.org/sync-clients/#testing)? We changed some things there that might be relevant.

danimo avatar Jun 20 '13 19:06 danimo

I just tried beta4 and the same behavior exists. I completely removed the old OSX clients and its related ~/Library/Application Support/owncloud/ files. I then installed the new client. After the initial sync completed I made a change from iOS. The file synced to the server within seconds. The OSX client detected nothing. That was almost 10 minutes ago and the changes still have not been detected. This is reproducible every time.

My apologizes for not attaching the client logs before. Here they are:

~ $ /Applications/owncloud.app/Contents/MacOS/owncloud --logfile log.txt void Mirall::Application::setupTranslations() Using "en" translation executable path is /Applications/owncloud.app/Contents/MacOS/owncloud executable path is /Applications/owncloud.app/Contents/MacOS/owncloud ~ $

rfpn311 avatar Jun 20 '13 20:06 rfpn311

And the contents of log.txt? :) (Please paste here https://gist.github.com/ and add the link)

danimo avatar Jun 20 '13 20:06 danimo

Oops :) See here: https://gist.github.com/rfpn311/5826231

The file that I edited was "documents/notes/tmp/Scratch.md"

rfpn311 avatar Jun 20 '13 20:06 rfpn311

I cannot reproduce this with oC 4.5.4

guruz avatar Jun 20 '13 20:06 guruz

@guruz Do you have a 5.x instance to test with?

danimo avatar Jun 20 '13 20:06 danimo

The file still has not updated on OSX. On the server I see "modified 9 minutes ago." On OSX I see the file was modified 66 minutes ago. The contents of the file is different depending on location.

FWIW, the iOS app I'm using to make changes is Daedalus, although the app should be irrelevant because the changes are being successfully and consistently sent to the oC server within seconds.

rfpn311 avatar Jun 20 '13 21:06 rfpn311

An additional confirmation that the files differ...

From the oC server: $ md5sum Scratch.md bce1c2e40e9c449b1faef0cc86cb5f95 Scratch.md

From OSX client: $ md5 Scratch.md MD5 (Scratch.md) = 96a141926c593fe2e6227d6035447f60

rfpn311 avatar Jun 20 '13 21:06 rfpn311

Can you check if uploading a file from the iOS client changes the etag for you?

Check the output of

curl -X PROPFIND https://user:[email protected]/remote.php/webdav/documents/notes |tidy -xml -i

The getetag property of the the tmp subdirectory should change whenever a file underneath that directory changes. Does it do that whenever you modify something on the iOS app?

danimo avatar Jun 20 '13 21:06 danimo

etag and lastmodified are both getting updated when the iOS client makes an edit to Scratch.md

Before:

  <d:response>
    <d:href>/remote.php/webdav/documents/notes/tmp/</d:href>
    <d:propstat>
      <d:prop>
        <d:getetag>"51c3720a80742"</d:getetag>
        <d:getlastmodified>Thu, 20 Jun 2013 21:20:02
        GMT</d:getlastmodified>
        <d:resourcetype>
          <d:collection />
        </d:resourcetype>
        <d:quota-used-bytes>91025</d:quota-used-bytes>
        <d:quota-available-bytes>
        489510109184</d:quota-available-bytes>
      </d:prop>
      <d:status>HTTP/1.1 200 OK</d:status>
    </d:propstat>
  </d:response>

After:

  <d:response>
    <d:href>/remote.php/webdav/documents/notes/tmp/</d:href>
    <d:propstat>
      <d:prop>
        <d:getetag>"51c3801c40c8d"</d:getetag>
        <d:getlastmodified>Thu, 20 Jun 2013 22:20:11
        GMT</d:getlastmodified>
        <d:resourcetype>
          <d:collection />
        </d:resourcetype>
        <d:quota-used-bytes>91036</d:quota-used-bytes>
        <d:quota-available-bytes>
        489509855232</d:quota-available-bytes>
      </d:prop>
      <d:status>HTTP/1.1 200 OK</d:status>
    </d:propstat>
  </d:response>

rfpn311 avatar Jun 20 '13 22:06 rfpn311

As a test, I edited a file under documents/notes/tmp/ from the oC web interface. It was almost instantly pulled down by the OSX client. Here's the related curl output which looks about the same from what I can tell:

Before:

  <d:response>
    <d:href>/remote.php/webdav/documents/notes/tmp/</d:href>
    <d:propstat>
      <d:prop>
        <d:getetag>"51c388a1e0229"</d:getetag>
        <d:getlastmodified>Thu, 20 Jun 2013 22:56:33
        GMT</d:getlastmodified>
        <d:resourcetype>
          <d:collection />
        </d:resourcetype>
        <d:quota-used-bytes>92143</d:quota-used-bytes>
        <d:quota-available-bytes>
        489509040128</d:quota-available-bytes>
      </d:prop>
      <d:status>HTTP/1.1 200 OK</d:status>
    </d:propstat>
  </d:response>

After:

  <d:response>
    <d:href>/remote.php/webdav/documents/notes/tmp/</d:href>
    <d:propstat>
      <d:prop>
        <d:getetag>"51c389dfe9085"</d:getetag>
        <d:getlastmodified>Thu, 20 Jun 2013 23:01:51
        GMT</d:getlastmodified>
        <d:resourcetype>
          <d:collection />
        </d:resourcetype>
        <d:quota-used-bytes>92173</d:quota-used-bytes>
        <d:quota-available-bytes>
        489509036032</d:quota-available-bytes>
      </d:prop>
      <d:status>HTTP/1.1 200 OK</d:status>
    </d:propstat>
  </d:response>

rfpn311 avatar Jun 20 '13 23:06 rfpn311

Did the etags for the whole path structure also change? So for /documents/ and /documents/notes/?

I'm also wondering, if you tail your access log, does it show the interval syncs by the OS X client?

guruz avatar Jun 21 '13 07:06 guruz

The etags only changed for the /documents/notes/tmp/:

Before:

  <d:response>
    <d:href>/remote.php/webdav/documents/</d:href>
    <d:propstat>
      <d:prop>
        <d:getetag>"51c44c7182411"</d:getetag>
        <d:getlastmodified>Fri, 21 Jun 2013 12:52:01
        GMT</d:getlastmodified>
        <d:resourcetype>
          <d:collection />
        </d:resourcetype>
        <d:quota-used-bytes>92182</d:quota-used-bytes>
        <d:quota-available-bytes>
        489575006208</d:quota-available-bytes>
      </d:prop>
      <d:status>HTTP/1.1 200 OK</d:status>
    </d:propstat>
  </d:response>
  <d:response>
    <d:href>/remote.php/webdav/documents/notes/</d:href>
    <d:propstat>
      <d:prop>
        <d:getetag>"51c44c71821e3"</d:getetag>
        <d:getlastmodified>Fri, 21 Jun 2013 12:52:01
        GMT</d:getlastmodified>
        <d:resourcetype>
          <d:collection />
        </d:resourcetype>
        <d:quota-used-bytes>92182</d:quota-used-bytes>
        <d:quota-available-bytes>
        489575006208</d:quota-available-bytes>
      </d:prop>
      <d:status>HTTP/1.1 200 OK</d:status>
    </d:propstat>
  </d:response>
  <d:response>
    <d:href>/remote.php/webdav/documents/notes/tmp/</d:href>
    <d:propstat>
      <d:prop>
        <d:getetag>"51c44c7181f8e"</d:getetag>
        <d:getlastmodified>Fri, 21 Jun 2013 12:52:01
        GMT</d:getlastmodified>
        <d:resourcetype>
          <d:collection />
        </d:resourcetype>
        <d:quota-used-bytes>92182</d:quota-used-bytes>
        <d:quota-available-bytes>
        489575006208</d:quota-available-bytes>
      </d:prop>
      <d:status>HTTP/1.1 200 OK</d:status>
    </d:propstat>
  </d:response>

After:

  <d:response>
    <d:href>/remote.php/webdav/documents/</d:href>
    <d:propstat>
      <d:prop>
        <d:getetag>"51c44c7182411"</d:getetag>
        <d:getlastmodified>Fri, 21 Jun 2013 12:52:01
        GMT</d:getlastmodified>
        <d:resourcetype>
          <d:collection />
        </d:resourcetype>
        <d:quota-used-bytes>92172</d:quota-used-bytes>
        <d:quota-available-bytes>
        489575002112</d:quota-available-bytes>
      </d:prop>
      <d:status>HTTP/1.1 200 OK</d:status>
    </d:propstat>
  </d:response>
  <d:response>
    <d:href>/remote.php/webdav/documents/notes/</d:href>
    <d:propstat>
      <d:prop>
        <d:getetag>"51c44c71821e3"</d:getetag>
        <d:getlastmodified>Fri, 21 Jun 2013 12:52:01
        GMT</d:getlastmodified>
        <d:resourcetype>
          <d:collection />
        </d:resourcetype>
        <d:quota-used-bytes>92172</d:quota-used-bytes>
        <d:quota-available-bytes>
        489575002112</d:quota-available-bytes>
      </d:prop>
      <d:status>HTTP/1.1 200 OK</d:status>
    </d:propstat>
  </d:response>
  <d:response>
    <d:href>/remote.php/webdav/documents/notes/tmp/</d:href>
    <d:propstat>
      <d:prop>
        <d:getetag>"51c44dba1f77a"</d:getetag>
        <d:getlastmodified>Fri, 21 Jun 2013 12:57:29
        GMT</d:getlastmodified>
        <d:resourcetype>
          <d:collection />
        </d:resourcetype>
        <d:quota-used-bytes>92172</d:quota-used-bytes>
        <d:quota-available-bytes>
        489575006208</d:quota-available-bytes>
      </d:prop>
      <d:status>HTTP/1.1 200 OK</d:status>
    </d:propstat>
  </d:response>

rfpn311 avatar Jun 21 '13 13:06 rfpn311

When I tail the access logs I do see the interval syncs by the OSX client. Further evidence of that is that the client quickly picks up changes if they're made from the oC web interface or if the iOS clients creates a totally new file.

rfpn311 avatar Jun 21 '13 13:06 rfpn311

That is a bug with the server then. The etag needs to change for the whole path of paths. @MTGap ?

EDIT: Or it is related to iOS app and editing files vs creating them? How can I edit a text file in the iOS app?

guruz avatar Jun 21 '13 13:06 guruz

I tested an edit from the oC web interface and I do see etags changing for all three: documents/, documents/notes/, documents/notes/tmp/. So there definitely does appear to be different behavior when I make an edit from the app on iOS.

I don't know much about webdav. Is it even possible for this to be an iOS client issue? Does the client get into the details of which etags get modified?

Also, the particular iOS app I'm using is called Daedalus. It's a note taking app. I'm looking at using it along with oC to replace some Evernote functionality. Link: http://daedalusapp.com/

rfpn311 avatar Jun 21 '13 16:06 rfpn311

I did some additional testing to hopefully eliminate the iOS client as the culprit. My previous tests were with an iOS app called Daedalus. I conducted more tests with a different app called iFiles. The results were the same in that the OSX client did not pick up the changes. The etags for documents/ and documents/notes/ were not modified. Thoughts?

Before:

  <d:response>
    <d:href>/remote.php/webdav/documents/</d:href>
    <d:propstat>
      <d:prop>
        <d:getetag>"51c48381a3a57"</d:getetag>
        <d:getlastmodified>Fri, 21 Jun 2013 16:46:56
        GMT</d:getlastmodified>
        <d:resourcetype>
          <d:collection />
        </d:resourcetype>
        <d:quota-used-bytes>91652</d:quota-used-bytes>
        <d:quota-available-bytes>
        489575051264</d:quota-available-bytes>
      </d:prop>
      <d:status>HTTP/1.1 200 OK</d:status>
    </d:propstat>
  </d:response>
  <d:response>
    <d:href>/remote.php/webdav/documents/notes/</d:href>
    <d:propstat>
      <d:prop>
        <d:getetag>"51c48381a3821"</d:getetag>
        <d:getlastmodified>Fri, 21 Jun 2013 16:46:56
        GMT</d:getlastmodified>
        <d:resourcetype>
          <d:collection />
        </d:resourcetype>
        <d:quota-used-bytes>91652</d:quota-used-bytes>
        <d:quota-available-bytes>
        489575051264</d:quota-available-bytes>
      </d:prop>
      <d:status>HTTP/1.1 200 OK</d:status>
    </d:propstat>
  </d:response>
  <d:response>
    <d:href>/remote.php/webdav/documents/notes/tmp/</d:href>
    <d:propstat>
      <d:prop>
        <d:getetag>"51c48381a2543"</d:getetag>
        <d:getlastmodified>Fri, 21 Jun 2013 16:46:56
        GMT</d:getlastmodified>
        <d:resourcetype>
          <d:collection />
        </d:resourcetype>
        <d:quota-used-bytes>91652</d:quota-used-bytes>
        <d:quota-available-bytes>
        489575051264</d:quota-available-bytes>
      </d:prop>
      <d:status>HTTP/1.1 200 OK</d:status>
    </d:propstat>
  </d:response>

After:

  <d:response>
    <d:href>/remote.php/webdav/documents/</d:href>
    <d:propstat>
      <d:prop>
        <d:getetag>"51c48381a3a57"</d:getetag>
        <d:getlastmodified>Fri, 21 Jun 2013 16:46:56
        GMT</d:getlastmodified>
        <d:resourcetype>
          <d:collection />
        </d:resourcetype>
        <d:quota-used-bytes>91666</d:quota-used-bytes>
        <d:quota-available-bytes>
        489575047168</d:quota-available-bytes>
      </d:prop>
      <d:status>HTTP/1.1 200 OK</d:status>
    </d:propstat>
  </d:response>
  <d:response>
    <d:href>/remote.php/webdav/documents/notes/</d:href>
    <d:propstat>
      <d:prop>
        <d:getetag>"51c48381a3821"</d:getetag>
        <d:getlastmodified>Fri, 21 Jun 2013 16:46:56
        GMT</d:getlastmodified>
        <d:resourcetype>
          <d:collection />
        </d:resourcetype>
        <d:quota-used-bytes>91666</d:quota-used-bytes>
        <d:quota-available-bytes>
        489575047168</d:quota-available-bytes>
      </d:prop>
      <d:status>HTTP/1.1 200 OK</d:status>
    </d:propstat>
  </d:response>
  <d:response>
    <d:href>/remote.php/webdav/documents/notes/tmp/</d:href>
    <d:propstat>
      <d:prop>
        <d:getetag>"51c48444ea6af"</d:getetag>
        <d:getlastmodified>Fri, 21 Jun 2013 16:50:11
        GMT</d:getlastmodified>
        <d:resourcetype>
          <d:collection />
        </d:resourcetype>
        <d:quota-used-bytes>91666</d:quota-used-bytes>
        <d:quota-available-bytes>
        489575047168</d:quota-available-bytes>
      </d:prop>
      <d:status>HTTP/1.1 200 OK</d:status>
    </d:propstat>
  </d:response>

rfpn311 avatar Jun 21 '13 16:06 rfpn311

@icewind1991 @schiesbn @MTGap. Can you help out with debugging this?

danimo avatar Jun 24 '13 08:06 danimo

I have the same problem as @rfpn311. Server version 5.0.7, client A has Windows 7 with sync client 1.2.5 and client B has Mac OS X 10.7.4 with also sync client 1.2.5. When client B create a file in any folder client A get notified almost immediately, but when client A create's a file client B doesn't get notified at all. After 4-5 days there happens a very long sync on client B and then all the missing files are placed. If I can offer any help, I would be happy to assist/contribute.

EDIT: Recertification: my problem is not the same as @rfpn311. The OS X Client doesn't notice new file's but does notice edited files, as opposed to rfpn311 were edited files aren't noticed and newly created files are. Should I make a seperate issue for my problem?

bluecola avatar Jun 24 '13 15:06 bluecola