JS error on website

I try to visit https://app.codecov.io/gh/ljharb/es-create-array-iterator/branch/main, and there’s a JS error in the console ReferenceError: Can't find variable: analytics that seems to be preventing anything from loading below the Overview/Branches/Settings tabs.

Also, https://codecov.io/gh/ljharb/es-create-array-iterator says “no commits found on master”, but the default branch for this repo is “main”.

@ljharb, are you still seeing the analytics issue? I can’t seem to reproduce. As for the default branch, I think you need to change it here

Thanks, it seems to have been resolved in the last half hour.

Re the default branch, thanks, I updated it there, but I’d expect codecov to be able to read that from github automatically since there’s an API endpoint for it.

Actually, on second look, no - i’m still seeing the JS error here https://app.codecov.io/gh/ljharb/es-create-array-iterator/branch/main in Safari.

@ljharb, would you be able to provide a screenshot with the error? Still having some trouble reproducing it.

Sure. Here’s the stack trace:

[Error] ReferenceError: Can't find variable: analytics
	Global Code (main:1)
	(anonymous function) (gtm.js:665:427)
	c (gtm.js:667:99)
	Ub (gtm.js:489:309)
	e (gtm.js:563:277)
	(anonymous function) (gtm.js:479:116)
	(anonymous function) (gtm.js:564:297)
	(anonymous function) (gtm.js:564)
	Ji (gtm.js:564:586)
	Pi (gtm.js:567:154)
	Pl (gtm.js:599:239)
	Ql (gtm.js:602:86)
	(anonymous function) (gtm.js:604:92)
	(anonymous function) (gtm.js:603:222)

and here’s the screenshot:

Specifically, it seems like an error in Google Tag Manager, which I believe deploys JS code that engineers may not have reviewed, and is stored in the GTM admin console.

Thanks @ljharb, I’ve sent this to the product team to take a look and sorry for the inconvenience.

1 Like

@ljharb , we made some fixes here, can you check if you are still getting errors?

Awesome, thanks!

I still see Unhandled Promise Rejection: NavigationDuplicated: Avoided redundant navigation to current location: "/gh/ljharb/es-create-array-iterator/branch/main". in the console, as well as [Error] Failed to load resource: the server responded with a status of 401 () (profile, line 0) but they don’t seem to be interfering with operation of the page.

Awesome! Glad that got fixed. We are aware of the first issue, but it should not affect usage. Do you know the URL for the second issue?

The same one: https://app.codecov.io/gh/ljharb/es-create-array-iterator/branch/main

@ljharb, sorry I mean is that coming from a network call on the original URL page load or is it coming from the console? Asking as I can’t seem to reproduce the second issue.

ah, i can’t reproduce it now, but it was coming from initial pageload.

1 Like

Repo dash does not load due to analytics JS error may be a recurrence of this error.