1

If the network is OFF(eg. it can not visit the youtube page), and start cobalt with --preload param when the platform is powering on, then it can not load and show the youtube ui, even when it switches from preloading state to starting state, the url can not be reloaded and can not show UI, so for this case, how can cobalt process it?

//Even the network is on, it can not reload the YT url from SbSystemRaisePlatformError, tsa03s02-in-f142.1e100.net is the hostname of www.youtube.com
64 bytes from tsa03s02-in-f142.1e100.net (172.217.27.142): icmp_req=51 ttl=52 time=49.1 ms
64 bytes from tsa03s02-in-f142.1e100.net (172.217.27.142): icmp_req=52 ttl=52 time=48.3 ms
64 bytes from tsa03s02-in-f142.1e100.net (172.217.27.142): icmp_req=53 ttl=52 time=66.7 ms
[cobalt]>[11604:2581014753:INFO:h5vcc_url_handler.cc(119)] try to reload url, url= https://www.youtube.com/tv?additionalDataUrl=http://localhost:56789/apps/YouTube/dial_data
[cobalt]>[11604:2581014916:INFO:system_raise_platform_error.cc(49)] SbSystemRaisePlatformError: Connection error.
[cobalt]>[0810/114518:WARNING:system_window.cc(200)] Failed to notify user of error: 0
[cobalt]>[12263:2581046785:WARNING:thread_set_name.cc(36)] Thread name "SplashScreenWebModule" was truncated to "SplashScreenWeb"
64 bytes from tsa03s02-in-f14.1e100.net (172.217.27.142): icmp_req=54 ttl=52 time=48.6 ms
[cobalt]>[0810/114518:INFO:page_visibility_state.cc(70)] PageVisibilityState: app_state=kApplicationStateStarted (2)
[cobalt]>[12267:2581204654:WARNING:thread_set_name.cc(36)] Thread name "Synchronous Load" was truncated to "Synchronous Loa"
[cobalt]>[11604:2581247952:INFO:window_get_size.cc(36)] SbWindowGetSizewidth: 1920, height: 1080, ratio: 1
[cobalt]>[0810/114518:INFO:fetcher_factory.cc(94)] Fetching: h5vcc-embedded://splash_screen.html
[cobalt]>[0810/114518:INFO:fetcher_factory.cc(94)] Fetching: h5vcc-embedded://splash_screen.css
[cobalt]>[0810/114518:INFO:fetcher_factory.cc(94)] Fetching: h5vcc-embedded://you_tube_logo.png
[cobalt]>[0810/114518:INFO:fetcher_factory.cc(94)] Fetching: h5vcc-embedded://splash_screen.js
[cobalt]>[0810/114518:INFO:page_visibility_state.cc(70)] PageVisibilityState: app_state=kApplicationStateStarted (2)
[cobalt]>[12272:2581440597:WARNING:thread_set_name.cc(36)] Thread name "Synchronous Load" was truncated to "Synchronous Loa"
[cobalt]>[0810/114518:INFO:fetcher_factory.cc(94)] Fetching: https://www.youtube.com/tv?additionalDataUrl=http://loc[...]
[cobalt]>[0810/114518:ERROR:host_resolver_proc.cc(155)] [AAAAA]host= www.youtube.com
[cobalt]>[0810/114518:ERROR:browser_module.cc(702)] NetFetcher error on : net::ERR_NAME_RESOLUTION_FAILED, response code -1
[cobalt]>[0810/114518:WARNING:h5vcc_url_handler.cc(30)] url=//network-failure?retry-url=https://www.youtube.com/tv?additionalDataUrl=http://localhost:56789/apps/YouTube/dial_data
[cobalt]>[0810/114518:WARNING:h5vcc_url_handler.cc(92)] HandleNetworkFailure:
64 bytes from tsa03s02-in-f14.1e100.net (172.217.27.142): icmp_req=55 ttl=52 time=48.6 ms
64 bytes from tsa03s02-in-f142.1e100.net (172.217.27.142): icmp_req=56 ttl=52 time=49.5 ms
64 bytes from tsa03s02-in-f14.1e100.net (172.217.27.142): icmp_req=57 ttl=52 time=67.3 ms
[cobalt]>[11604:2584493042:INFO:h5vcc_url_handler.cc(119)] try to reload url, url= https://www.youtube.com/tv?additionalDataUrl=http://localhost:56789/apps/YouTube/dial_data
bitchainer
  • 535
  • 2
  • 19

2 Answers2

0

In regular non-preload mode, if you start up Cobalt with no network, it will attempt to load the URL, fail, and then call SbSystemRaisePlatformError, which is generally expected to display an error dialog of some sort, which can then call back with an indicator to retry.

In preload mode, the situation isn't any different. Moving from preloading to started just is like making the app visible, it doesn't indicate a network status change.

Now, if an implementation got a platform error in preloading mode, it could wait until the transition to started and then fire the retry indicator. That would be up to the platform if that was desired.

There are also network status change events that can be sent (see starboard/event.h) but I'm not sure if they will cause Cobalt to retry automatically.

David Ghandehari
  • 534
  • 3
  • 12
  • hi, david, I tried it with your suggestion, when it loaded youtube fail, then try to reload it in SbSystemRaisePlatformError, but even the netwotk is on latter, it still got the ERR_NAME_RESOLUTION_FAILED,and got into SbSystemRaisePlatformError, it can not reload YT with network on. – bitchainer Aug 10 '17 at 11:51
  • I add the log msg to the quesqion, please help to reference it. – bitchainer Aug 10 '17 at 11:53
  • it seemed the SystemHostResolverProc still failed even the network is on later. – bitchainer Aug 10 '17 at 11:59
  • hi, david, I found the root cause for this issue, when it retried to reload the YT page, it set the ADDRESS_FRILY_UNSPECIFIED in in SystemHostResolverProc host_resolver_proc.cc, which make the sbsocketResolve fail, if I set the filter default to kSbSocketResolveFilterIpv4, then it works well. – bitchainer Aug 11 '17 at 03:20
  • If you add a feature request, I'll try to turn it around into a fix in Cobalt 11... – David Ghandehari Aug 11 '17 at 03:28
  • hi, david, this feature is expected to cover the network issues(not ip/ has ip but can not visit youtube...) in preload feature, so please help to fix it in cobalt , thank you! – bitchainer Aug 11 '17 at 08:48
  • hi, david, I found there is another issue, when the local network is on, but it can not visit YT, it will keep getting the net::ERR_FAILED error even it can visit YT later, and can not reload the YT. – bitchainer Aug 11 '17 at 09:36
  • hi, david, I add a feature request for this issue, please help see https://groups.google.com/forum/#!topic/cobalt-dev/NknLFyw1lms to reference it. – bitchainer Aug 14 '17 at 12:13
  • And sometims even there is no network(just has internal network) to visit youtube, it can not get SbSystemRaisePlatformError. – bitchainer Sep 05 '17 at 01:28
  • Hi, we are working on this. We should have something up in the next couple days. We have found several problems with this scenario, so thank you for pointing it out! – David Ghandehari Sep 05 '17 at 05:33
0

Set the filter default to kSbSocketResolveFilterIpv4 in SystemHostResolverProc of host_resolver_proc.cc, it will not get the ERR_NAME_RESOLUTION_FAILED when it switches from network off to network on state, and it can reload the YT page well.

bitchainer
  • 535
  • 2
  • 19
  • But there is another issue, when the local network is on, but it can not visit YT, it will keep getting the net::ERR_FAILED error even it can visit YT later, and can not reload the YT – bitchainer Aug 15 '17 at 05:19