Bug #13958
openPopup: "Wt internal error; code: undefined, description: can't access property "adjust", Wt4_11_4.$(...).layout is undefined" on reopen of browser
0%
Description
The error popup is most likely caused by a WPanel (with several WPushButtons) hidden on creation and setHidden(false) later (after establishing a connection).
In addition, this panel suffers from WHBoxLayout::setSpacing() not having an effect until the page is reloaded in the browser.
related/similar to https://redmine.emweb.be/issues/12288
Trace output:
[2025-Sep-03 08:27:08.029] 1564436 - [access] "wthttp: 127.0.0.1 POST /?wtd=bwRJnL3A3nVKqYde HTTP/1.1 200 38036"
[2025-Sep-03 08:27:08.029] 1564436 - [info] "WebRequest: took 296309 ms"
[2025-Sep-03 08:27:08.146] 1564436 - [access] "wthttp: 127.0.0.1 GET /?wtd=bwRJnL3A3nVKqYde&sid=4162340155&webGL=true&scrW=2560&scrH=1387&tz=120&tzS=Europe%2FBerlin&htmlHistory=true&deployPath=%2F&request=script&rand=3731069149 HTTP/1.1 200 504495"
[2025-Sep-03 08:27:08.146] 1564436 - [info] "WebRequest: took 378.709 ms"
[2025-Sep-03 08:27:08.642] 1564436 - [access] "wthttp: 127.0.0.1 GET /resources/loading.png HTTP/1.1 200 4267"
[2025-Sep-03 08:27:08.939] 1564436 - [access] "wthttp: 127.0.0.1 POST /?wtd=bwRJnL3A3nVKqYde HTTP/1.1 200 479042"
[2025-Sep-03 08:27:08.939] 1564436 - [info] "WebRequest: took 114.26 ms"
[2025-Sep-03 08:27:09.602] 1564436 - [error] "WebController: could not parse request: Oversized application/x-www-form-urlencoded (17167323) at
0x7ffff799b851 (Wt::WException::WException(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)+0x41)
0x7ffff7885b67 (Wt::CgiParser::parse(Wt::WebRequest&, Wt::CgiParser::ReadOption) [clone .cold]+0x165)
0x7ffff7d7480b (Wt::WebController::handleRequest(Wt::WebRequest*)+0x13b)
0x7ffff7630275 (boost::asio::detail::executor_op<boost::asio::detail::binder0<std::_Bind<void (Wt::WebController::*(Wt::WebController*, http::server::HTTPRequest*))(Wt::WebRequest*)> >, std::allocator<void>, boost::asio::detail::scheduler_operation>::do_complete(void*, boost::asio::detail::scheduler_operation*, boost::system::error_code const&, unsigned long)+0xb5)
0x7ffff7a08065 (boost::asio::detail::scheduler::do_run_one(boost::asio::detail::conditionally_enabled_mutex::scoped_lock&, boost::asio::detail::scheduler_thread_info&, boost::system::error_code const&)+0x355)
0x7ffff7a01b81 (boost::asio::detail::scheduler::run(boost::system::error_code&) [clone .isra.0]+0x101)
0x7ffff7a01e35 (Wt::WIOService::run()+0x65)
0x7ffff6daadb4 (std::error_code::default_error_condition() const+0x34)
0x7ffff6a31aa4 (pthread_condattr_setpshared+0x684)
0x7ffff6abec3c (__clone+0x24c)
"
[2025-Sep-03 08:27:09.602] 1564436 - [access] "wthttp: 127.0.0.1 POST /?wtd=bwRJnL3A3nVKqYde HTTP/1.1 200 616"
[2025-Sep-03 08:27:09.602] 1564436 - [info] "WebRequest: took 108.699 ms"
Files
Updated by Michael Seibt 23 days ago
Urgent : Still reproducible with Wt 4.12.2.
Caused by disabling a WPanel on creation and enabling it later.
STR:
- run attached main.cpp
- open http://127.0.0.1:8080
- Click "Enable bottom panel"
--> Popup "Wt internal error; code: undefined, description: can't access property "resizeItem", Wt4_12_2.$(...).layout is undefined"
and dead session
(The error in the trace output in the bug description was unrelated. It has been resolved by doubling max-formdata-size to 40960.)
But with this small app, a JavaScript error is traced. (With the actual app, it takes ~ 90 seconds until the error floods the trace.)
[2026-Feb-09 12:54:39.289] 23192 - [info] "config: reading Wt config file: <snip/>"
[2026-Feb-09 12:54:39.290] 23192 - [info] "WServer/wthttp: initializing built-in wthttpd"
[2026-Feb-09 12:54:39.291] 23192 - [info] "wthttp: started server: http://127.0.0.1:8080"
[2026-Feb-09 12:54:40.978] 23192 - [info] "Wt: session created (#sessions = 1)"
[2026-Feb-09 12:54:40.979] 23192 [/ FuLDfF8MJcfzOepA] [info] "WEnvironment: UserAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:146.0) Gecko/20100101 Firefox/146.0"
[2026-Feb-09 12:54:40.979] 23192 - [access] "wthttp: 127.0.0.1 GET / HTTP/1.1 200 2104"
[2026-Feb-09 12:54:40.979] 23192 - [info] "WebRequest: took 1.002 ms"
[2026-Feb-09 12:54:41.054] 23192 - [access] "wthttp: 127.0.0.1 GET /?&wtd=FuLDfF8MJcfzOepA HTTP/1.1 200 2103"
[2026-Feb-09 12:54:41.054] 23192 - [info] "WebRequest: took 0.694 ms"
[2026-Feb-09 12:54:41.069] 23192 - [access] "wthttp: 127.0.0.1 GET /?wtd=FuLDfF8MJcfzOepA&request=style&page=1 HTTP/1.1 200 0"
[2026-Feb-09 12:54:41.069] 23192 - [info] "WebRequest: took 70.915 ms"
[2026-Feb-09 12:54:41.082] 23192 [/ FuLDfF8MJcfzOepA] [warning] "WApplication: WApplication::addMetaHeader() with no effect"
[2026-Feb-09 12:54:41.082] 23192 - [access] "wthttp: 127.0.0.1 GET /?wtd=FuLDfF8MJcfzOepA&request=style&page=2 HTTP/1.1 200 93"
[2026-Feb-09 12:54:41.082] 23192 - [info] "WebRequest: took 13.497 ms"
[2026-Feb-09 12:54:41.084] 23192 - [access] "wthttp: 127.0.0.1 GET /?wtd=FuLDfF8MJcfzOepA&sid=4274171398&webGL=true&scrW=2560&scrH=1440&tz=60&tzS=Europe%2FBerlin&htmlHistory=true&deployPath=%2F&request=script&rand=1140243152 HTTP/1.1 200 18839"
[2026-Feb-09 12:54:41.084] 23192 - [info] "WebRequest: took 2.787 ms"
[2026-Feb-09 12:54:42.840] 23192 - [access] "wthttp: 127.0.0.1 POST /?wtd=FuLDfF8MJcfzOepA HTTP/1.1 200 247"
[2026-Feb-09 12:54:42.840] 23192 - [info] "WebRequest: took 1.128 ms"
[2026-Feb-09 12:54:42.843] 23192 [/ FuLDfF8MJcfzOepA] [error] "WApplication: JavaScript error: {""client_url"":""http://127.0.0.1:8080/?&wtd=FuLDfF8MJcfzOepA"",""exception_description"":""can't access property \""resizeItem\"", Wt4_12_2.$(...).layout is undefined"",""exception_js"":""Wt._p_.response(4274171400);var j6=Wt4_12_2.$('o1mo951i');\nWt4_12_2.$('o1mo951i').layout.resizeItem(o1mo952c,\""auto\"",\""auto\"",);\nWt4_12_2.$('o1mo951i').layout.resizeItem(o1mo952c,\""auto\"",\""auto\"",);\nWt4_12_2.$('o1mo951i').layout.resizeItem(o1mo952c,\""auto\"",\""auto\"",);\nWt4_12_2.$('o1mo951i').layout.resizeItem(o1mo952c,\""auto\"",\""auto\"",);\nWt4_12_2.$('o1mo951i').layout.resizeItem(o1mo952c,\""auto\"",\""auto\"",);\nWt4_12_2.$('o1mo951i').layout.resizeItem(o1mo952c,\""auto\"",\""auto\"",);\nWt4_12_2.$('o1mo951i').layout.resizeItem(o1mo952c,\""auto\"",\""auto\"",);\n\nWt4_12_2.show('o1mo951i', 'flex');\nWt4_12_2.$('o1mo952c').classList.add('disabled');\nWt4_12_2.$('o1mo952d').classList.add('disabled');\nvar j7=Wt4_12_2.$('o1mo952h');\nj7.style.display='flex';\nWt4_12_2.$('o1mo952h').classList.add('disabled');\n\nvar j8=Wt4_12_2.$('o1mo952h');\nWt4_12_2.$('o1mo952h').layout.resizeItem(o1mo952k,\""auto\"",\""auto\"",);\nWt4_12_2.$('o1mo952h').layout.resizeItem(o1mo952m,\""auto\"",\""auto\"",);\nWt4_12_2.$('o1mo952h').layout.adjust();\n\nvar j9=Wt4_12_2.$('o1mo952k');\nj9.disabled=true;\nWt4_12_2.$('o1mo952k').classList.add('disabled');\n\nWt4_12_2.$('o1mo952m').classList.add('disabled');\n"",""stack"":""@http://127.0.0.1:8080/?&wtd=FuLDfF8MJcfzOepA line 17 > injectedScript line 18 > eval:18:10\n@http://127.0.0.1:8080/?&wtd=FuLDfF8MJcfzOepA line 17 > injectedScript line 18 > eval:27:3\ndoJavaScript@http://127.0.0.1:8080/?&wtd=FuLDfF8MJcfzOepA line 17 > injectedScript:18:26922\nhandleResponse@http://127.0.0.1:8080/?&wtd=FuLDfF8MJcfzOepA line 17 > injectedScript:18:27478\nf@http://127.0.0.1:8080/?&wtd=FuLDfF8MJcfzOepA line 17 > injectedScript:9:1671\np@http://127.0.0.1:8080/?&wtd=FuLDfF8MJcfzOepA line 17 > injectedScript:9:1838\nwindow.Wt4_12_2</this.initAjaxComm/</s/c.onreadystatechange@http://127.0.0.1:8080/?&wtd=FuLDfF8MJcfzOepA line 17 > injectedScript:9:2253\n""}"
[2026-Feb-09 12:54:42.844] 23192 - [info] "WebController: Removing session FuLDfF8MJcfzOepA"
[2026-Feb-09 12:54:42.844] 23192 [/ FuLDfF8MJcfzOepA] [info] "Wt: session destroyed (#sessions = 0)"
[2026-Feb-09 12:54:42.844] 23192 - [access] "wthttp: 127.0.0.1 POST /?wtd=FuLDfF8MJcfzOepA HTTP/1.1 200 126"
[2026-Feb-09 12:54:42.844] 23192 - [info] "WebRequest: took 0.499 ms"
Updated by Romain Mardulyn 15 days ago
- Status changed from New to InProgress
- Assignee set to Romain Mardulyn
Updated by Romain Mardulyn 15 days ago
- Status changed from InProgress to Review
- Assignee deleted (
Romain Mardulyn) - Target version set to 4.12.4
Updated by Romain Mardulyn 2 days ago
- Target version changed from 4.12.4 to 4.12.6