New issue
Advanced search Search tips

Issue 710385 link

Starred by 1 user

Issue metadata

Status: Verified
Owner:
Closed: Apr 2017
Cc:
EstimatedDays: ----
NextAction: ----
OS: iOS
Pri: 1
Type: Bug



Sign in to add a comment

AMP (Accelerated Mobile Pages) not loading after cold start

Project Member Reported by sdefresne@chromium.org, Apr 11 2017

Issue description

Chrome Version: 59.0.3068.0 (dev build, chromium rev == 48d63103e76c)
OS: iOS

What steps will reproduce the problem?
(1) Navigate to an AMP (Accelerate Mobile Page) -- I do this from news.google.fr
(2) Shutdown Chrome on iOS (i.e. switch to another app, then kill the app)
(3) Relaunch Chrome on iOS

What is the expected result?

The web page is loaded.

What happens instead?

The page is not displayed, instead there is a message that "This site can't be reached." (see attached screenshot).

When running in Xcode, the following DCHECK fails while the page is loading:

[0411/115157.726801:FATAL:crw_session_controller.mm(292)] Check failed: (trans & ui::PAGE_TRANSITION_SERVER_REDIRECT) == 0. 

Here "trans" is equal to ui::PAGE_TRANSITION_SERVER_REDIRECT. The callstack is the following:

* thread #1: tid = 0x3a5d82, 0x00000001095ca5f4 Chromium`base::debug::BreakDebugger() + 20 at debugger_posix.cc:262, name = 'CrWebMain', queue = 'com.apple.main-thread', stop reason = EXC_BREAKPOINT (code=EXC_I386_BPT, subcode=0x0)
  * frame #0: 0x00000001095ca5f4 Chromium`base::debug::BreakDebugger() + 20 at debugger_posix.cc:262
    frame #1: 0x0000000109647c41 Chromium`logging::LogMessage::~LogMessage(this=0x00007fff57a979b0) + 4369 at logging.cc:759
    frame #2: 0x0000000109644875 Chromium`logging::LogMessage::~LogMessage(this=0x00007fff57a979b0) + 21 at logging.cc:533
    frame #3: 0x00000001084f98fb Chromium`::-[CRWSessionController addPendingItem:referrer:transition:initiationType:userAgentOverrideOption:](self=0x00006000000d8b80, _cmd="addPendingItem:referrer:transition:initiationType:userAgentOverrideOption:", url=0x00007fff57a98160, ref=0x00007fff57a981f8, trans=-2147483648, initiationType=RENDERER_INITIATED, userAgentOverrideOption=INHERIT) + 283 at crw_session_controller.mm:292
    frame #4: 0x000000010850d6e6 Chromium`web::NavigationManagerImpl::AddPendingItem(this=0x00006000000548e0, url=0x00007fff57a98160, referrer=0x00007fff57a981f8, navigation_type=-2147483648, initiation_type=RENDERER_INITIATED, user_agent_override_option=INHERIT) + 214 at navigation_manager_impl.mm:167
    frame #5: 0x00000001084790f7 Chromium`::-[CRWWebController registerLoadRequest:referrer:transition:](self=0x00007f975c855e00, _cmd="registerLoadRequest:referrer:transition:", requestURL=0x00007fff57a98160, referrer=0x00007fff57a981f8, transition=-2147483648) + 711 at crw_web_controller.mm:1493
    frame #6: 0x000000010849fa29 Chromium`::-[CRWWebController webView:didReceiveServerRedirectForProvisionalNavigation:](self=0x00007f975c855e00, _cmd="webView:didReceiveServerRedirectForProvisionalNavigation:", webView=0x00007f975b842800, navigation=0x00007f975c32ebc0) + 297 at crw_web_controller.mm:4443
    frame #7: 0x0000000117e0948c WebKit`WebKit::NavigationState::NavigationClient::didReceiveServerRedirectForProvisionalNavigation(WebKit::WebPageProxy&, API::Navigation*, API::Object*) + 78
    frame #8: 0x0000000117f2f0a0 WebKit`WebKit::WebPageProxy::didReceiveServerRedirectForProvisionalLoadForFrame(unsigned long long, unsigned long long, WTF::String const&, WebKit::UserData const&) + 316
    frame #9: 0x0000000117f49bcf WebKit`void IPC::handleMessage<Messages::WebPageProxy::DidReceiveServerRedirectForProvisionalLoadForFrame, WebKit::WebPageProxy, void (WebKit::WebPageProxy::*)(unsigned long long, unsigned long long, WTF::String const&, WebKit::UserData const&)>(IPC::MessageDecoder&, WebKit::WebPageProxy*, void (WebKit::WebPageProxy::*)(unsigned long long, unsigned long long, WTF::String const&, WebKit::UserData const&)) + 111
    frame #10: 0x0000000117e068b1 WebKit`IPC::MessageReceiverMap::dispatchMessage(IPC::Connection&, IPC::MessageDecoder&) + 129
    frame #11: 0x0000000117f88782 WebKit`WebKit::WebProcessProxy::didReceiveMessage(IPC::Connection&, IPC::MessageDecoder&) + 24
    frame #12: 0x0000000117dd02e1 WebKit`IPC::Connection::dispatchMessage(std::__1::unique_ptr<IPC::MessageDecoder, std::__1::default_delete<IPC::MessageDecoder> >) + 119
    frame #13: 0x0000000117dd2842 WebKit`IPC::Connection::dispatchOneMessage() + 126
    frame #14: 0x000000012055de79 JavaScriptCore`WTF::RunLoop::performWork() + 169
    frame #15: 0x000000012055e092 JavaScriptCore`WTF::RunLoop::performWork(void*) + 34
    frame #16: 0x0000000114531761 CoreFoundation`__CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
    frame #17: 0x000000011451698c CoreFoundation`__CFRunLoopDoSources0 + 556
    frame #18: 0x0000000114515e76 CoreFoundation`__CFRunLoopRun + 918
    frame #19: 0x0000000114515884 CoreFoundation`CFRunLoopRunSpecific + 420
    frame #20: 0x0000000119ca4a6f GraphicsServices`GSEventRunModal + 161
    frame #21: 0x0000000112c4fc68 UIKit`UIApplicationMain + 159
    frame #22: 0x000000010816765b Chromium`main(argc=1, argv=0x00007fff57a99748) + 1051 at chrome_exe_main.mm:63
    frame #23: 0x000000011c1ad68d libdyld.dylib`start + 1
    frame #24: 0x000000011c1ad68d libdyld.dylib`start + 1

