New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 647859 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Sep 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 2
Type: Bug
Proj-Servicification

Blocking:
issue 504347



Sign in to add a comment

NavigationHandle doesn't have IsErrorPage set for reloads of error page

Project Member Reported by jam@chromium.org, Sep 16 2016

Issue description

The issue is that the error page reloads itself after it gets more data, but IsErrorPage isn't true.

This is the callstack in the renderer which leads to the second NetErrorTabHelper::DidFinishNavigation call
>	content.dll!content::RenderFrameImpl::didStartProvisionalLoad(blink::WebLocalFrame * frame, double triggering_event_time) Line 3253	C++
 	blink_web.dll!blink::FrameLoaderClientImpl::dispatchDidStartProvisionalLoad(double triggeringEventTime) Line 449	C++
 	blink_core.dll!blink::FrameLoader::startLoad(blink::FrameLoadRequest & frameLoadRequest, blink::FrameLoadType type, blink::NavigationPolicy navigationPolicy) Line 1468	C++
 	blink_core.dll!blink::FrameLoader::load(const blink::FrameLoadRequest & passedRequest, blink::FrameLoadType frameLoadType, blink::HistoryItem * historyItem, blink::HistoryLoadType historyLoadType) Line 1024	C++
 	blink_web.dll!blink::WebLocalFrameImpl::loadData(const blink::WebData & data, const blink::WebString & mimeType, const blink::WebString & textEncoding, const blink::WebURL & baseURL, const blink::WebURL & unreachableURL, bool replace, blink::WebFrameLoadType webFrameLoadType, const blink::WebHistoryItem & item, blink::WebHistoryLoadType webHistoryLoadType, bool isClientRedirect) Line 1910	C++
 	blink_web.dll!blink::WebLocalFrameImpl::loadHTMLString(const blink::WebData & data, const blink::WebURL & baseURL, const blink::WebURL & unreachableURL, bool replace) Line 880	C++
 	browser_tests.exe!NetErrorHelper::LoadErrorPage(const std::basic_string<char,std::char_traits<char>,std::allocator<char> > & html, const GURL & failed_url) Line 227	C++
 	browser_tests.exe!error_page::NetErrorHelperCore::OnNavigationCorrectionsFetched(const std::basic_string<char,std::char_traits<char>,std::allocator<char> > & corrections, bool is_rtl) Line 863	C++
 	browser_tests.exe!NetErrorHelper::OnNavigationCorrectionsFetched(const blink::WebURLResponse & response, const std::basic_string<char,std::char_traits<char>,std::allocator<char> > & data) Line 368	C++
 	browser_tests.exe!base::internal::FunctorTraits<void (__thiscall NetErrorHelper::*)(blink::WebURLResponse const &,std::basic_string<char,std::char_traits<char>,std::allocator<char> > const &),void>::Invoke<NetErrorHelper *,blink::WebURLResponse const &,std::basic_string<char,std::char_traits<char>,std::allocator<char> > const &>(void(NetErrorHelper::*)(const blink::WebURLResponse &, const std::basic_string<char,std::char_traits<char>,std::allocator<char> > &) method, NetErrorHelper * && receiver_ptr, const blink::WebURLResponse & <args_0>, const std::basic_string<char,std::char_traits<char>,std::allocator<char> > & <args_1>) Line 215	C++
 	browser_tests.exe!base::internal::InvokeHelper<0,void>::MakeItSo<void (__thiscall NetErrorHelper::*const &)(blink::WebURLResponse const &,std::basic_string<char,std::char_traits<char>,std::allocator<char> > const &),NetErrorHelper *,blink::WebURLResponse const &,std::basic_string<char,std::char_traits<char>,std::allocator<char> > const &>(void(NetErrorHelper::*)(const blink::WebURLResponse &, const std::basic_string<char,std::char_traits<char>,std::allocator<char> > &) & functor, NetErrorHelper * && <args_0>, const blink::WebURLResponse & <args_1>, const std::basic_string<char,std::char_traits<char>,std::allocator<char> > & <args_2>) Line 285	C++
 	browser_tests.exe!base::internal::Invoker<base::internal::BindState<void (__thiscall NetErrorHelper::*)(blink::WebURLResponse const &,std::basic_string<char,std::char_traits<char>,std::allocator<char> > const &),base::internal::UnretainedWrapper<NetErrorHelper> >,void __cdecl(blink::WebURLResponse const &,std::basic_string<char,std::char_traits<char>,std::allocator<char> > const &)>::RunImpl<void (__thiscall NetErrorHelper::*const &)(blink::WebURLResponse const &,std::basic_string<char,std::char_traits<char>,std::allocator<char> > const &),std::tuple<base::internal::UnretainedWrapper<NetErrorHelper> > const &,0>(void(NetErrorHelper::*)(const blink::WebURLResponse &, const std::basic_string<char,std::char_traits<char>,std::allocator<char> > &) & functor, const std::tuple<base::internal::UnretainedWrapper<NetErrorHelper> > & bound, base::IndexSequence<0> __formal, const blink::WebURLResponse & <unbound_args_0>, const std::basic_string<char,std::char_traits<char>,std::allocator<char> > & <unbound_args_1>) Line 361	C++
 	browser_tests.exe!base::internal::Invoker<base::internal::BindState<void (__thiscall NetErrorHelper::*)(blink::WebURLResponse const &,std::basic_string<char,std::char_traits<char>,std::allocator<char> > const &),base::internal::UnretainedWrapper<NetErrorHelper> >,void __cdecl(blink::WebURLResponse const &,std::basic_string<char,std::char_traits<char>,std::allocator<char> > const &)>::Run(base::internal::BindStateBase * base, const blink::WebURLResponse & <unbound_args_0>, const std::basic_string<char,std::char_traits<char>,std::allocator<char> > & <unbound_args_1>) Line 339	C++
 	content.dll!base::internal::RunMixin<base::Callback<void __cdecl(blink::WebURLResponse const &,std::basic_string<char,std::char_traits<char>,std::allocator<char> > const &),1,1> >::Run(const blink::WebURLResponse & <args_0>, const std::basic_string<char,std::char_traits<char>,std::allocator<char> > & <args_1>) Line 64	C++
 	content.dll!content::ResourceFetcherImpl::OnLoadComplete() Line 144	C++


