aio-cli
aio-cli copied to clipboard
Intermittent CORS Error when Localhost Extra Logging Enabled
Expected Behaviour
No CORS error(s) would occur when using the app using aio app run
Actual Behaviour
Intermittent CORS error(s) occur when using aio app run, particularly if our app generates multiple requests in a short amount of time.
The issue can be locally remediated by disabling the extra logging code (below) in firefly\hexagon\src\dx-excshell-1\web-src\src\utils.js:
/*if (window.location.hostname === 'localhost') { actionHeaders['x-ow-extra-logging'] = 'on' }*/
However, disabling this logging can prove problematic for a couple of reasons:
- Disabling it will sometimes cause the latest runtime actions to revert to an version that is ~4-5 versions older than the current version.
- Depending on how our logging is configured in actions - we lose visibility into our action console/log calls themselves.
Reproduce Scenario (including but not limited to)
See steps below. I'm also happy to demo it with our app, if necessary.
Steps to Reproduce
- Disable the extra logging headers in utils.js as described above.
- Load any app builder app, and try to exceed the logging limit threshold by firing off several action requests in quick succession. Again, the issue is intermittent - but once it does start occurring it typically continues until you restart the app.
Environment Info
System:
OS: Windows 10 10.0.19042
CPU: (8) x64 Intel(R) Core(TM) i7-1065G7 CPU @ 1.30GHz
Memory: 3.76 GB / 15.60 GB
Binaries:
Node: 14.16.1 - C:\Program Files\nodejs\node.EXE
Yarn: 1.22.10 - ~\AppData\Roaming\npm\yarn.CMD
npm: 7.10.0 - C:\Program Files\nodejs\npm.CMD
Virtualization:
Docker: 20.10.6 - C:\Program Files\Docker\Docker\resources\bin\docker.EXE
npmGlobalPackages:
@adobe/aio-cli: Not Found
Sample Code that illustrates the problem
I can demonstrate it occurring in our app, if necessary.
Logs taken while reproducing problem
Unable to retrieve logs when the logging is disabled.