No auto folder notifications from mac to android (though works in opposite direction)

I recently installed latest greatest syncthing on both my macbook pro (aka mbp) and my new samsung galaxy tab A7 (android 10).

Both are working fine in terms of configuring folders and actually synching between the two devices. Great!

However there is one annoyance / bug(???) which I haven’t had any luck finding an answer to in the forums here which is probably due to generic / wrong terminology used in my searches.

For some reason, if I add a new folder via syncthing on the A7 and configure it to allow the mbp to see / sync it, the mbp will get a notification and then automatically configure / add the folder on the mbp.

BUT if instead, i add a new folder via syncthing on the MBP and configure it to allow the A7 to see / sync it, the A7 NEVER gets that autoconfigure folder notification which means i have to manually configure the other half of the sync folder on the A7.

Sure i can manually create and fix up the corresponding folder on the A7 by configuring it with the same folder ID of the one i created on the mbp that didn’t automatically sync. BUT it’s easier to type and configure on a real keyboard from my mbp than the virtual A7 Keyboard! And since i’m mostly one-way synching from the mbp TO the A7 where all my folders initially are, it’s more natural and I’d prefer that the auto notification and configuration worked like it’s supposed to so that the folder creations on the mbp get auto pushed and created on the android A7. It’s just easier all the way around.

Coming from iOS world, it’s also better to push from mbp bc it took me a full day to understand (i think??? ;)) the convoluted file mgt pathing that android has rigged together over time especially when using an SD card on the android device ;). In sum, pushing from the mbp insulates me from having to navigate the long and obscure android file pathing.

Any thoughts on what might be going on, how to troubleshoot it with logs or how to fix this?

I wasn’t sure whether to post on the issues pages for EITHER android OR mac OR BOTH syncthing github projects. In the end both seemed to suggest i post here instead for help.

Thx

1 Like

Which is indeed exactly the right thing to do - thanks :wink:

If you go into the web UI (through menu) in the android app - does the folder invitation appear there?

@imsodin no worries on the replying here :slight_smile:

uh good question. on the mbp i was mostly using the web interface but on the A7 i think i was doing everything through the syncthing app and forgot about the webapp entirely! would that make a difference in terms of notifications? would

  • android be smart enough to route the notification directly to the syncthing webapp and not the syncthing app proper itself
  • and would android not show the notification as a global notification when you pull down the notifications from the top of any screen (sorry my android proper lingo for android ixf things is non-existent ;))

ps1: how do i include a quote from prior post here automagically or do you have to cut n paste + blockquote.

ps2: what is syncthing terminology for what i describe above - folder auto registration?

thx

It should work in the app. Knowing if it does appear in the web UI tells me whether the issue is in the app or already in Syncthing itself.

ps1: Just mark the text you want to quote, and a quote button should appear.

ps2: You mean the “device xyz wants to share folder abc with you” (or something like that) notification? I’d call that a folder invitation.

So the notification DO show up in the web gui (via the android web app)! Sweet! So the web app is working.

I get how you use this to figure out whether it’s in the web gui vs the app but i’m not sure what the difference is when you say “whether the issue is in the app or already in Syncthing itself.”

I gather you’re saying that syncthing ITSELF is the actual underlying WEB/GO lang app and that the app is just the android wrapper / ixf to the former. Meaning that if folder invitation is working in the webgui then it’s the android wrapper that is not working and not the bundled underlying go app. Sound right?

ADDITIONAL QUESTION

I did NOT “add” any of the folder invitations yet b/c i have another related question before i “commit” the folder to the A7 side:

If i choose “Add”, by default it wants to put it into /storage/emulated/0/<folder>. It does not provide me with a file picker of any kind which means i have to either accept that base path or type in from scratch the full base path i want.

I think(???) that before when i manually setup the folder in the syncthing android wrapper app, it had a file picker and that i was specifying the base path as a “syncthing” locked down child directory (meaning that it was nested under a syncthing domain as part of the path making it somewhat private???) path different from the default one above BUT on my external SD card. ie it looked something really super short :wink: … like this

/storage/8636-09DF/Android/data/com.nutomic.syncthingandroid/files/<folder>!!! :wink:

Is it possible to make synthing android default for folder invitations (and just all manual folder configs) to put them by default in a simple, short location on the external SD card like

/storage/8636-09DF/st/<folder[s]>!!!

Even better if i can create a symbolic link somehow so that

/storage/8636-09DF/st/

becomes simply this

/st/!!! :slight_smile:

I get that this is more an android system thing but hopefully there’s a workaround.

I literally spent 24 hours scouring the net trying to figure out the mess that is the convoluted android file system (that has apparently morphed over the years) especially when using a true external SD card and i’m not sure i’m exactly even clear on it still and i’m actually a tech dude :wink:

Basically i was under the impression that each app needed to lock down their own private files other than video and documents.

