Opened 2 months ago

Closed 3 weeks ago

#31764 closed defect (fixed)

Copying a link and using "Paste & Go" results in error

Reported by: gk Owned by: pospeselr
Priority: Medium Milestone:
Component: Applications/Tor Browser Version:
Severity: Normal Keywords: ff68-esr, tbb-9.0-issues, tbb-regression, tbb-9.0.1-can, TorBrowserTeam201910R
Cc: intrigeri, tbb-team Actual Points: 0.25
Parent ID: Points:
Reviewer: Sponsor:

Description

As noted in our blog (https://blog.torproject.org/comment/284045#comment-284045): if one copies a link (pure text does not trigger the bug) and opens it in a new tab with by right-clicking on the URL bar and choosing "Paste & Go" an error is showing up in the browser console:

Received unexpected result type undefined, falling back to typed transition. WebNavigation.jsm:217
onURLBarUserStartNavigation resource://gre/modules/WebNavigation.jsm:217
observe resource://gre/modules/WebNavigation.jsm:136
_notifyStartNavigation resource:///modules/UrlbarInput.jsm:1364
_loadURL resource:///modules/UrlbarInput.jsm:1240
handleCommand resource:///modules/UrlbarInput.jsm:446
_initPasteAndGo resource:///modules/UrlbarInput.jsm:1333

That issue is not showing up in Firefox 68 it seems. Thus, this is a bug on our side.

Child Tickets

Change History (12)

comment:1 Changed 5 weeks ago by intrigeri

Cc: intrigeri added

comment:2 in reply to:  description ; Changed 5 weeks ago by Thorin

Replying to gk:

That issue is not showing up in Firefox 68 it seems. Thus, this is a bug on our side.

You can replicate the error (albeit slightly different line numbers, but pointing at the same code) in FF68 after you have installed HTTPS-Everywhere - so it's not a bug on our side

FF68.0.2

Received unexpected result type undefined, falling back to typed transition. WebNavigation.jsm:190

    onURLBarUserStartNavigation resource://gre/modules/WebNavigation.jsm:190
	code: Cu.reportError(`Received unexpected result type ${acData.result.type}, falling back to typed transition.`);

    observe resource://gre/modules/WebNavigation.jsm:116
	code: this.onURLBarUserStartNavigation(subject.wrappedJSObject);

    _notifyStartNavigation resource:///modules/UrlbarInput.jsm:1243
	code: Services.obs.notifyObservers({result}, "urlbar-user-start-navigation");

    _loadURL resource:///modules/UrlbarInput.jsm:1131
	code: this._notifyStartNavigation(result);

    handleCommand resource:///modules/UrlbarInput.jsm:405
	code: this._loadURL(url, where, openParams);

    _initPasteAndGo resource:///modules/UrlbarInput.jsm:1213
	code: this.handleCommand();

comment:3 in reply to:  2 Changed 5 weeks ago by gk

Replying to Thorin:

Replying to gk:

That issue is not showing up in Firefox 68 it seems. Thus, this is a bug on our side.

You can replicate the error (albeit slightly different line numbers, but pointing at the same code) in FF68 after you have installed HTTPS-Everywhere - so it's not a bug on our side

FF68.0.2

Received unexpected result type undefined, falling back to typed transition. WebNavigation.jsm:190

    onURLBarUserStartNavigation resource://gre/modules/WebNavigation.jsm:190
	code: Cu.reportError(`Received unexpected result type ${acData.result.type}, falling back to typed transition.`);

    observe resource://gre/modules/WebNavigation.jsm:116
	code: this.onURLBarUserStartNavigation(subject.wrappedJSObject);

    _notifyStartNavigation resource:///modules/UrlbarInput.jsm:1243
	code: Services.obs.notifyObservers({result}, "urlbar-user-start-navigation");

    _loadURL resource:///modules/UrlbarInput.jsm:1131
	code: this._notifyStartNavigation(result);

    handleCommand resource:///modules/UrlbarInput.jsm:405
	code: this._loadURL(url, where, openParams);

    _initPasteAndGo resource:///modules/UrlbarInput.jsm:1213
	code: this.handleCommand();

Nice find! Do you mind filing a bug at Mozilla's bug tracker and linking the URL here?

comment:4 Changed 3 weeks ago by gk

Keywords: tbb-9.0-issues added

9.0 issues.

comment:5 Changed 3 weeks ago by gk

Keywords: tbb-regression added

comment:6 Changed 3 weeks ago by gk

Keywords: tbb-9.0.1-can added

comment:7 Changed 3 weeks ago by pospeselr

Owner: changed from tbb-team to pospeselr
Status: newassigned

comment:8 Changed 3 weeks ago by boklm

Cc: tbb-team added

comment:9 Changed 3 weeks ago by pospeselr

Keywords: TorBrowserTeam201910R added
Status: assignedneeds_review

Very small patch fixes this, but took a bit to understand what's going on here.

Basically we just have to explicitly pass null to _loadURL for the 'result' parameter. Another adjacent code-path already does this in the case where we are providing a 'pseudo-url' like example.com (via paste or through a complicated UI flow using the keyboard) where it first must prepend http://www or whatever to it before calling _loadURL (which it does with a null 'result' parameter).

tor-browser: https://gitweb.torproject.org/user/richard/tor-browser.git/commit/?h=bug_31764

comment:10 Changed 3 weeks ago by gk

Nice find! Cherry-picked to tor-browser-68.2.0esr-9.5 (commit 228fdd9e73df5a4286557134bebc2a189976fb99) and tor-browser-68.2.0esr-9.0-1 (4c0b11d76d773c471f7d4884e7d0764f6ef00c7b). Could you file an upstream bug with your patch and link to it in this ticket? Please close this ticket afterwards.

comment:11 Changed 3 weeks ago by pospeselr

Actual Points: 0.25

comment:12 Changed 3 weeks ago by pospeselr

Resolution: fixed
Status: needs_reviewclosed
Note: See TracTickets for help on using tickets.