Opened 3 months ago

Closed 3 weeks ago

Last modified 43 hours ago

#27701 closed defect (fixed)

Tor Browser on Android fails to download files

Reported by: gk Owned by: tbb-team
Priority: Medium Milestone:
Component: Applications/Tor Browser Version:
Severity: Normal Keywords: tbb-mobile, TorBrowserTeam201811R
Cc: babs4 Actual Points:
Parent ID: Points:
Reviewer: Sponsor: Sponsor8

Description

I noticed this when trying to download the Signal app from the website. I click on the download link but nothing happened. Worked well on other mobile browsers. The issue might not be related to .apk files only, though. See:

https://blog.torproject.org/comment/277275#comment-277275
https://blog.torproject.org/comment/277277#comment-277277

Child Tickets

Change History (9)

comment:1 Changed 3 weeks ago by sysrqb

After some investigation, I narrowed this bug down to torbutton. After disabling torbutton in Tor Browser for Android (and restarting), downloading works again. I wonder if this is related to the external app blocker.

comment:2 in reply to:  1 Changed 3 weeks ago by sysrqb

Replying to sysrqb:

After some investigation, I narrowed this bug down to torbutton. After disabling torbutton in Tor Browser for Android (and restarting), downloading works again. I wonder if this is related to the external app blocker.

Yep. After disabling extensions.torbutton.launch_warning, I now receive the download action dialog box again.

comment:3 Changed 3 weeks ago by sysrqb

I see two easy options:

  1. Disabled extensions.torbutton.launch_warning when Services.appinfo.OS === "Android"
  2. Check Services.appinfo.OS === "Android" in ExternalAppBlocker:maybeShow() and return false if we're on Android.

The harder solution is solving #26529 instead.

11-19 16:36:45.216 27651 27669 I Gecko   : [11-19 16:36:45] Torbutton INFO: tor SOCKS: https://updates.signal.org/android/Signal-website-release-4.30.7.apk via
11-19 16:36:45.216 27651 27669 I Gecko   :                        signal.org:b70e33ba585faf3f34b69778f7430d37
11-19 16:37:26.055 27651 27669 I Gecko   : [11-19 16:37:26] Torbutton INFO: Got timer update. Saving changed cookies to jar.
11-19 16:37:26.154 27651 27669 I Gecko   : [11-19 16:37:26] Torbutton DBUG: Cookies saved
11-19 16:37:26.224 27651 27669 I Gecko   : [11-19 16:37:26] Torbutton DBUG: Timer done. Cookies saved
11-19 16:37:37.596 27651 27651 I GeckoTabs: zerdatime 182903089 - page load stop
11-19 16:37:37.616 27651 27651 D GeckoToolbar: onTabChanged: STOP
11-19 16:37:37.636 27651 27669 I Gecko   : [11-19 16:37:37] Torbutton INFO: Component Load 0: New ExternalAppBlocker.
11-19 16:37:37.661 27651 27651 D GeckoBrowserApp: BrowserApp.onTabChanged: 0: STOP

comment:4 Changed 3 weeks ago by sysrqb

Status: newneeds_review

I have a patch that changes the default pref value of extensions.torbutton.launch_warning to false. I put this below the main if/else-if branches because I think this is more readable than handling this special case within the if (aValueType === "boolean") { branch.

This will be a little slower at initialization, because every pref is now compared against if ((aPrefName === "extensions.torbutton.launch_warning").

https://oniongit.eu/sysrqb/torbutton.git, branch 27701_1.

comment:5 Changed 3 weeks ago by sysrqb

I suppose the real solution should be solving #26529 because this proves nsIHelperAppWarningDialog does work on Android, but the prompt we use doesn't work. We should modify _showPrompt() so it creates a different prompt on Android.

With this being said, I think developing that will take more time than we have right now - so I'd prefer solving the downloading issue first and then we can correctly solve #26529 later (but soon).

comment:6 Changed 3 weeks ago by gk

Keywords: TorBrowserTeam201811R added

comment:7 Changed 3 weeks ago by gk

Resolution: fixed
Status: needs_reviewclosed

Taking this for TBA-a2 under the assumption we do the right thing (aka #26529) and back this hack out again. This is commit 82729ba49f026a03966adb75b6b7737d71579967 on Torbutton's master now, thanks.

comment:8 Changed 7 days ago by gk

Cc: babs4 added

Resolved #28072 as duplicate.

comment:9 Changed 43 hours ago by gk

Sponsor: Sponsor8

Sponsor 8 work.

Note: See TracTickets for help on using tickets.