Android fragility and logging

Found several different ways of getting different logs, and tried the simplest – under Settings, System, Developer options, Take bug report. It creates a compressed zip file which contains a 49 MB log among other things. Poking around didn’t show me anything “obvious”, whatever that means.

I have been trying both apps (released and forked) one at a time, and neither one runs for very long now. Sometimes one will run for hours, sometimes it is gone 5 minutes later, and there seems to be no pattern. The forked app has an “Exit” option, which is nice, but I’ve only used it once. The forked app also sometimes requires me to allow it to run with a specific permission, but sometimes starts right up without that. The only pattern there is that it seems to happen when running it after running the released app, but it asks the next several times it starts, not just the first time.

I will let this ticket expire. The app does run and sync when I need it; it’s annoying that it is not as stable as before, and seems to be getting even less so, but too many other things in my life right now have priority over messing around with adb and 49 MB dumps.

Hey, I’d be interested in which the “specific permission” is precisely? Did you force close one app before starting the other one? Running in parallel isn’t good because they issue a kill command for the syncthingnative in behind the scenes not knowing that there’s another process with the same name.

I’ll post the exact message here next time it happens. I should have been clear – never ran them both at once, that sounds like a disaster! I did force stop the released app once, but otherwise always waited for one to finish before starting the other. I think I also shut down and restarted the phone once, which might have also done a force stop.

1 Like

Checked the phone just after that reply, and Syncthing-forked had exited. On starting it up again, got the “Introduction” screen, with a BACK button lower left and CONTINUE lower right. Pressing Continue brings up a “Welcome to Syncthing for Android / Battery Optimmization” screen, with a wide GRANT PERMISSION button in the center, BACK lower left and FINISH lower right. Pressing GRANT PERMISSION brings up “Let app always run in background?” popup, with DENY and ALLOW lower right. Pressing ALLOW clears the popup, and pressing FINISH starts Syncthing.

OK, good description of the problem :+1: ! If the battery optimization welcome slide is shown again over and over, something on your Android is revoking that permission you’ve granted and Syncthing-Fork is designed to depend on that to run reliably in the background monitoring e.g. run conditions and doing the sync. It therefore shows the slide again if the permission gets “lost” for some reason. I’ve heard this before in some ticket, but the user didn’t do any debugging together with me. Hopefully we can somehow discover why that happens on your Oxygen OS. A first starter for you would be to Google “Oxygen OS” and “battery optimizations silently revoked”. It maybe of some help to contact the ROM vendor (I myself never saw a live Oxygen OS).

Syncthing-forked is still running; I left it in foreground when I laid down the phone and the screen went off. Woke it up just now and checked: -forked battery optimization was enabled, -release was disabled. I re-disabled it for -forked and will check again in a bit.

Minor additional data point: usually, if either (I think!) app stays running for a while, sooner or later the alert notification pops up about Syncthing draining the battery.

It showed right now. I checked and battery optimization is still disabled for Syncthing-forked, and the app is still running. I have been leaving it in the foreground as much as possible, but prior experience doing that did not ensure it stayed running.

1 Like

Checked the phone just now; Syncthing-fork had quit. Battery optimization was still disabled, and when I started the app, it went straight to work without asking me to re-disable battery optimization.

Ok, thanks. I guess we’ll need the log to shed some light. Hoping it is still available from the in-app debug menu after it quit. Please try to grab it as soon as possible after it quit.

Googling what I suggested above gives at first result:

Good find, thank you. Syncthing-fork was gone this morning, but it still has the battery optimization disabled. I’ll have to make a habit of checking if it is running more often to have any hope of getting logs as soon as possible after it exits.

1 Like

Syncthing-fork has now been running for at least a full day without problems. Says version 1.5.0. I thought at first I had just been so much in the habit of restarting it that I had forgotten the last restart. The Status tab says “Uptime: 44m” which sure isn’t right; I’ve been cleaning the kitchen longer than that, so maybe it is just cumulative run time.

Anyway, much more stable than before, and Android still complains it is sucking power but hasn’t killed it, so thanks to whoever fixed whatever.

1 Like

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