After turning on automatic updates for our alpha and hardened series it turned out the updates were not applied, at least not on Linux machines. They are therefore disabled at the moment which should get fixed as soon as possible.
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Child items ...
Show closed items
Linked items 0
Link issues together to show that they're related.
Learn more.
I found signed mar files here: https://people.torproject.org/~gk/builds/6.5a4/ and was able to reproduce this problem by hosting an incremental mar file on my own server. My last-update.log file contained the following:
Performing a staged updatePATCH DIRECTORY /home/brade/Desktop/tb-test/Browser/TorBrowser/UpdateInfo/updates/0INSTALLATION DIRECTORY /home/brade/Desktop/tb-test/BrowserWORKING DIRECTORY /home/brade/Desktop/tb-test/Browser/updatedensure_copy: failed to open the file for reading: /home/brade/Desktop/tb-test/Browser/TorBrowser/Data/Tor/control.socket, err: 6failed: 6calling QuitProgressUI
It seems that the updater code is not smart enough to skip Unix domain sockets when copying the installation directory during the staged update process. I was able to update successfully on a 64-bit Linux system after I used about:config to set app.update.staging.enabled to false. The bad news is that as far as I know we cannot disable staged updates from the update manifest (server-side XML). Using the full mar file will result in the same problem as gk experienced.
I will try to think of a workaround but at the moment I do not have any ideas. I will ask Kathy about this problem in the morning.
A small bit of good news: I did not do any testing, but this problem should not occur on Windows (no Unix domain sockets and no staged updates either).
On OSX, I am able to successfully apply the update (the control port Unix domain socket is in the TorBrowser-Data directory, which is outside the scope of what the updater touches, so the ensure_copy problem does not occur). But on the OSX system that I used for testing, after the update was applied and the browser restarted, tor failed to start. This happened because quotes are missing from the ControlPort unix:... argument which was passed on the tor command line by Tor Launcher (I have spaces in my path). But we fixed that problem in Tor Launcher! After a little more investigation I learned that Tor Launcher was not updated in the profile or in the TorBrowser.app/Contents/Resources/distribution/extensions directory. I don't know why yet though, and we might need a new ticket for OSX. The dmg files have the correct Tor Launcher. I have not checked the complete mar files and I have not done enough analysis to determine if the incremental mar files are flawed or if the updater failed to update the xpi properly.
I found signed mar files here: https://people.torproject.org/~gk/builds/6.5a4/ and was able to reproduce this problem by hosting an incremental mar file on my own server. My last-update.log file contained the following:
{{{
Performing a staged update
PATCH DIRECTORY /home/brade/Desktop/tb-test/Browser/TorBrowser/UpdateInfo/updates/0
INSTALLATION DIRECTORY /home/brade/Desktop/tb-test/Browser
WORKING DIRECTORY /home/brade/Desktop/tb-test/Browser/updated
ensure_copy: failed to open the file for reading: /home/brade/Desktop/tb-test/Browser/TorBrowser/Data/Tor/control.socket, err: 6
failed: 6
calling QuitProgressUI
}}}
It seems that the updater code is not smart enough to skip Unix domain sockets when copying the installation directory during the staged update process. I was able to update successfully on a 64-bit Linux system after I used about:config to set app.update.staging.enabled to false. The bad news is that as far as I know we cannot disable staged updates from the update manifest (server-side XML). Using the full mar file will result in the same problem as gk experienced.
I will try to think of a workaround but at the moment I do not have any ideas. I will ask Kathy about this problem in the morning.
A small bit of good news: I did not do any testing, but this problem should not occur on Windows (no Unix domain sockets and no staged updates either).
Thanks for the whole analysis so far! Just to reply to this bit: you are right. boklm and I tested updating to 6.5a4 on Windows and it worked both by using the partial and the full .mar. We have therefore enabled auto-updating for Windows users again.
Trac: Summary: Alpha updates are not getting applied when trying to update to 6.5a4(-hardened) to Updates are not getting properly applied when trying to update to 6.5a4(-hardened) on OS X and Linux
On OSX, I am able to successfully apply the update (the control port Unix domain socket is in the TorBrowser-Data directory, which is outside the scope of what the updater touches, so the ensure_copy problem does not occur). But on the OSX system that I used for testing, after the update was applied and the browser restarted, tor failed to start. This happened because quotes are missing from the ControlPort unix:... argument which was passed on the tor command line by Tor Launcher (I have spaces in my path). But we fixed that problem in Tor Launcher! After a little more investigation I learned that Tor Launcher was not updated in the profile or in the TorBrowser.app/Contents/Resources/distribution/extensions directory. I don't know why yet though, and we might need a new ticket for OSX. The dmg files have the correct Tor Launcher. I have not checked the complete mar files and I have not done enough analysis to determine if the incremental mar files are flawed or if the updater failed to update the xpi properly.
Interesting. I made a couple of tests taking a fresh 6.0.5 and a fresh 6.5a3. I tested updating the stable both in a desktop and an /Applications location and it worked: the extensions and everything seemed to be fine. Note, though, that we only have full updates right now for the stable series.
For the alpha I tested just installing it on the desktop and applying the MAR files manually. Both the incremental and the full MAR file applied correctly and the extensions were updated, too.
On OSX, I am able to successfully apply the update (the control port Unix domain socket is in the TorBrowser-Data directory, which is outside the scope of what the updater touches, so the ensure_copy problem does not occur). But on the OSX system that I used for testing, after the update was applied and the browser restarted, tor failed to start. This happened because quotes are missing from the ControlPort unix:... argument which was passed on the tor command line by Tor Launcher (I have spaces in my path). But we fixed that problem in Tor Launcher! After a little more investigation I learned that Tor Launcher was not updated in the profile or in the TorBrowser.app/Contents/Resources/distribution/extensions directory. I don't know why yet though, and we might need a new ticket for OSX. The dmg files have the correct Tor Launcher. I have not checked the complete mar files and I have not done enough analysis to determine if the incremental mar files are flawed or if the updater failed to update the xpi properly.
Interesting. I made a couple of tests taking a fresh 6.0.5 and a fresh 6.5a3. I tested updating the stable both in a desktop and an /Applications location and it worked: the extensions and everything seemed to be fine. Note, though, that we only have full updates right now for the stable series.
For the alpha I tested just installing it on the desktop and applying the MAR files manually. Both the incremental and the full MAR file applied correctly and the extensions were updated, too.
I tested now putting 6.5a3 to /Applications (getting a space in the user dir path) and applying the incremental update manually worked as well. So, hm.
For the alpha I tested just installing it on the desktop and applying the MAR files manually. Both the incremental and the full MAR file applied correctly and the extensions were updated, too.
I tested now putting 6.5a3 to /Applications (getting a space in the user dir path) and applying the incremental update manually worked as well. So, hm.
This morning I tried updating an existing/older 6.5a3 installation on another OSX system and it worked fine. Based on this and the fact that all of your tests worked, I think the OSX updates are probably okay. Kathy and I will try again on the OSX system that failed and let you know what we find, but I think you should re-enable updates for OSX.
Kathy and I will try again on the OSX system that failed and let you know what we find, but I think you should re-enable updates for OSX.
It turns out that problem was a false alarm. The alpha install I tested with was an older one, and last night it updated from 6.5a2 to 6.5a3 (not a4), which led to the "oh no, things do not work due to a space in the path" behavior. So, never mind.
Trac: Summary: Updates are not getting properly applied when trying to update to 6.5a4(-hardened) on OS X and Linux to Updates are not getting properly applied when trying to update to 6.5a4(-hardened) on Linux
It is possible that we missed something, but after reading the updater and update service code, Kathy and I have concluded that the only workarounds are:
Users can set app.update.staging.enabled to false before attempting the update.
Users can disable the control port Unix domain socket by setting extensions.torlauncher.control_port_use_socket to false and restarting their browser before attempting the update.
The other thing to think about is "what will happen during the next update, i.e., 6.5a4 to 6.5a5?" The answer is that updates may fail (since the 6.5a4 updater which we already shipped is flawed in the same way as the 6.5a3 one). There is some good news though: because of the fix for #20185 (moved), users who have XDG_RUNTIME_DIR set (most people?) will not encounter this bug because the Unix domain sockets will be outside of the TB installation directory.
If XDG_RUNTIME_DIR is not set, similar workarounds will be needed for the 6.5a4 to 6.5a5 update. Note that the "disable Unix domain socket" prefs in 6.5a4 are extensions.torlauncher.control_port_use_ipc and extensions.torlauncher.socks_port_use_ipc (both would need to be set to false).
There are also prefs that control the location of the Unix domain sockets; these could be used to ensure that the sockets are created somewhere outside of the installation directory.
It is possible that we missed something, but after reading the updater and update service code, Kathy and I have concluded that the only workarounds are:
Users can set app.update.staging.enabled to false before attempting the update.
Users can disable the control port Unix domain socket by setting extensions.torlauncher.control_port_use_socket to false and restarting their browser before attempting the update.
The other thing to think about is "what will happen during the next update, i.e., 6.5a4 to 6.5a5?" The answer is that updates may fail (since the 6.5a4 updater which we already shipped is flawed in the same way as the 6.5a3 one). There is some good news though: because of the fix for #20185 (moved), users who have XDG_RUNTIME_DIR set (most people?) will not encounter this bug because the Unix domain sockets will be outside of the TB installation directory.
If XDG_RUNTIME_DIR is not set, similar workarounds will be needed for the 6.5a4 to 6.5a5 update. Note that the "disable Unix domain socket" prefs in 6.5a4 are extensions.torlauncher.control_port_use_ipc and extensions.torlauncher.socks_port_use_ipc (both would need to be set to false).
There are also prefs that control the location of the Unix domain sockets; these could be used to ensure that the sockets are created somewhere outside of the installation directory.
Thanks for looking into it. So, what do you suggest? Enabling the updates for Linux as well and doing a final update to our blog post? It seems in the worst case users are downloading the update again and again until they get the "Update failed x times" dialog. Can we say something sensibly on it conveying the current issue (with some attribute in the XML files)? I guess not? Or would we just leave the updater disabled and getting the onion to flash getting users to find the "Check for Tor Browser Update..." in the Torbutton menu? I guess this is suboptimal, at least for the reason that it is probably an unusal update flow even for alpha users.
Thanks for looking into it. So, what do you suggest? Enabling the updates for Linux as well and doing a final update to our blog post?
Yes, because we do want users to get the update.
It seems in the worst case users are downloading the update again and again until they get the "Update failed x times" dialog. Can we say something sensibly on it conveying the current issue (with some attribute in the XML files)? I guess not? Or would we just leave the updater disabled and getting the onion to flash getting users to find the "Check for Tor Browser Update..." in the Torbutton menu? I guess this is suboptimal, at least for the reason that it is probably an unusal update flow even for alpha users.
I don't think we can add text to that dialog, but there is a "billboard" feature that we have never used that might be helpful in this case. (note that Mozilla recently remove that feature; see https://bugzilla.mozilla.org/show_bug.cgi?id=1296207). I tried it and it seems to work. You can create an HTML page that is displayed instead of the standard update prompt, and there is also a way to force the prompt to be shown even for automatic/background updates. Here is a sample update manifest; note the showPrompt and billboard attributes:
The other thing that took Kathy and me some time to figure out is that the HTML file must include a billboard attribute on the body, e.g.,
<!DOCTYPE html><html><head><meta charset="UTF-8"><title>Billboard Test</title></head><body billboard="true">This is a test.<p>Useful info should be placed here.</body></html>
I will attach a screenshot that shows what this looks like. The text should include "Tor Browser 6.5a4 is available" plus whatever you include in the blog to help people work around this update issue (which most people will be affected by).
Thanks. I guess we could try that billboard feature. But I won't have the energy to work on that anymore today. boklm: If you have, feel free to do so. I guess testing with the hardened series first is the way to go.