question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Profile plugin, trace viewer, does not work in Chrome 80+

See original GitHub issue

Chrome 80+ deprecated two APIs: document.registerElement and Element.prototype.createShadowRoot. This broke Chrome’s trace viewer, Catapult, which was assuming presence of the APIs on Chrome (it did not include proper polyfills; was only meant to run in Chrome anyways!).

To overcome the issue, we have tried few things and I will try to enumerate what was tried:

Element.prototype.createShadowRoot = function() {
      const name = this.tagName;
      if (name.includes('-') ||
          name == 'div' ||
          name ==  'article' ||
          name == 'aside' ||
          name == 'blockquote' ||
          name == 'body' ||
          name == 'div' ||
          name == 'footer' ||
          name == 'h1' ||
          name == 'h2' ||
          name == 'h3' ||
          name == 'h4' ||
          name == 'h5' ||
          name == 'h6' ||
          name == 'header' ||
          name == 'main' ||
          name == 'nav' ||
          name == 'p' ||
          name == 'section' ||
          name == 'span'
      ) {
        return this.attachShadow({mode: 'open'});
      }
    };
  • Even with our polyfill for createShadowRoot, we still get below
Uncaught DOMException: Failed to execute 'appendChild' on 'Node': Nodes of type '#document-fragment' may not be inserted inside nodes of type '#document'.
    at DomApi.<computed> [as appendChild

At this point, we can try to identify the problem and manually patch everything to make sure trace_viewer works (barely), but I think we should try to look what it will take to:

  1. turn off native shadow DOM requirement, and
  2. upgrade dependency on catapult to use Polymer 2.x and polyfill v1

If above two things are done, we will be able to fix #1291.

@psybuzz I can see how to vulcanize the trace viewer but I have no idea how the dependencies are managed in Chromium/catapult. Can you please help us try above two? I think I can, too, check for correctness of (1).

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:2
  • Comments:15 (5 by maintainers)

github_iconTop GitHub Comments

8reactions
mathpluscodecommented, Mar 2, 2020

Got the same problem and if the Host is local, you need to add a point after local like host=local.&run= to make it work

8reactions
psybuzzcommented, Feb 15, 2020

If your TensorBoard process is running and you have a Chromium-based browser (e.g. the new Edge, Brave, Opera, Chrome), you can do this specifically as follows:

  • Get the [run name] (e.g. “profile_demo/foo”) from the left sidepane (or if you know it). If you have any [host name] other than ‘default’, get that too image
  • Craft a URL in this form: http://<tensorboard-url>/data/plugin/profile/data?host=<host-name>&run=<run-name>&tag=trace_viewer. For example if you are running TensorBoard on the origin localhost:6006 with run profile_demo/foo and empty host name, you would write the URL: http://localhost:6006/data/plugin/profile/data?host=&run=profile_demo%2Ffoo&tag=trace_viewer
  • In your browser, open a tab and navigate to the URL you crafted from the last step. The page should show you the raw JSON data, something like this: image
  • Now, you can do Ctrl+S to save the page as a .json file on your filesystem.
  • Then in a new browser tab, navigate to the url about://tracing. This should open your browser’s trace viewing tool. Click the “load” button in the top-left image
  • Once you select the .json file that you saved earlier, it should load the trace into the viewer, and show what would normally appear in the TensorBoard Profile plugin: image

Please let us know if one of these steps doesn’t work.

Read more comments on GitHub >

github_iconTop Results From Across the Web

1036492 - Legacy Trace Viewer does not work with chrome ...
Issue 1036492: Legacy Trace Viewer does not work with chrome M80+ because it uses WebComponent V0. This issue has been migrated to Launch,...
Read more >
Archived release notes - Chrome Enterprise and Education Help
Note: For information about the current Chrome versions and targeted releases, see Chrome Enterprise release notes.
Read more >
Chrome Trace Viewer - Google Groups
I recently ran across the trace viewer in Chrome and I am very excited about it. Having used RAD Game Tools' Telemetry viewer...
Read more >
google trace viewer
Trace Viewer is the frontend for chrome://tracing and Android systrace. trace ends when B should end (which is fair enough - this is...
Read more >
Troubleshooting | Cloud Data Fusion Documentation
Troubleshooting · Pipeline is stuck · Concurrent pipelines are stuck · Joiner plugin does not show join conditions · Replication for SQL Server...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found