question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Syncthing-fork doesn't start at times

See original GitHub issue

Description of the issue

When I try to start Syncthing-Fork, the app doesn’t always open in the first attempt. At times, it takes multiple attempts to get the app started and running. When this happens it tests my patience a lot and makes it hard to use the app. It would be nice if the reason behind this behaviour could be found and fixed.

Reproducer

I don’t have an exact reproduce but when the issue happens the behaviour is as follows

  1. Open the app.
  2. Observe the app showing a blank screen for a long time
  3. Android pop-up is shown stating the app is not responding and asking whether to kill it or wait for it to respond. (Sometimes I just ‘Force stop’ the app instead.)
  4. Choose ‘Kill’ option.
  5. Repeat 1-4 until app starts.

Version Information

App Version: 1.3.2.2
Syncthing Version: v1.3.2.-preview.1
Android Version: 5.1.1
Device manufacturer: Samsung
Device model: SM-J111F

Android Log

I was able to get a log once but it doesn’t seem very helpful. Anyways here it is:

E/Zygote  (12190): MountEmulatedStorage()
E/Zygote  (12190): v2
I/SELinux (12190): Function: selinux_compare_spd_ram , priority [2] , priority version is VE=SEPF_SM-J111F_5.1.1_0073
E/SELinux (12190): [DEBUG] get_category: variable seinfo: default sensitivity: NULL, cateogry: NULL
I/libpersona(12190): KNOX_SDCARD checking this for 10291
I/libpersona(12190): KNOX_SDCARD not a persona
I/ActivityManager(  751): Start proc 12190:com.github.catfriend1.syncthingandroid/u0a291 for service com.github.catfriend1.syncthingandroid/com.nutomic.syncthingandroid.service.SyncthingService
W/ResourcesManager(12190): getTopLevelResources: /data/app/com.github.catfriend1.syncthingandroid-1/base.apk / 1.0 running in com.github.catfriend1.syncthingandroid rsrc of package null
W/ResourcesManager(12190): getTopLevelResources: /data/app/com.github.catfriend1.syncthingandroid-1/base.apk / 1.0 running in com.github.catfriend1.syncthingandroid rsrc of package null
I/art     (12190): Rejecting re-init on previously-failed class java.lang.Class<com.nutomic.syncthingandroid.service.-$$Lambda$SyncthingService$HP-rZyUAQYSZhPhKzKioevC45Bs>
I/art     (12190): Rejecting re-init on previously-failed class java.lang.Class<com.nutomic.syncthingandroid.service.-$$Lambda$SyncthingService$HP-rZyUAQYSZhPhKzKioevC45Bs>
I/art     (12190): Rejecting re-init on previously-failed class java.lang.Class<com.nutomic.syncthingandroid.service.-$$Lambda$SyncthingService$Sqim3g2gog0aLa4enBZOuxg_D3k>
I/art     (12190): Rejecting re-init on previously-failed class java.lang.Class<com.nutomic.syncthingandroid.service.-$$Lambda$SyncthingService$Sqim3g2gog0aLa4enBZOuxg_D3k>
D/SyncthingService(12190): onStartCommand
I/SyncthingService(12190): shouldRun decision changed to true according to configured run conditions.
D/Util    (12190): runShellCommandGetOutput: netstat -t -l -n
I/Util    (12190): runShellCommandGetOutput: Exited with code 0
I/SyncthingService(12190): onServiceStateChange: from DISABLED to STARTING
I/SyncthingService(12190): Web GUI will be available at https://127.0.0.1:8384
D/Util    (12190): runShellCommandGetOutput: ps

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
Catfriend1commented, Dec 23, 2019

(…) I have the “Run Syncthing as Superuser” option enabled (as I would like to sync folders present in my external SD card). Would that in some way be related to the issue I am facing?

Hmmm… could be, but I’m no longer using Syncthing with Superuser since 2018/11. What I recall is, if the superuser “intercept” popup takes too long, you’ll get an ANR (app not responding) but that doesn’t kill the app if you just wait for click the wait button.

0reactions
sivaraamcommented, Dec 23, 2019

My old s2 Samsung phone has similar problems having huge lags and probably running out of memory when multiple apps are open simultaneously… It has also 1gb ram but due to Samsung firmware can use Max 768 mb for app execution.

So, you are suspecting that the limited memory might be the reason behind the issue. It is a possible suspect. I’ll try to see if that is the case the next time I face the issue.

I recall there was an option in android developer settings to restrict background processes to 4…3… or 1 or kill an app as soon as it’s backgrounded. Maybe one of those helps you

That’s a good idea. As of now, the app seems to be starting without issues. I’ll see if it helps when I start facing the issue again.

One possibly related thing which I haven’t mentioned in the description is that I have the “Run Syncthing as Superuser” option enabled (as I would like to sync folders present in my external SD card). Would that in some way be related to the issue I am facing?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Device stays out of sync until restart - Support - Syncthing Forum
Restarting syncthing afterwards “fixes” it and it will work until the next start of the desktop (server stays on the whole time).
Read more >
Syncthing-fork on Android doesn't restart after sleep - Reddit
Syncthing-fork on Android doesn't restart after sleep ... Then go back into settings and toggle WiFi back on, then sync starts back up....
Read more >
Syncthing becomes disconnected while android is sleeping
The wakelock thingy in the official app is outdated and only works before android 6.x . That's why it was disabled in the...
Read more >
Syncthing-Fork Alternatives: Top 3 File Sync Tools and similar ...
There are three alternatives to Syncthing-Fork on AlternativeTo. ... The best alternative is Syncthing, which is both free and Open Source.
Read more >
Syncthing-Fork | F-Droid - Free and Open Source Android App ...
Wrapper for Syncthing - Open and decentralized file synchronization. ... Comparison between upstream and fork at the time of writing this:
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found