Fix Blank Go Trace Viewer in Chrome with an Origin Trial Token
This guide explains why the Go trace viewer shows a blank page in Chrome, due to a disabled local API, and provides a step‑by‑step solution involving registering an origin‑trial token, modifying the trace source, and rebuilding the tool.
go trace is used to monitor goroutine execution and works well with pprof, but the view trace page appears blank in Chrome.
The cause is that Google disabled a local API in a certain Chrome version.
Register a Chrome origin‑trial token at https://developers.chrome.com/origintrials/#/register_trial/2431943798780067841 . Fill in the information arbitrarily and be sure to submit feedback.
Modify the Go trace source file src/cmd/trace/trace.go by adding the following line inside the <head> section: <meta http-equiv="origin-trial" content="YOUR_TOKEN_GOES_HERE"> Then run go install to rebuild.
Open $GOPATH/misc/trace/trace_viewer_full.html to verify the configuration.
When using go trace , the view trace page now loads correctly.
Configuration successful.
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
