如果网络处于关闭状态(例如,它无法访问youtube页面),并且在平台启动时使用--preload
param启动钴,则无法加载并显示youtube ui,即使它从预加载状态切换到开始状态,url无法重新加载且无法显示UI,因此对于这种情况,钴如何处理呢?
//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
答案 0 :(得分:0)
在常规的非预加载模式下,如果启动没有网络的Cobalt,它将尝试加载URL,失败,然后调用SbSystemRaisePlatformError,这通常会显示某种错误对话框,然后可以使用指示符回拨以重试。
在预加载模式下,情况没有任何不同。从预加载到启动只是让应用程序可见,它并不表示网络状态发生了变化。
现在,如果某个实现在预加载模式下遇到平台错误,它可能会等到转换开始然后触发重试指示符。如果需要,这将取决于平台。
还可以发送网络状态更改事件(请参阅右舷/ event.h),但我不确定它们是否会导致Cobalt自动重试。
答案 1 :(得分:0)
将过滤器默认设置为kSbSocketResolveFilterIpv4
SystemHostResolverProc
中的host_resolver_proc.cc
,当它从网络关闭状态切换到网络状态时,它不会获得ERR_NAME_RESOLUTION_FAILED
,它可以重新加载YT页面。