WebContentsImpl::DidStartProvisionalLoad  does have is_error_page true, since the url there is "data:text/html,chromewebdata". However by the time this goes to the NavigationHandle, the url is just the mock url. The net::Error on the navigation handle is net::OK.


It seems like we want the NavigationHandle to know that what's (re) loaded is the error page.



Repro:
Apply this patch:
https://codereview.chromium.org/2345913002/#ps20001
but remove this line:
    (navigation_handle->IsSynchronousNavigation() &&
        navigation_handle->GetURL() == error_page_url_)) {


Then run
DnsProbeBrowserTest.NoInternetProbeResultWithBrokenCorrections

This happens with and without PlzNavigate.
 

Comment 1 by jam@chromium.org, Sep 16 2016

btw one hint that this is an error page is in
RenderFrameHostImpl::OnDidCommitProvisionalLoad

validated_params.base_url is "data:text/html,chromewebdata"


Comment 2 by nasko@chromium.org, Sep 16 2016

Cc: clamy@chromium.org

Comment 3 by nasko@chromium.org, Sep 16 2016

Components: UI>Browser>Navigation
Labels: OS-All

Comment 4 by jam@chromium.org, Sep 19 2016

Owner: jam@chromium.org
Status: Started (was: Untriaged)
I have a fix in https://codereview.chromium.org/2345913002/
Project Member

Comment 5 by bugdroid1@chromium.org, Sep 19 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/a9a4ec98f42e665ecdef10370825e76c5299d72f

commit a9a4ec98f42e665ecdef10370825e76c5299d72f
Author: John Abd-El-Malek <jam@chromium.org>
Date: Mon Sep 19 16:45:39 2016

Fix NetErrorTabHelper with PlzNavigate.

This includes:
-switching NetErrorTabHelper to use the new WebContentsObserver navigation callbacks that work with PlzNavigate
-fixing NavigationHandle::IsErrorPage to return true for reloads of error pages

This fixes
DnsProbeBrowserTest.CorrectionsDisabled
DnsProbeBrowserTest.CorrectionsLoadStopped
DnsProbeBrowserTest.CorrectionsLoadStoppedSlowProbe
DnsProbeBrowserTest.Incognito
DnsProbeBrowserTest.NoInternetProbeResultWithBrokenCorrections
DnsProbeBrowserTest.NoInternetProbeResultWithSlowBrokenCorrections
DnsProbeBrowserTest.NxdomainProbeResultWithWorkingCorrections
DnsProbeBrowserTest.NxdomainProbeResultWithWorkingSlowCorrections
DnsProbeBrowserTest.ProbesDisabled
DnsProbeBrowserTest.SyncFailureWithBrokenCorrections
ErrorPageNavigationCorrectionsFailTest.FetchCorrectionsFails

BUG= 504347 , 647859 
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_site_isolation
R=clamy@chromium.org, juliatuttle@chromium.org

Review URL: https://codereview.chromium.org/2345913002 .

Cr-Commit-Position: refs/heads/master@{#419483}

[modify] https://crrev.com/a9a4ec98f42e665ecdef10370825e76c5299d72f/chrome/browser/net/net_error_tab_helper.cc
[modify] https://crrev.com/a9a4ec98f42e665ecdef10370825e76c5299d72f/chrome/browser/net/net_error_tab_helper.h
[modify] https://crrev.com/a9a4ec98f42e665ecdef10370825e76c5299d72f/chrome/browser/net/net_error_tab_helper_unittest.cc
[modify] https://crrev.com/a9a4ec98f42e665ecdef10370825e76c5299d72f/content/browser/frame_host/navigation_handle_impl.cc
[modify] https://crrev.com/a9a4ec98f42e665ecdef10370825e76c5299d72f/content/public/browser/navigation_handle.cc
[modify] https://crrev.com/a9a4ec98f42e665ecdef10370825e76c5299d72f/content/public/browser/navigation_handle.h
[modify] https://crrev.com/a9a4ec98f42e665ecdef10370825e76c5299d72f/content/test/web_contents_observer_sanity_checker.cc

Comment 6 by jam@chromium.org, Sep 19 2016

Status: Fixed (was: Started)

Comment 7 by laforge@google.com, Nov 7 2017

Components: Internals>Network>Service

Comment 8 by laforge@google.com, Nov 7 2017

Components: -Internals>Network>Service Internals>Services>Network
Apologies, applied the wrong component in bulk.

Sign in to add a comment