-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Internal 2way sync #13294
Internal 2way sync #13294
Conversation
tobiasKaminsky
commented
Jul 19, 2024
•
edited
Loading
edited
- Tests written, or not not needed
a6954cd
to
aba0d56
Compare
This would be a dream come true. |
Hello, It looks like the link is dead. Where I can download this apk for testing ? |
8d5d4db
to
9f8a3b0
Compare
app/src/main/java/com/nextcloud/client/jobs/InternalTwoWaySyncWork.kt
Outdated
Show resolved
Hide resolved
app/src/main/java/com/nextcloud/client/jobs/InternalTwoWaySyncWork.kt
Outdated
Show resolved
Hide resolved
app/src/main/java/com/nextcloud/client/jobs/InternalTwoWaySyncWork.kt
Outdated
Show resolved
Hide resolved
app/src/main/java/com/owncloud/android/ui/activity/InternalTwoWaySyncActivity.kt
Outdated
Show resolved
Hide resolved
app/src/main/java/com/nextcloud/client/jobs/InternalTwoWaySyncWork.kt
Outdated
Show resolved
Hide resolved
app/src/main/java/com/owncloud/android/ui/adapter/InternalTwoWaySyncAdapter.kt
Outdated
Show resolved
Hide resolved
app/src/main/java/com/owncloud/android/ui/adapter/InternalTwoWaySyncViewHolder.kt
Outdated
Show resolved
Hide resolved
app/src/main/java/com/owncloud/android/ui/adapter/InternalTwoWaySyncViewHolder.kt
Outdated
Show resolved
Hide resolved
app/src/main/java/com/owncloud/android/ui/fragment/FileDetailFragment.java
Show resolved
Hide resolved
app/src/main/java/com/owncloud/android/ui/activity/InternalTwoWaySyncActivity.kt
Outdated
Show resolved
Hide resolved
dba9100
to
660f61f
Compare
33c50ac
to
b332b34
Compare
Signed-off-by: tobiasKaminsky <[email protected]>
b332b34
to
82c6956
Compare
APK file: https://www.kaminsky.me/nc-dev/android-artifacts/13294.apk |
Hey @AndyScherzinger so i download this on S24 Ultra to try it out and when i click on Internal two way sync i get a white screen and nothing else. |
Same issue and logs on Google Pixel 6 and Android 14. Edit: I'd suggest a UI review to see how we can make it more intuitive to the users. Now onto testing! |
A better UI is in #13494 |
Same issue and logs on POCO and Android 13 and pre-syncing the folder does not help |
Hi! First of all, thank you very much for this awesome feature, @tobiasKaminsky. It is really great to have it in Nextcloud because it is a really useful feature. I don't know if this PR is the best place to ask about this feature, if it isn't, just let me know and I will move the comment there: How often should the internal 2-way sync be fired? Is it scheduled to be fired in a specific amount of time ( Regards |
@ivanhercaz the sync is scheduled to run every 15 minutes and will do so given it has a WiFi connection at that time and else try 15 minutes later again |
@AndyScherzinger, thank you very much for the information! |
With this latest update, when I go to "menu -> settings -> internal two way sync" I just get a black screen. EDIT: This appears to be the same issue as @AndyXheli but with the black theme. Navigating to the details of a folder I get this error: Exception in thread "main" java.lang.NullPointerException: Attempt to invoke virtual method 'long java.lang.Long.longValue()' on a null object reference
at com.owncloud.android.datamodel.OCFile.isInternalFolderSync(OCFile.java:1058)
at com.owncloud.android.ui.fragment.FileDetailFragment.updateFileDetails(FileDetailFragment.java:569)
at com.owncloud.android.ui.fragment.FileDetailFragment.onViewCreated(FileDetailFragment.java:266)
at androidx.fragment.app.Fragment.performViewCreated(Fragment.java:3152)
at androidx.fragment.app.FragmentStateManager.createView(FragmentStateManager.java:608)
at androidx.fragment.app.FragmentStateManager.moveToExpectedState(FragmentStateManager.java:286)
at androidx.fragment.app.FragmentManager.executeOpsTogether(FragmentManager.java:2164)
at androidx.fragment.app.FragmentManager.removeRedundantOperationsAndExecute(FragmentManager.java:2059)
at androidx.fragment.app.FragmentManager.execPendingActions(FragmentManager.java:2002)
at androidx.fragment.app.FragmentManager$5.run(FragmentManager.java:702)
at android.os.Handler.handleCallback(Handler.java:938)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loopOnce(Looper.java:201)
at android.os.Looper.loop(Looper.java:288)
at android.app.ActivityThread.main(ActivityThread.java:7839)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1003) With:
Downgrading to 30290390 fixes this problem. |
Van you please raise it as a new ticket and ping @tobiasKaminsky and @alperozturk96 please? Thanks in advance 🙏 |
Okay. The above issue was fixed with #13612 however, no two way sync seems to be happening. My test:
The file never seems to be uploaded to nextcloud. Is this behavior expected? |
I'd say no. Expected behavior would be that the files gets picked up. |
@superzanti @tobiasKaminsky @AndyScherzinger I fix the worker as well. It should work now, fyi. |
Unfortunately I still have the same behavior. Is there anything I can provide to assist in the debug? |
Hey, I encountered the same behavior that I described a week ago in the Nextcloud Forum. Unfortunately, the proposed fix isn't working for me either. I’d be happy to assist further if needed or provide any additional information that could help with the resolution. |
Test results : Then i turned off notifications forgot about it and it seems to work perfectly now , after some weeks. I didn't try to place a new file in the dir without using the app to see if it uploads. |
@saziton Would you try this? It doesn't work for me. |
With the latest changes, these issues have been solved as well. |
Unfortunately, the new version does not solve the problem for me. Perhaps someone can confirm this? |
@tobias0409 Confirmed. And no matter how long I leave it syncing I still see "Not yet, soon to be synced" in Settings > Internal two way sync Edit: Scratch that. I spoke too soon. As soon as I added a file on the server, my phone pulled it down and spent about 10 minutes syncing all 213 files in that folder (it's KB so it really shouldn't take that long). Then it reported correctly as: "3 minutes ago" indicating it has synced. Unfortunately, It's still not picking up files I add to that folder on my phone. |
After the latest changes, I tried and it worked as expected. Background job runs every 15 minute. Thank you very much for your messages and feedback. @tobias0409 Could you try with this apk? |
I just ran the test with the new build, but had no success. Steps:
The changes were never picked up. |
Hey, I tried the new version. Still the same issue - all data changes (create, modify, delete) outside the nc app are not recognized or reset. |
Are there any updates or progress on this? |
We released 3.30.1 RC1 (fixes NPE and two-way sync worker behavior) . However, the checked status of the folder disappears after some time. We will gather more information based on this RC release and address the issue. I suggest continue from this link. Thank you. |
Hey, thank you for the information. What about the error that files / folders that were created, modified, or deleted outside Nexcloud app are not picked up? Beside the issue, the sync runs fine without errors. As far as I can see, the issue you linked is not related to the issue. The new version (3.30.1 RC1) does not fix the issue. Thank you. |
@alperozturk96 |
@superzanti It seems like we might be dealing with two issues here, as I encountered the one I mentioned earlier. @tobias0409 Would it be possible to create an issue for this? I just wanted to kindly remind everyone that we have a dedicated page for discussing bugs. It would be great if we could continue the conversation there to keep things organized. Thank you for understanding 💯 |