Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] expected expression, got '<' #9740

Closed
sentry-io bot opened this issue Dec 13, 2021 · 17 comments · Fixed by #16153, #17168 or #27519
Closed

[Bug] expected expression, got '<' #9740

sentry-io bot opened this issue Dec 13, 2021 · 17 comments · Fixed by #16153, #17168 or #27519
Assignees
Labels
Bug Something isn't working Critical This issue needs immediate attention. Drop everything else IDE Pod Issues that new developers face while exploring the IDE IDE Product Issues related to the IDE Product QA Needs QA attention QAVerificationBlocked Bug cannot be verified.

Comments

@sentry-io
Copy link

sentry-io bot commented Dec 13, 2021

Sentry Issue: APPSMITH-G5

UnhandledRejection: Non-Error promise rejection captured with keys: code, message, show
@Nikhil-Nandagopal Nikhil-Nandagopal added Bug Something isn't working Critical This issue needs immediate attention. Drop everything else IDE Product Issues related to the IDE Product labels Dec 13, 2021
@github-actions github-actions bot added IDE Pod Issues that new developers face while exploring the IDE Platform Pod labels Dec 13, 2021
@Nikhil-Nandagopal
Copy link
Contributor

This is a really bad experience @mohanarpit @riodeuno @hetunandu
We kept thinking it was a safe error but if you see the smartlook, the user sees a blank screen and is just confused about what to do
https://app.smartlook.com/org/9b6c5c859e85745d01196fa4/project/e373e3a21d27278fd281d8b0/recordings?playSession=Ggs8t-d9Ph&playVisitor=pCLpcXMMxp

@github-actions
Copy link

This issue has not seen activity for a while. It will be closed in 7 days unless further activity is detected.

@github-actions github-actions bot added the Stale label Dec 20, 2021
@Nikhil-Nandagopal Nikhil-Nandagopal added Good First Issue Good for newcomers Critical This issue needs immediate attention. Drop everything else Test and removed Critical This issue needs immediate attention. Drop everything else Good First Issue Good for newcomers Test labels Dec 23, 2021
@github-actions
Copy link

This issue has not seen activity for a while. It will be closed in 7 days unless further activity is detected.

@riodeuno
Copy link
Contributor

@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 either

  1. expired in the service workers cache,
  2. the service worker is using the precacheAndRoute (similar to the cache first) strategy and there is a cache miss, or
  3. it was never cached so far and is freshly being requested from the servers or
    4. service worker registration has failed and it falls back to network only.

In this while, there is a deployment2 which has happened, resulting in the actual asset being asset.somenewHash.js while asset.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.

@hiteshjoshi
Copy link

@sharat87, the current finding suggests that this happens when the server is down and js files are not being served at all.

@sharat87
Copy link
Member

sharat87 commented Aug 4, 2022

@riodeuno, thanks for the detailed write-up. So, if the service worker got a 404 response from the server, instead of the HTML, will it realize its mistake and update the JS filename? With the new hash? If yes, I can get NGINX to return 404 here, without affecting the rest of the functionality.

Edit, for completeness, if the answer to the above question is yes, the we'll add the below block to our NGINX configuration and this issue will be resolved.

  location ~ \.js$ {
    try_files \$uri =404;
  }

@hetunandu
Copy link
Member

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

@hetunandu
Copy link
Member

@ramsaptami ramsaptami added the QAVerificationBlocked Bug cannot be verified. label Sep 5, 2022
@kocharrahul7
Copy link
Contributor

Seems to still be present

@kocharrahul7 kocharrahul7 reopened this Sep 21, 2022
@hetunandu hetunandu removed QA Needs QA attention QAVerificationBlocked Bug cannot be verified. labels Sep 30, 2022
@close-label close-label bot added the QA Needs QA attention label Sep 30, 2022
@Richarex Richarex added QAVerificationBlocked Bug cannot be verified. and removed QA Needs QA attention labels Oct 7, 2022
@rohan-arthur rohan-arthur reopened this May 24, 2023
@hetunandu
Copy link
Member

New sentry errors are unrelated to this issue

@ohansFavour
Copy link
Contributor

The new sentry errors will be fixed in #27519

@appsmith-bot appsmith-bot added the QA Needs QA attention label Sep 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working Critical This issue needs immediate attention. Drop everything else IDE Pod Issues that new developers face while exploring the IDE IDE Product Issues related to the IDE Product QA Needs QA attention QAVerificationBlocked Bug cannot be verified.
Projects
Status: No status