iOS - JS Error: Mobile Search page: undefined is not an object
undefined is not an object (evaluating 'document.getElementsByClassName('course-card').innerText')
These errors began to grow starting Sept. 6 at 11 PM Eastern time. They are coming from /webview/search and occurring about 700 times an hour on Mobile, less often on desktop. See the NR 3 day view.
This appears to be caused by https://github.com/edx/edx-app-ios/blob/cae242054f66c84a252fc8167a8909531a13d825/Source/DiscoveryWebViewHelper.swift#L297 , part of an e2e test that was relying on a certain class name being there in the course cards. The test should either be updated to the correct classname based on the new prospectus page, or, ideally, not dependent on executing JS in the DOM at all.
We had completely removed the JS evaluation code from the iOS codebase, and rolled out the fix in 2.24.1, so the only chances are it is coming from the older versions of the app.
Is there a way to check which app versions are reporting this issue on New Relic? cc
any immediate thoughts about what is going on? Seems like we need to reopen this.
cc let’s discuss what we know about the impact on Monday and see if we want to inject or schedule for the next sprint.
Two months later we are still seeing this about 25 times per hour. I would have expected adoption of the fixed version to be nearly-total by now. Is there a chance this is happening in another spot in the codebase as well?
Great , thank you!
Thanks - the fix for this was just released to the App Store about 12 hours ago (2.24.1). We should see the errors decrease as users start to adopt this new version over the next couple days. If this still seems to be happening at the same frequency tomorrow, we’ll take a deeper look.