poorejc commented on issue #50: URL: https://github.com/apache/incubator-flagon-useralejs/issues/50#issuecomment-801293796
I have pushed the code that does work (commenting out the original code). However, it creates 2 other issues (at least): -breaks submit events. Submit events trigger a refresh. We use sendLogs (sendOnRefresh) to push those logs immediately when the event is detected. However, during the refresh cycle, the page enters into a hidden state. Result is we sometimes get duplicate logs (we're firing the logs off x2), but easy fix (remove sendOnRefresh) and keep testing. -breaks our logging server whenever page refreshes or navigate away or close--eg anytime sendOnClose would ship. Can see logs in ELK. Don't know why this happens. TypeError: req.body.forEach is not a function at /Users/jpoore/Documents/Apache_Flagon/test/incubator-flagon-useralejs/example/server.js:77:12 at Layer.handle [as handle_request] (/Users/jpoore/Documents/Apache_Flagon/test/incubator-flagon-useralejs/node_modules/express/lib/router/layer.js:95:5) at next (/Users/jpoore/Documents/Apache_Flagon/test/incubator-flagon-useralejs/node_modules/express/lib/router/route.js:137:13) at Route.dispatch (/Users/jpoore/Documents/Apache_Flagon/test/incubator-flagon-useralejs/node_modules/express/lib/router/route.js:112:3) at Layer.handle [as handle_request] (/Users/jpoore/Documents/Apache_Flagon/test/incubator-flagon-useralejs/node_modules/express/lib/router/layer.js:95:5) at /Users/jpoore/Documents/Apache_Flagon/test/incubator-flagon-useralejs/node_modules/express/lib/router/index.js:281:22 at Function.process_params (/Users/jpoore/Documents/Apache_Flagon/test/incubator-flagon-useralejs/node_modules/express/lib/router/index.js:335:12) at next (/Users/jpoore/Documents/Apache_Flagon/test/incubator-flagon-useralejs/node_modules/express/lib/router/index.js:275:10) at jsonParser (/Users/jpoore/Documents/Apache_Flagon/test/incubator-flagon-useralejs/node_modules/body-parser/lib/types/json.js:119:7) at Layer.handle [as handle_request] (/Users/jpoore/Documents/Apache_Flagon/test/incubator-flagon-useralejs/node_modules/express/lib/router/layer.js:95:5) Also, breaks 2 unit tests (expected -- will eventually need be fixed): sendLogs ✓ sends logs on an interval ✓ does not send logs if the config is off 1) sends logs on page exit with navigator 2) sends logs on page exit without navigator ✓ does not send logs on page exit if config is off ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org