Start log observed on Android 4.4.4, Tor Browser 60.6.1, 100% failure rate:
- Set background service to FOREGROUND- updating settings in Tor service- updating torrc custom configuration...- success.- checking binary version: 0.3.5.8-rc-openssl1.0.2p- Orbot is starting…- Tor control port file not created- Unable to start Tor: java.io.IOException: Control port file not created: /data/data/org.torproject.torbrowser_alpha/app_torservice/lib/tor/control.txt, len = 0
I've seen two mentions of this by Google search, but couldn't find an existing ticket.
Trac: Username: belm0
Designs
Child items 0
Show closed items
No child items are currently assigned. Use child items to break down this issue into smaller parts.
Linked items 0
Link issues together to show that they're related.
Learn more.
legacy/trac#30401 (moved) is a duplicate. echaskaris: can you help us out with debugging if we give you instructions? We would need some logcat output...
Trac: Cc: sisbell, sysrqb to sisbell, sysrqb, echaskaris
legacy/trac#30401 (moved) is a duplicate. echaskaris: can you help us out with debugging if we give you instructions? We would need some logcat output...
Hm, we could use more log output I guess. We fail somewhere here
LOG.info("Waiting for control port"); boolean isCreated = controlPortFile.exists() || controlPortFile.createNewFile(); WriteObserver controlPortFileObserver = onionProxyContext.createControlPortFileObserver(); if (!isCreated || (controlPortFile.length() == 0 && !controlPortFileObserver.poll(config.getFileCreationTimeout(), SECONDS))) { LOG.warn("Control port file not created");
sisbell: any ideas apart from creating a debug build with more logging enabled? (if not, could you create that build and make it available for echaskaris?)
Unfortunately, this is still a mystery. The file is successfully created, but tor never writes to it. I wonder if tor is dying, or it is starting slowly and doesn't create the cookie before the timeout?
5331 05-08 18:13:35.919 I/OnionProxyManager(13091): Waiting for control port5332 05-08 18:13:35.919 I/OnionProxyManager(13091): Control port file existence: true5333 05-08 18:13:35.919 I/OnionProxyManager(13091): isCreated is: true[snip]5903 05-08 18:13:50.929 W/OnionProxyManager(13091): Control port file not created5904 05-08 18:13:50.929 W/OnionProxyManager(13091): Control port file length is: 05905 05-08 18:13:50.929 I/FileUtilities(13091): /data/data/org.torproject.torbrowser_nightly/app_torservice/lib/tor/control.txt5906 05-08 18:13:50.939 I/System.out(13091): Sending status: STOPPING5907 05-08 18:13:50.959 I/System.out(13091): Sending status: OFF
I put in an SD card and I can see the directories(/storage/extSdCard/Android/data/org.torproject.torbrowser_alpha/files/Download) in file manager. Tor still doesn't connect.
Tor bootstrap won't use the files/Download directory. This is something related to the firefox code. Of all the Android versions, KitKat has the most problematic network stack when trying to create internal ports and use proxies and VPN. In some cases, its completely broken.
On startup, the app prints out the error stream of the Tor process. If you aren't seeing that then it may be something to do with being unable to read or process the torrc file. I'll add this configuration check in the next version (I'll get an earlier version for you to test so we can see if that is the problem).
Can you try and see if Orbot works on your version of KitKat? That would help narrow down what the problem is. If startup works with Orbot, then our issue is unlikely a network issue and would likely be an issue with installation and configuration.
Orbot works, no errors, bootstrapped 100%, no settings changed.
The next step is to check torrc file. If you don't have a rooted device, I'll need to provide you with a debuggable version of the build (or if you are really bored you can decompile apk and add debug field, recompile and resign with any key). On the debuggable version, you can run
I root and then? Check whether the file is there and what is in it after I get the error?
If your device is rooted, then yes. If its not already rooted, then I thinks its easier to get you a debug version of the build. I'll also document the steps for creating a debuggable build, in case other people want to do it themselves.
With the debuggable version, you can pull the config file or modify the config. You can also turn on the debug flag by modifying preferences to see more output.
After the whole "addon signing fiasco" I decided to update to the latest. Knowing that it MUST also have the fix for the bug I reported over a month ago.
I have this same problem. Kitkat 4.4.2
"- Orbot is starting…
Tor control port file not created
Unable to start Tor: java.io.IOException: Control port file not created: /data/data/org.torproject.torbrowser_alpha/app_torservice/lib/tor/control.txt, len = 0
Still have Orbot working with Orfox.
In no position to install debug versions at this stage.
Huh, I wonder where this torrc file is coming from. Looks like it could need some clean-up. echaskaris: what are the paths that got clipped on the screenshot?
The screenshot shows the contents of torrc file located in /data/data/org.torproject.torbrowser.alpha/app_torservice. I'll upload a new one since some lines are cut off in the old one.
This problem occurs around the environmental variable ${user.home}. When this is set, we use it to tell tor where to place the DataDirectory. This is intended to be used for the desktop, as its an unsupported property on Android. If it is not set, then we pick a default location on the device that the user has access to. This is expected on an Android device.
On KitKat devices the system property ${user.home} is set to system root "/". Since the user doesn't have permission to access the root directory, startup fails. On other Android platforms the ${user.home} property value is null and tor starts up correctly.
On Android 4.4, ${user.home} is "/", which the app does not have permission to access. This causes tor to fail to start. Other versions of Android are not affected.
Great! Yes, Orbot always worked, but this is a modified version of Orbot and this version uses the same piece of code that caused the bug originally in Tor Browser. So, if this version of orbot works, then the new version of Tor Browser should work.