What i want is the shortest most simplest default base directory pathing as possible so that when syncthing takes the folder invitation from the mbp, it puts it closer to root of of some filesystem so that:

  • the folder invitations themsevles are simpler (hopefully i don’t have to manually hunt down the true base path and manually change / type it in every time i accept to “Add” the folder invitation. I’m better on a real keyboard then a virtual tablet keyboard and i have better/quicker/more intuitive ways to find, copy and paste paths on the mbp than the A7.

  • more importantly that the OTHER apps that need access to these syncthing sync’d dirs/docs can get to them easily with the appropriate permissions (not be locked out) and with the shortest amount of typing possible (ie closest to / or root of some filesystem which in my case is going to probably be an external SD card)

Make sense? :wink:

Context: I just jumped to samsung / android bc i got tired of the apple / iOS shenanigans of locking down apps and not having an SD card option at all to expand storage. But after the jump, i was surprised at how convoluted and confusing the android file system is. Yeah you can buy cheap storage for the device but it’s still sort of quasi sandboxed and the mounting of filesystems within filesystems with symbolic links with convoluted names is a pita to manage and configure so that you can work with your docs in any kind of intuitive way.

I get the theoretical side of sandboxing and why it’s important to android system integrity. But for docs, i don’t want them nested under and tied to specific apps. I want them in a single location whereby all apps can get to them like they logically should. I don’t even mind the system symbolic linking perse if android also let me create my own symbolic links to override the “android” sym links :wink:

It’s a shame. The android file mgt understanding alone unfortunately makes the ramp up to syncthing harder for anyone that doesn’t have that context and I imagine a lot of people just use it anyway not really knowing what they’re doing.

got it thx!

great. sounds good to me!

Correct.

For the rest: I must admit I just skimmed that - too long, sorry.
What I got: “The android filesystem/path situation is confusing.” I agree, it is. No easy way out I am afraid.
And yes, you’ll have to insert the path as a string in the web ui. I recommend using some file manager to navigate to the desired path and copying it. That’s ugly of course, that’s one reason why the wrapper/android app offers a dialog to add folders.
If I missed something important, please asking again, preferable in as little words as possible :wink:

Ah and the folder not popping up is a bug on android, feel free to open a github issue for that.

hey i appreciate your quick feedback imsodin.

we’ve come to the same conclusion on the android system and you’ve made it clear that there is no other way to enter in the paths other than to manually type it in or copy from the file mgr. that gives me the info i need going forward on the config side of things. thx.

  • to confirm, adding the folder via folder invitation should work from the web gui even if there is a bug in the android wrapper itself yes?

  • is there a way to configure the default start path in the android wrapper app diag to add folders? (can i set it to my preferred location vs what ships with the app)

  • per the lengthy post, cut n paste shorter:

my custom external SD card path sync folder originally looked like this. i presumed that syncthing need it under that long path with the syncthing domain for privacy or sandboxing reasons since syncthing already created it for me on the SD card. Is that true or not?

/storage/8636-09DF/Android/data/com.nutomic.syncthingandroid/files/<folder>!

If not would syncthing just as easily recognize the sync in the following shorter custom path or would their be permission errors?

/storage/8636-09DF/st/<folder[s]>

Even better does android allow me to create a symbolic link somehow so that

/storage/8636-09DF/st/

becomes simply this

/st/

Yes.

The wrapper doesn’t support editing that. You can change it in the web UI, but the same “restriction” applies (need to enter the path manually).

Yes, more or less: It’s not Syncthing that wants it there, but Google/Android: They restrict Syncthing’s access to other paths.

Depends on your Android version and sometimes vendor (Samsung, Sony, …). You can try it out, but it likely will give permission errors.

A folder in root? No, that won’t work and for once I agree that it shouldn’t work :slight_smile:

thx. one followup

if i accept the folder invitation in the web gui on the A7, it tells me it’s going to put it in the following default GENERIC location; i don’t see anything that ties it to syncthing in terms of privacy like with external SD card above

/storage/emulated/0

vs

/storage/8636-09DF/Android/data/com.nutomic.syncthingandroid/files

so why does the external SD card location require the “privacy nesting” under the long syncthing specific domain path but folder creation on the internal card does not (it simply goes under generic storage and user 0 ; there is no sandboxing tied to syncthing at all that i can see)?

thx

The web UI knows nothing about android restrictions. Just because it proposes something, doesn’t mean it will work. For all intents and purposes, ignore what the web UI puts in the folder path by default.

OK i got you.

But if that’s the case, since the syncthing ecosystem of gh projects is pretty tightly integrated and has control over the syncthing webapp (i think), wouldn’t it be reasonable to make the web app default to something that it would actually work with?

If you install syncthing web app on a mac it isn’t going to default to /storage/emulated/0 because it doesn’t know what that is. It defaults to ~ right?

So that part is being configured somewhere within the web app itself and it’s getting set dependent on the platform / device (it’s not random).

Yes it is ~ everywhere and that is equivalent to $HOME on linuxes, which android is sort of, and apparently that’s /storage/emulated/0. Syncthing doesn’t do anything special about it. The android wrapper is the tightly integrated thing that makes a better guess at a proper path for the specific platform - as mentioned, that the folder invitation doesn’t pop up is a bug, and that’s what needs fixing.

OK cool. All the followups are much appreciated. Final question.

We’ve already documented what the private syncthing external SD base path needs to be above. But what is / should be the private base path on the internal android storage for all syncthing sync’d folders (ie where should they go when you don’t want them on an external SD card)?

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.