eugenebut: can you triage?
 
Simulator Screen Shot 11 Apr 2017, 11.50.48.png
159 KB View Download
Labels: -Pri-3 OS-iOS Pri-2
Cc: kkhorimoto@chromium.org eugene...@chromium.org
Labels: -Pri-2 ReleaseBlock-Stable M-59 Pri-1
Owner: liaoyuke@chromium.org
Yuke refactored AddPending item recently
Blocking: 710662
Labels: M-58
Not sure this is related to Yuke refactoring as this reproduce with version 28.0.3029.52 beta (the version currently in TestFlight).
I meant "58.0.3029.52 beta".
Blocking: -710662
In any case, I added that DCHECK, so I'll take a look today.
Status: Started (was: Assigned)
Here is what happens:

The first navigating to an AMP page, that page is loaded as a client side redirect. However, when kills the app and re-opens, the page is loaded as a server side redirect, which hits the DCHECK.

I do not understand why the load is being treated as a server side redirect and it seems that it's only happening with AMP pages. Anyway, I'm removing the DCHECK and that should fix the issue.

btw, Sylvain, I was only able to hit the DCHECK, but cannot reproduce the "This site can't be reached", could you please help to double-check? Thank you very much!
Project Member

Comment 9 by bugdroid1@chromium.org, Apr 13 2017

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

commit a4eb8e01f972546913b22a605e31bd22c270cfe8
Author: liaoyuke <liaoyuke@chromium.org>
Date: Thu Apr 13 05:31:02 2017

Remove invalid DCHECK in [CRWSessionController addPendingItem].

The DCHCECK that server side redirect should not be added as a new item
is invalid in the following scenario:

(1) Navigate to an AMP (Accelerate Mobile Page) -- I do this from
    news.google.fr
(2) Shutdown Chrome on iOS (i.e. switch to another app, then kill the
    app)
(3) Relaunch Chrome on iOS

When Chrome is relaunched, there will be no pending items and somehow a
server side redirect is fired, so a server side redirect item is added
to the chain.

This CL removes the DCHECK.

BUG= 710385 

Review-Url: https://codereview.chromium.org/2808353007
Cr-Commit-Position: refs/heads/master@{#464310}

[modify] https://crrev.com/a4eb8e01f972546913b22a605e31bd22c270cfe8/ios/web/navigation/crw_session_controller.mm

Is this fixed now?
Status: Fixed (was: Started)
I was gonna wait for Sylvain to verify and provide more feedback, but it seems that he is OOO until next week. I tested locally and it works, so I'm marking it as fixed.
Labels: Merge-TBD
[Auto-generated comment by a script] We noticed that this issue is targeted for M-58; it appears the fix may have landed after branch point, meaning a merge might be required. Please confirm if a merge is required here - if so add Merge-Request-58 label, otherwise remove Merge-TBD label. Thanks.
Labels: -Merge-TBD Merge-Request-58
Project Member

Comment 14 by sheriffbot@chromium.org, Apr 13 2017

Labels: -Merge-Request-58 Merge-Review-58 Hotlist-Merge-Review
This bug requires manual review: Less than 8 days to go before AppStore submit on M58
Please contact the milestone owner if you have questions.
Owners: amineer@(Android), cmasso@(iOS), bhthompson@(ChromeOS), govind@(Desktop)

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Labels: -Hotlist-Merge-Review -M-59 -Merge-Review-58 Merge-Approved-58
Labels: -M-58 M-59 Merge-Request-59
Project Member

Comment 17 by sheriffbot@chromium.org, Apr 18 2017

Labels: -Merge-Request-59 Hotlist-Merge-Approved Merge-Approved-59
Your change meets the bar and is auto-approved for M59. Please go ahead and merge the CL to branch 3071 manually. Please contact milestone owner if you have questions.
Owners: amineer@(Android), cmasso@(iOS), gkihumba@(ChromeOS), Abdul Syed@(Desktop)

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Commit a4eb8e01f972546913b22a605e31bd22c270cfe8 is already contained in branch 3701, so there is nothing to do.
Project Member

Comment 19 by sheriffbot@chromium.org, Apr 21 2017

This issue has been approved for a merge. Please merge the fix to any appropriate branches as soon as possible!

If all merges have been completed, please remove any remaining Merge-Approved labels from this issue.

Thanks for your time! To disable nags, add the Disable-Nags label.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Labels: -Hotlist-Merge-Approved -Merge-Approved-58 -Merge-Approved-59
Status: Verified (was: Fixed)
Verified on latest chrome 59.0.3071.82 on iPhone7(V 10.2.1). As per comment #0 on cold start of the application, web page loads with the redirect URL content. Please find the attached screenshot.

SS: https://drive.google.com/corp/drive/u/0/folders/0B5d6qWd_WCfSZ1Q2UjJseXp1Z1E

Sign in to add a comment