{"id":618,"date":"2021-02-08T21:11:21","date_gmt":"2021-02-09T03:11:21","guid":{"rendered":"https:\/\/n8williams.com\/devblog\/?p=618"},"modified":"2021-02-08T21:11:22","modified_gmt":"2021-02-09T03:11:22","slug":"elixir-wallaby-uncaught-javascript-error","status":"publish","type":"post","link":"https:\/\/n8williams.com\/devblog\/general_dev\/elixir-wallaby-uncaught-javascript-error","title":{"rendered":"Elixir Wallaby uncaught JavaScript error"},"content":{"rendered":"\n<p>If you see this error, you may likely have a JS error that has crept in to your JS build you did not realize:<\/p>\n\n\n\n<p><code>** (Wallaby.JSError) There was an uncaught JavaScript error:<\/code><\/p>\n\n\n\n<p>My full error ended up resolving to an app.js file, which took me a second to realize had some new code on a pre-login page. This ended up explaining why the login tests were failing when the login form was loaded (who would have thought?).<\/p>\n\n\n\n<p>The generic nature of the js file (app.js) made it so I did not initially recognize some local code was calling a function on a non-existent element from a DOM query, which was resolving to undefined (so the classList property being referenced was failing).<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code> ** (Wallaby.JSError) There was an uncaught JavaScript error:\n     \nwebpack:\/\/\/.\/js\/app.js? 115:22 Uncaught TypeError: Cannot read property &#039;classList&#039; of null<\/code><\/pre>\n\n\n\n<p>I have found that issues like this will likely have more to do with local code. The default logger settings are somewhat helpful, and the stack trace eventually resolved to\u00a0<code>(wallaby 0.28.0) lib\/wallaby\/chrome\/logger.ex:8: Wallaby.Chrome.Logger.parse_log\/1<\/code>.<\/p>\n\n\n\n<p>It took me a minute to realize the app.js here was our local webpack build, not some internal Wallaby build of some sort. If Wallaby is truly the issue, you can try and update dependencies, and I would note you would something more similar to a Chromedriver session id error, as with <a href=\"https:\/\/n8williams.com\/devblog\/general_dev\/elixir-wallaby-and-chromedriver-issue-runtimeerror-invalid-session-id\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/n8williams.com\/devblog\/general_dev\/elixir-wallaby-and-chromedriver-issue-runtimeerror-invalid-session-id<\/a>.<\/p>\n\n\n\n<p>To this point I have been very pleased with Wallaby, I cannot recommend it enough for acceptance testing, etc!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>If you see this error, you may likely have a JS error that has crept in to your JS build you did not realize: ** (Wallaby.JSError) There was an uncaught JavaScript error: My full error ended up resolving to an app.js file, which took me a second to realize had some new code on a &hellip; <a href=\"https:\/\/n8williams.com\/devblog\/general_dev\/elixir-wallaby-uncaught-javascript-error\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Elixir Wallaby uncaught JavaScript error&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[7],"tags":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.11 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Elixir Wallaby uncaught JavaScript error - The Dev Pages<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/n8williams.com\/devblog\/general_dev\/elixir-wallaby-uncaught-javascript-error\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Elixir Wallaby uncaught JavaScript error - The Dev Pages\" \/>\n<meta property=\"og:description\" content=\"If you see this error, you may likely have a JS error that has crept in to your JS build you did not realize: ** (Wallaby.JSError) There was an uncaught JavaScript error: My full error ended up resolving to an app.js file, which took me a second to realize had some new code on a &hellip; Continue reading &quot;Elixir Wallaby uncaught JavaScript error&quot;\" \/>\n<meta property=\"og:url\" content=\"https:\/\/n8williams.com\/devblog\/general_dev\/elixir-wallaby-uncaught-javascript-error\" \/>\n<meta property=\"og:site_name\" content=\"The Dev Pages\" \/>\n<meta property=\"article:published_time\" content=\"2021-02-09T03:11:21+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2021-02-09T03:11:22+00:00\" \/>\n<meta name=\"author\" content=\"Nate Admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@admin\" \/>\n<meta name=\"twitter:site\" content=\"@admin\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Nate Admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/n8williams.com\/devblog\/general_dev\/elixir-wallaby-uncaught-javascript-error#article\",\"isPartOf\":{\"@id\":\"https:\/\/n8williams.com\/devblog\/general_dev\/elixir-wallaby-uncaught-javascript-error\"},\"author\":{\"name\":\"Nate Admin\",\"@id\":\"https:\/\/n8williams.com\/devblog\/#\/schema\/person\/1c31624786b5382f1a811f0a01985757\"},\"headline\":\"Elixir Wallaby uncaught JavaScript error\",\"datePublished\":\"2021-02-09T03:11:21+00:00\",\"dateModified\":\"2021-02-09T03:11:22+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/n8williams.com\/devblog\/general_dev\/elixir-wallaby-uncaught-javascript-error\"},\"wordCount\":230,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/n8williams.com\/devblog\/#\/schema\/person\/1c31624786b5382f1a811f0a01985757\"},\"articleSection\":[\"General Dev\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/n8williams.com\/devblog\/general_dev\/elixir-wallaby-uncaught-javascript-error#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/n8williams.com\/devblog\/general_dev\/elixir-wallaby-uncaught-javascript-error\",\"url\":\"https:\/\/n8williams.com\/devblog\/general_dev\/elixir-wallaby-uncaught-javascript-error\",\"name\":\"Elixir Wallaby uncaught JavaScript error - The Dev Pages\",\"isPartOf\":{\"@id\":\"https:\/\/n8williams.com\/devblog\/#website\"},\"datePublished\":\"2021-02-09T03:11:21+00:00\",\"dateModified\":\"2021-02-09T03:11:22+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/n8williams.com\/devblog\/general_dev\/elixir-wallaby-uncaught-javascript-error#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/n8williams.com\/devblog\/general_dev\/elixir-wallaby-uncaught-javascript-error\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/n8williams.com\/devblog\/general_dev\/elixir-wallaby-uncaught-javascript-error#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/n8williams.com\/devblog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Elixir Wallaby uncaught JavaScript error\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/n8williams.com\/devblog\/#website\",\"url\":\"https:\/\/n8williams.com\/devblog\/\",\"name\":\"The Dev Pages\",\"description\":\"A knowledge base for web applications development (and beyond)\",\"publisher\":{\"@id\":\"https:\/\/n8williams.com\/devblog\/#\/schema\/person\/1c31624786b5382f1a811f0a01985757\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/n8williams.com\/devblog\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\/\/n8williams.com\/devblog\/#\/schema\/person\/1c31624786b5382f1a811f0a01985757\",\"name\":\"Nate Admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/n8williams.com\/devblog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/19d7bc7602072ac846e912622704a628?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/19d7bc7602072ac846e912622704a628?s=96&d=mm&r=g\",\"caption\":\"Nate Admin\"},\"logo\":{\"@id\":\"https:\/\/n8williams.com\/devblog\/#\/schema\/person\/image\/\"},\"sameAs\":[\"http:\/\/n8williams.com\",\"https:\/\/twitter.com\/admin\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Elixir Wallaby uncaught JavaScript error - The Dev Pages","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/n8williams.com\/devblog\/general_dev\/elixir-wallaby-uncaught-javascript-error","og_locale":"en_US","og_type":"article","og_title":"Elixir Wallaby uncaught JavaScript error - The Dev Pages","og_description":"If you see this error, you may likely have a JS error that has crept in to your JS build you did not realize: ** (Wallaby.JSError) There was an uncaught JavaScript error: My full error ended up resolving to an app.js file, which took me a second to realize had some new code on a &hellip; Continue reading \"Elixir Wallaby uncaught JavaScript error\"","og_url":"https:\/\/n8williams.com\/devblog\/general_dev\/elixir-wallaby-uncaught-javascript-error","og_site_name":"The Dev Pages","article_published_time":"2021-02-09T03:11:21+00:00","article_modified_time":"2021-02-09T03:11:22+00:00","author":"Nate Admin","twitter_card":"summary_large_image","twitter_creator":"@admin","twitter_site":"@admin","twitter_misc":{"Written by":"Nate Admin","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/n8williams.com\/devblog\/general_dev\/elixir-wallaby-uncaught-javascript-error#article","isPartOf":{"@id":"https:\/\/n8williams.com\/devblog\/general_dev\/elixir-wallaby-uncaught-javascript-error"},"author":{"name":"Nate Admin","@id":"https:\/\/n8williams.com\/devblog\/#\/schema\/person\/1c31624786b5382f1a811f0a01985757"},"headline":"Elixir Wallaby uncaught JavaScript error","datePublished":"2021-02-09T03:11:21+00:00","dateModified":"2021-02-09T03:11:22+00:00","mainEntityOfPage":{"@id":"https:\/\/n8williams.com\/devblog\/general_dev\/elixir-wallaby-uncaught-javascript-error"},"wordCount":230,"commentCount":0,"publisher":{"@id":"https:\/\/n8williams.com\/devblog\/#\/schema\/person\/1c31624786b5382f1a811f0a01985757"},"articleSection":["General Dev"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/n8williams.com\/devblog\/general_dev\/elixir-wallaby-uncaught-javascript-error#respond"]}]},{"@type":"WebPage","@id":"https:\/\/n8williams.com\/devblog\/general_dev\/elixir-wallaby-uncaught-javascript-error","url":"https:\/\/n8williams.com\/devblog\/general_dev\/elixir-wallaby-uncaught-javascript-error","name":"Elixir Wallaby uncaught JavaScript error - The Dev Pages","isPartOf":{"@id":"https:\/\/n8williams.com\/devblog\/#website"},"datePublished":"2021-02-09T03:11:21+00:00","dateModified":"2021-02-09T03:11:22+00:00","breadcrumb":{"@id":"https:\/\/n8williams.com\/devblog\/general_dev\/elixir-wallaby-uncaught-javascript-error#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/n8williams.com\/devblog\/general_dev\/elixir-wallaby-uncaught-javascript-error"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/n8williams.com\/devblog\/general_dev\/elixir-wallaby-uncaught-javascript-error#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/n8williams.com\/devblog\/"},{"@type":"ListItem","position":2,"name":"Elixir Wallaby uncaught JavaScript error"}]},{"@type":"WebSite","@id":"https:\/\/n8williams.com\/devblog\/#website","url":"https:\/\/n8williams.com\/devblog\/","name":"The Dev Pages","description":"A knowledge base for web applications development (and beyond)","publisher":{"@id":"https:\/\/n8williams.com\/devblog\/#\/schema\/person\/1c31624786b5382f1a811f0a01985757"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/n8williams.com\/devblog\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/n8williams.com\/devblog\/#\/schema\/person\/1c31624786b5382f1a811f0a01985757","name":"Nate Admin","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/n8williams.com\/devblog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/19d7bc7602072ac846e912622704a628?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/19d7bc7602072ac846e912622704a628?s=96&d=mm&r=g","caption":"Nate Admin"},"logo":{"@id":"https:\/\/n8williams.com\/devblog\/#\/schema\/person\/image\/"},"sameAs":["http:\/\/n8williams.com","https:\/\/twitter.com\/admin"]}]}},"_links":{"self":[{"href":"https:\/\/n8williams.com\/devblog\/wp-json\/wp\/v2\/posts\/618"}],"collection":[{"href":"https:\/\/n8williams.com\/devblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/n8williams.com\/devblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/n8williams.com\/devblog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/n8williams.com\/devblog\/wp-json\/wp\/v2\/comments?post=618"}],"version-history":[{"count":1,"href":"https:\/\/n8williams.com\/devblog\/wp-json\/wp\/v2\/posts\/618\/revisions"}],"predecessor-version":[{"id":619,"href":"https:\/\/n8williams.com\/devblog\/wp-json\/wp\/v2\/posts\/618\/revisions\/619"}],"wp:attachment":[{"href":"https:\/\/n8williams.com\/devblog\/wp-json\/wp\/v2\/media?parent=618"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/n8williams.com\/devblog\/wp-json\/wp\/v2\/categories?post=618"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/n8williams.com\/devblog\/wp-json\/wp\/v2\/tags?post=618"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}