Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

File content often stale on iOS with third-party providers #12

Closed
amake opened this issue Jun 13, 2020 · 8 comments
Closed

File content often stale on iOS with third-party providers #12

amake opened this issue Jun 13, 2020 · 8 comments
Labels
bug Something isn't working

Comments

@amake
Copy link
Owner

amake commented Jun 13, 2020

  1. Open a file stored in Dropbox or Google Drive
  2. Close file and note that it is listed in the Recent Files list
  3. Modify the file from elsewhere (e.g. on another machine) and confirm that the changes have synced to the provider
  4. Reopen the file in Orgro from the Recent Files list

With Google Drive (and Dropbox, according to reports) the contents will often not be updated. With iCloud Drive the contents do seem to update consistently.

It seems you can force-update the data if you:

  1. Find the file in the picker or the iOS Files app
  2. Long-press it and choose Info from the popup context menu
  3. Wait for the Information section to populate
  4. Then pick the file

It is unknown if this is a bug or is intentional behavior.

@amake amake added the bug Something isn't working label Jun 13, 2020
@linguistgate
Copy link

Having similar problem with Dropbox. Not updating when I make changes. Have to delete file and download again to Recents.

@amake
Copy link
Owner Author

amake commented Aug 13, 2020

I've looked into this a bit, and it seems like either

  1. that's just how Apple's files API works (Is it a bug? Is it intended behavior? Who knows!), or
  2. the apps (Dropbox, Google Drive, etc.) are doing something wrong on their end

I couldn't find any way to force-update the data programmatically from Orgro. So I'm kind of at a dead end.

@linguistgate
Copy link

linguistgate commented Aug 13, 2020 via email

@thorbenandresen
Copy link

FWIW, here is my workaround to do a one-way sync from Dropbox to iCloud of my org-roam files

  • It runs rsync for the one-way sync
  • It only runs when the saved buffer is an org-mode buffer and within my org-roam-directory
  • It also prints a log to my desktop
