floccusaddon / floccus

:cloud: Sync your bookmarks privately across browsers and devices
https://floccus.org
Mozilla Public License 2.0
5.7k stars 240 forks source link

Git on android/ios doesn't work #1608

Open mortifactor opened 5 months ago

mortifactor commented 5 months ago

Which version of floccus are you using?

5.1.1

How many bookmarks do you have, roughly?

1000+

Are you using other means to sync bookmarks in parallel to floccus?

No

Sync method

Git

Which browser are you using? In case you are using the phone App, specify the Android or iOS version and device please.

Android 9 Honor 20

Which version of Nextcloud Bookmarks are you using? (if relevant)

No response

Which version of Nextcloud? (if relevant)

No response

What kind of WebDAV server are you using? (if relevant)

No response

Describe the Bug

I'm importing profile from browser, which works. But I tried creating same profile from scratch and it did not work either. Profile uses github private repository. So I have "Failed to fetch" error after sync. And if I go to settings I get blank screen. That is why I can't attach debug logs. You can see it on video below.

Expected Behavior

Well, it should sync I believe.

To Reproduce

https://github.com/floccusaddon/floccus/assets/1426349/74cceade-5eb8-4992-b9e2-f8f3ffe6322c

Debug log provided

github-actions[bot] commented 5 months ago

Hello :wave:

Thank you for taking the time to open this issue with floccus. I know it's frustrating when software causes problems. You have made the right choice to come here and open an issue to make sure your problem gets looked at and if possible solved. I'm Marcel and I created floccus and have been maintaining it ever since. I currently work for Nextcloud which leaves me with less time for side projects like this one than I used to have. I still try to answer all issues and if possible fix all bugs here, but it sometimes takes a while until I get to it. Until then, please be patient. Note also that GitHub is a place where people meet to make software better together. Nobody here is under any obligation to help you, solve your problems or deliver on any expectations or demands you may have, but if enough people come together we can collaborate to make this software better. For everyone. Thus, if you can, you could also have a look at other issues to see whether you can help other people with your knowledge and experience. If you have coding experience it would also be awesome if you could step up to dive into the code and try to fix the odd bug yourself. Everyone will be thankful for extra helping hands! One last word: If you feel, at any point, like you need to vent, this is not the place for it; you can go to the forum, to twitter or somewhere else. But this is a technical issue tracker, so please make sure to focus on the tech and keep your opinions to yourself.

I look forward to working with you on this issue Cheers :blue_heart:

marcelklehr commented 5 months ago

It's possible this is a network problem. I'll look into the settings issue.

babblerz commented 5 months ago

I have the same issue. Using 5.1.2. This is what I get in the android log:

Capacitor/Console: File: http://localhost/#/tree/17158905901720.4856727622664514 - Line 0 - Msg: Access to fetch at 'https://redacted.com/redactedusername/floccusbookmarks/info/refs?service=git-upload-pack' from origin 'http://localhost' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.

The same server with the browser plugin works ok. Also tried it with a github.com account and the error is the same.

marcelklehr commented 5 months ago

Ah, thank you for the extended log, @babblerz The error makes sense now. I'll look into fixing this.

marcelklehr commented 5 months ago

Fixed the settings issue. I can reproduce the CORS issue, I'll look into fixing it.

marcelklehr commented 4 months ago

Upstream blocker: https://github.com/ionic-team/capacitor/issues/7473

dcanl commented 4 months ago

Hello,

Just posting to follow this issue which I encounter myself too.

Thank you for your work!

mdcayton commented 4 months ago

Similar issue. Looks like if fails to checkout the branch.

2024-05-31T16:44:21.293Z Starting sync process for account user@mail.tld@git.webiste.tld:bookmarks.xbel 2024-05-31T16:44:21.300Z onSyncStart: begin 2024-05-31T16:44:21.302Z (git) init 2024-05-31T16:44:21.392Z (git) fetch from remote 2024-05-31T16:44:21.810Z (git) checkout branch main 2024-05-31T16:44:21.826Z onSyncFail 2024-05-31T16:44:21.830Z Syncing failed with Failed to checkout "main" because commit ##### is not available locally. Do a git fetch to make the branch available locally. 2024-05-31T16:44:21.840Z onSyncFail

faan11 commented 4 months ago

Hi @marcelklehr any updates about this issue? Today I have installed the application and i faced this issue with the same error log.

marcelklehr commented 4 months ago

@faan11 Sadly not, it's an upstream issue in capacitor: https://github.com/ionic-team/capacitor/issues/7473

bigdiff commented 3 months ago

The upstream issue seems to have been fixed: https://github.com/ionic-team/capacitor/issues/7473#event-13444135066

marcelklehr commented 3 months ago

Yes, now we need to wait for a release from them, then this issue can be fixed :)

Crunchbits commented 3 months ago

Looks like a release was just made from them with the fix

faan11 commented 3 months ago

Yeah the issue has been fixed in the upstream with version v5.7.7 or v6.1.1

marcelklehr commented 2 months ago

Mmmh, now with the latest capacitor version it just hangs on git fetch :thinking:

It seems they have more bugs in their fetchAPI implementation

ChandraSaiKarthik commented 1 day ago

I had a similar issue (hangs with sync and hangs complete mobile) with gitea on my OnePlus Mobile running Android 14.1 but syncs smoothly on my laptop. Let me know what other details you might need for troubleshooting.