Article - CS339610
ThingWorx Flow login page fails to load with "502 Bad Gateway" or "504 Gateway Timeout" error after installation
Modified: 09-Feb-2026
Applies To
- ThingWorx Platform 9.1 to 9.5
- Nginx
Description
- Failed to access ThingWorx Flow home page
- ThingWorx Flow modules are online but login attempts return
502 Bad Gateway nginx - Using F12/Developer Tools in the Web Browser shows that the currentUser API call returns below error:
Failed to load resource: the server responded with a status of 504 (Gateway Timeout) - HTTP 504 Gateway Timeout
- Login window does not pop up
- ThingWorx Flow is not accessible when using self-signed certificate
- Using F12/Developer Tools in the Web Browser shows fetchconfig returns status 502
504 Gateway timeoutappears when trying to access the login page- trigger_error-xxxx.log contains below errors:
{"module":"flow-trigger","timestamp":"YYYY-MM-DDThh:mm:ss.965Z","level":"error","message":"Error deleting from message table"} {"module":"flow-trigger","timestamp":"YYYY-MM-DDThh:mm:ss.965Z","level":"error","message":"Login failed for user '<user_name>'."} {"module":"flow-trigger","timestamp":"YYYY-MM-DDThh:mm:ss.965Z","level":"error","message":"Error: Login failed for user '<user_name>'. at Login7TokenHandler.onErrorMessage (D:\\ThingWorxFlow\\modules\\trigger\\node_modules\\tedious\\lib\\token\\handler.js:239:19) at Readable.<anonymous> (D:\\ThingWorxFlow\\modules\\trigger\\node_modules\\tedious\\lib\\token\\token-stream-parser.js:26:33) at Readable.emit (events.js:315:20) at addChunk (internal/streams/readable.js:309:12) at readableAddChunk (internal/streams/readable.js:284:9) at Readable.push (internal/streams/readable.js:223:10) at next (internal/streams/from.js:88:29) at runMicrotasks (<anonymous>) at processTicksAndRejections (internal/process/task_queues.js:93:5)"} {"module":"flow-trigger","timestamp":"YYYY-MM-DDThh:mm:ss.966Z","level":"error","message":"Error updating subscriptions"} {"module":"flow-trigger","timestamp":"YYYY-MM-DDThh:mm:ss.966Z","level":"error","message":"Login failed for user '<user_name>'."} {"module":"flow-trigger","timestamp":"YYYY-MM-DDThh:mm:ss.966Z","level":"error","message":"Error: Login failed for user '<user_name>'. at Login7TokenHandler.onErrorMessage (D:\\ThingWorxFlow\\modules\\trigger\\node_modules\\tedious\\lib\\token\\handler.js:239:19) at Readable.<anonymous> (D:\\ThingWorxFlow\\modules\\trigger\\node_modules\\tedious\\lib\\token\\token-stream-parser.js:26:33) at Readable.emit (events.js:315:20) at addChunk (internal/streams/readable.js:309:12) at readableAddChunk (internal/streams/readable.js:284:9) at Readable.push (internal/streams/readable.js:223:10) at next (internal/streams/from.js:88:29) at runMicrotasks (<anonymous>) at processTicksAndRejections (internal/process/task_queues.js:93:5)"} - Can access ThingWorx Flow via Flow's hostname and URL, but fail to access it from ThingWorx Composer URL at ThingWorx Composer > Flow > Connector with below error:
This is a printer-friendly version of Article 339610 and may be out of date. For the latest version click CS339610