I think this happens when a page mutates its iframes while the snapping is underway. I've seen it sporadically on a number of the top 25 pages. Currently it is near 100% reproducible on Yahoo News and Sports:
http://news.yahoo.com
http://sports.yahoo.com
Sample error log:
Snapshotting content of http://news.yahoo.com. This could take a while...
Traceback (most recent call last):
<module> at /usr/local/google/home/wkorman/workspace/chromium/src/third_party/catapult/telemetry/bin/snap_page:36
sys.exit(main(sys.argv[1:]))
main at /usr/local/google/home/wkorman/workspace/chromium/src/third_party/catapult/telemetry/bin/snap_page:33
options.snapshot_path, options.enable_browser_log)
SnapPage at /usr/local/google/home/wkorman/workspace/chromium/src/third_party/catapult/telemetry/telemetry/internal/snap_page_util.py:204
enable_browser_log)
_SnapPageToFile at /usr/local/google/home/wkorman/workspace/chromium/src/third_party/catapult/telemetry/telemetry/internal/snap_page_util.py:141
for context_id in tab.EnableAllContexts():
RuntimeError: Set changed size during iteration
Locals:
browser : <telemetry.internal.browser.browser.Browser object at 0x7f84b16acb10>
context_id : 2
dom_combining_script : 'document.addEventListener(\'DOMContentLoaded\', function() {\n if (document.getElementById(\'button\')) {\n document.getElementById(\'button\').addEventListener(\'click\', click);\n }\n});\n\nfunction click() {\n var messages = []\n var results;\n chrome.runtime.onMessage.addListener(function(message, sender, sendResponse) {\n messages.push(message);\n if (results && messages.length == results.length) {\n completeProcess(messages);\n }\n });\n\n var serializer = {file: \'HTMLSeri ... rcdoc.value;\n }\n return html;\n}\n\n/**\n * Calculate the correct encoding of a quotation mark that should be used given\n * the nesting depth of the window in the frame tree.\n *\n * @param {number} depth The nesting depth of the appropriate window in the\n * frame tree.\n * @return {string} The correctly escaped string. \n */\nfunction escapedQuote(depth) {\n if (depth == 0) {\n return \'"\';\n } else {\n var arr = \'amp;\'.repeat(depth-1);\n return \'&\' + arr + \'quot;\';\n }\n}\n' (truncated)
enable_browser_log : False
external_images : [[[u'snap-it49', u'https://s.yimg.com/kx/yucs/uh3s/promo-ff/1/images/ff_icon-compressed.png'], [u'uh-logo', u'https://s.yimg.com/rz/d/yahoo_news_en-US_s_f_pw_351x40_news.png'], [u'snap-it161', u'https://s.yimg.com/uu/api/res/1.2/V1viwC7rEQlvcNAmkKa0kQ--~B/Zmk9c3RyaW07aD0zMDI7cHlvZmY9MDtxPTkwO3c9NTM3O3NtPTE7YXBwaWQ9eXRhY2h5b24-/https://s.yimg.com/os/creatr-images/GLB/2017-10-30/e05c2e40-bd8f-11e7-a3a1-53fbb3c86e86_George-Papadopoulos_twitter.jpg.cf.webp'], [u'snap-it163', u'https://s.yimg.com/uu/api/res/1 ... 'snap-it992', u'https://s.yimg.com/dh/ap/default/160914/mb2.jpg'], [u'snap-it1015', u'https://s.yimg.com/os/weather/1.0.1/dark_icon/64x64/windy_day_night@2x.png'], [u'snap-it1023', u'https://s.yimg.com/os/weather/1.0.1/dark_icon/64x64/fair_day@2x.png'], [u'snap-it1031', u'https://s.yimg.com/os/weather/1.0.1/dark_icon/64x64/fair_day@2x.png'], [u'snap-it1039', u'https://s.yimg.com/os/weather/1.0.1/dark_icon/64x64/mostly_cloudy_day_night@2x.png'], [u'snap-it1101', u'https://s.yimg.com/rq/darla/i/fdb1.gif']]] (truncated)
finder_options : [('android_blacklist_file', None), ('browser_executable', None), ('browser_options', [('_browser_startup_timeout', 60), ('_extra_browser_args', set([])), ('block_modal_permission_prompts', True), ('browser_type', 'system'), ('browser_user_agent_type', None), ('clear_sytem_cache_for_browser_and_profile_on_start', False), ('disable_background_networking', True), ('disable_component_extensions_with_background_pages', True), ('disable_default_apps', True), ('dont_override_profile', False), ('extensions_to_lo ... wpr_args_as_string', None), ('gtest_output', None), ('interactive', False), ('logging_verbosity', None), ('no_performance_mode', False), ('output_file', None), ('print_bootstrap_deps', None), ('profile_dir', None), ('profiler', None), ('remote_platform_options', <telemetry.internal.platform.remote_platform_options.AndroidPlatformOptions object at 0x7f84b201dc10>), ('show_stdout', None), ('snapshot_path', 'yahoonews.html'), ('url', 'http://news.yahoo.com'), ('verbosity', 0), ('webview_embedder_apk', None)] (truncated)
frame_number : 1
image_dir : '/usr/local/google/home/wkorman/workspace/chromium/src/yahoonews'
interactive : False
local_image_path : 'yahoonews/0-'
serialized_doms : [{u'rootId': u'atomic', u'windowWidth': 1270, u'pseudoElementTestingStyleIndex': 19, u'idToStyleIndex': {u'snap-it925': 7227, u'Col2-7-Footer-Proxy': 8440, u'mrt-node-Col2-7-Footer': 8435, u'mrt-node-Col2-0-FollowAuthor': 7711, u'snap-it858': 6779, u'YDC-Lead': 8611, u'snap-it1086': 8824, u'snap-it863': 6808, u'snap-it786': 6267, u'snap-it1025': 8140, u'Col2-3-WeatherSimpleForecast-Proxy': 7992, u'snap-it1046': 8301, u'snap-it633': 5220, u'snap-it632': 5212, u'snap-it631': 5203, u'snap-it630': 5196, u'sn ... ear': u'none', u'animation-timing-function': u'ease', u'mask': u'none', u'stroke-dashoffset': u'0px', u'border-image-source': u'none', u'box-sizing': u'content-box', u'transition-duration': u'0s', u'margin-top': u'0px', u'-webkit-text-decorations-in-effect': u'none', u'stroke-dasharray': u'none', u'flex-shrink': u'1', u'justify-self': u'auto', u'y': u'0px', u'position': u'static', u'-webkit-line-clamp': u'none', u'left': u'auto', u'order': u'0', u'list-style-position': u'outside'}}, u'rootStyleIndex': 7}] (truncated)
snapit_script : '/**\n * HTML Serializer that takes a document and synchronously stores it as an array\n * of strings, then asynchronously retrieves data URLs for same-origin images.\n * It stores enough state to later be converted to an html text file.\n */\nvar HTMLSerializer = class {\n constructor() {\n\n /**\n * @private {Set<string>} Contains the tag names that should be\n * ignored while serializing a document.\n * @const\n */\n this.FILTERED_TAGS = new Set([\'SCRIPT\', \'NOSCRIPT\', \' ... }).catch(function(error) {\n console.log(error);\n serializer.fillSrcHoles(callback);\n });\n }\n }\n\n /**\n * Sets the path to the directory under which any external images\n * found in the page will be fetched and stored locally. If\n * non-null, the urls for any such images will be rewritten to be\n * relative to this path.\n *\n * @param {string=} opt_path The directory path.\n */\n setLocalImagePath(opt_path) {\n this.localImagePath = opt_path;\n }\n}\n' (truncated)
snapshot_file : <closed file '/usr/local/google/home/wkorman/workspace/chromium/src/yahoonews.html', mode 'wb' at 0x7f84b1f97e40>
snapshot_path : '/usr/local/google/home/wkorman/workspace/chromium/src/yahoonews.html'
tab : <telemetry.internal.browser.tab.Tab object at 0x7f84b16c5190>
url : 'http://news.yahoo.com'
Comment 1 by wkorman@chromium.org
, Oct 30 2017