appsmith: [Bug] expected expression, got '<'
Sentry Issue: APPSMITH-G5
UnhandledRejection: Non-Error promise rejection captured with keys: code, message, show
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 17 (12 by maintainers)
@hiteshjoshi @arunvjn Yes, this happens when the browser requests
.js
and we get an HTML response.How does this happen?
nginx automatically serves index.html or a 404.html, when the resource requested isn’t available.
Which scenario do I think causes this?
Say, we are trying to fetch
asset.somehash.js
(mentioned in the deployment1’s index.html) which has for some reason eitherprecacheAndRoute
(similar to the cache first) strategy and there is a cache miss, orIn this while, there is a deployment2 which has happened, resulting in the actual asset being
asset.somenewHash.js
whileasset.somehash.js
no longer being available on the servers. Nginx now returns the contents of index.html or some 404.html file in response. The browser fails to parse this as JS and we see the error.I suspect the cause is 4.
After some debugging, we noticed that #8324 was not kicking in because the right events were not getting triggered when the user comes back to a tab after some time @sharat87 @riodeuno and I have come to the decision that adding another event on our RTS server and client to check for user tab visibility will solve this problem by showing the “New version available” toast to the user at the correct time
Seems to still be present