(defun my/sync-roam-to-icloud ()
  (when (and (eq major-mode 'org-mode) (string= org-roam-directory (file-name-directory buffer-file-name)))
    (shell-command (concat "rsync -a " org-roam-directory " "
                           (shell-quote-argument  "/Users/<username>/Library/Mobile Documents/com~apple~CloudDocs/@docs/roam/" )
                           " --log-file=$HOME/Desktop/roam-rsync.log"
                           ))
    ))

(add-hook 'after-save-hook #' my/sync-roam-to-icloud)

I do this because I really would like to keep Dropbox as my main sync engine (mainly because of Dropbox's version history feature) but I would still like to see the latest versions of my files in orgo

@amake
Copy link
Owner Author

amake commented Apr 4, 2021

I think I've figured this out. I tested with Google Drive and this seemed to do the trick: hpoul/file_picker_writable#17

@amake
Copy link
Owner Author

amake commented Apr 26, 2021

This will be fixed in v1.18.0, which will be available for testing soon:

@amake
Copy link
Owner Author

amake commented Apr 27, 2021

v1.18.0 is now available for testing on Test Flight and Google Play.

@amake
Copy link
Owner Author

amake commented May 3, 2021

v1.18.1 has been released.

@amake amake closed this as completed May 3, 2021
amake added a commit that referenced this issue Oct 28, 2022
```
══╡ EXCEPTION CAUGHT BY SCHEDULER LIBRARY ╞═════════════════════════════════════════════════════════
The following assertion was thrown during a scheduler callback:
Layer OffsetEngineLayer was previously used as oldLayer.
Once a layer is used as oldLayer, it may not be used again. Instead, after calling one of the
SceneBuilder.push* methods and passing an oldLayer to it, use the layer returned by the method as
oldLayer in subsequent frames.
'dart:ui/compositing.dart':
Failed assertion: line 110 pos 9: '<optimized out>'

Either the assertion indicates an error in the framework itself, or we should provide substantially
more information in this error message to help you determine and fix the underlying cause.
In either case, please report this assertion by filing a bug on GitHub:
  https://github.com/flutter/flutter/issues/new?template=2_bug.md

When the exception was thrown, this was the stack:
#2      _EngineLayerWrapper._debugCheckNotUsedAsOldLayer (dart:ui/compositing.dart:110:9)
#3      SceneBuilder.addRetained.<anonymous closure>.recursivelyCheckChildrenUsedOnce (dart:ui/compositing.dart:695:21)
#4      List.forEach (dart:core-patch/growable_array.dart:416:8)
#5      SceneBuilder.addRetained.<anonymous closure>.recursivelyCheckChildrenUsedOnce (dart:ui/compositing.dart:701:18)
#6      SceneBuilder.addRetained.<anonymous closure> (dart:ui/compositing.dart:704:7)
#7      SceneBuilder.addRetained (dart:ui/compositing.dart:707:6)
#8      Layer._addToSceneWithRetainedRendering (package:flutter/src/rendering/layer.dart:671:15)
#9      ContainerLayer.addChildrenToScene (package:flutter/src/rendering/layer.dart:1284:13)
#10     OffsetLayer.addToScene (package:flutter/src/rendering/layer.dart:1421:5)
#11     Layer._addToSceneWithRetainedRendering (package:flutter/src/rendering/layer.dart:674:5)
#12     ContainerLayer.addChildrenToScene (package:flutter/src/rendering/layer.dart:1284:13)
#13     ClipRectLayer.addToScene (package:flutter/src/rendering/layer.dart:1590:5)
#14     Layer._addToSceneWithRetainedRendering (package:flutter/src/rendering/layer.dart:674:5)
#15     ContainerLayer.addChildrenToScene (package:flutter/src/rendering/layer.dart:1284:13)
#16     OffsetLayer.addToScene (package:flutter/src/rendering/layer.dart:1421:5)
#17     Layer._addToSceneWithRetainedRendering (package:flutter/src/rendering/layer.dart:674:5)
#18     ContainerLayer.addChildrenToScene (package:flutter/src/rendering/layer.dart:1284:13)
#19     OffsetLayer.addToScene (package:flutter/src/rendering/layer.dart:1421:5)
#20     Layer._addToSceneWithRetainedRendering (package:flutter/src/rendering/layer.dart:674:5)
#21     ContainerLayer.addChildrenToScene (package:flutter/src/rendering/layer.dart:1284:13)
#22     OffsetLayer.addToScene (package:flutter/src/rendering/layer.dart:1421:5)
#23     Layer._addToSceneWithRetainedRendering (package:flutter/src/rendering/layer.dart:674:5)
#24     ContainerLayer.addChildrenToScene (package:flutter/src/rendering/layer.dart:1284:13)
#25     TransformLayer.addToScene (package:flutter/src/rendering/layer.dart:1914:5)
#26     ContainerLayer.buildScene (package:flutter/src/rendering/layer.dart:1097:5)
#27     RenderView.compositeFrame (package:flutter/src/rendering/view.dart:231:37)
#28     RendererBinding.drawFrame (package:flutter/src/rendering/binding.dart:514:18)
#29     WidgetsBinding.drawFrame (package:flutter/src/widgets/binding.dart:869:13)
#30     RendererBinding._handlePersistentFrameCallback (package:flutter/src/rendering/binding.dart:375:5)
#31     SchedulerBinding._invokeFrameCallback (package:flutter/src/scheduler/binding.dart:1271:15)
#32     SchedulerBinding.handleDrawFrame (package:flutter/src/scheduler/binding.dart:1200:9)
#33     SchedulerBinding._handleDrawFrame (package:flutter/src/scheduler/binding.dart:1058:5)
#34     _invoke (dart:ui/hooks.dart:145:13)
#35     PlatformDispatcher._drawFrame (dart:ui/platform_dispatcher.dart:338:5)
#36     _drawFrame (dart:ui/hooks.dart:112:31)
(elided 2 frames from class _AssertionError)
════════════════════════════════════════════════════════════════════════════════════════════════════
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants