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]-[600]:RichTextEditor not loading at start #11624

Closed
1 task done
lublak opened this issue Mar 4, 2022 · 24 comments · Fixed by #12726
Closed
1 task done

[Bug]-[600]:RichTextEditor not loading at start #11624

lublak opened this issue Mar 4, 2022 · 24 comments · Fixed by #12726
Assignees
Labels
App Viewers Pod This label assigns issues to the app viewers pod Bug Something isn't working Community Reported issues reported by community members Firefox High This issue blocks a user from building or impacts a lot of users Rich Text Editor Widget safari Bugs seen on safari browser Verified When issue is retested post its fixed

Comments

@lublak
Copy link

lublak commented Mar 4, 2022

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

Currently i have a RichTextEditor.
The "default text" is filled by a database.
In widget edit mode (where you can place the appsmith widgets) it works fine.
Now I deploy the app and open it it does not work. The editor remains empty.
If I change the page in the same app via the navigation bar of Appsmith and change back again it works.
It can be a disaster if the editor is empty and when changing the data then the current data is completely deleted from the database (onChange).

Steps To Reproduce

  1. Place a RichTextEditor Widget
  2. Use a database query (postgres) {{RichTextData.data[0].data}} (SELECT data FROM RichTextData;)
  3. Deploy
  4. Open the deployed app

Environment

Release

Version

Self-Hosted

@lublak lublak added Bug Something isn't working Needs Triaging Needs attention from maintainers to triage labels Mar 4, 2022
@Nikhil-Nandagopal
Copy link
Contributor

@lublak it seems to be working for me. Can you share an app that reproduces this issue?

@Nikhil-Nandagopal Nikhil-Nandagopal added the Cannot Reproduce Issue Issues that cannot be reproduced label Mar 4, 2022
@lublak
Copy link
Author

lublak commented Mar 4, 2022

@Nikhil-Nandagopal yes i can. (But i removed the password from the datasource)
IntranetMenu.zip

@lublak
Copy link
Author

lublak commented Mar 4, 2022

{{MenuData.data[0].data}} is undefined for the first start.
I added just replaced it with {{MenuData.data[0].data}}test so a i can see in deployed editor: undefined

@Nikhil-Nandagopal
Copy link
Contributor

Nikhil-Nandagopal commented Mar 7, 2022

@lublak can you reproduce this with our users db? I tried replacing your query with fetch users and was able to get it to work

@lublak
Copy link
Author

lublak commented Mar 7, 2022

I found the issue @Nikhil-Nandagopal
The iis reverse proxy has blocked the websocket connection.

Interesting then only that appsmith itself continues to run. It would be more practical to lock the entire app in case of a failed connection in order to avoid erroneous data in case of a faulty connection.

@lublak
Copy link
Author

lublak commented Mar 7, 2022

But after releasing the websocket there is another problem.
What is also problematic here is the delay.
The user can already enter data. The data arrives delayed and is then inserted in the editor.
And sometimes it doesn't load at all.
So relatively unstable.
Example F5: Works mostly fine, sometimes a littlebit delayed
Example CRTL+F5: Increased: No loading of data. Or rather rarely delayed.

@Nikhil-Nandagopal
Copy link
Contributor

@lublak what you can do here is disable the RTE if the Query is in a loading state to prevent user inputs till the query returns

@lublak
Copy link
Author

lublak commented Mar 7, 2022

@Nikhil-Nandagopal just for a info i can reproduce the issue of non loading data also at your app.appsmith site:
https://app.appsmith.com/applications/6225c53e45ea27345b4970f2/pages/6225c53e45ea27345b4970f5
Ctrl+F5 breaks the application.

@lublak
Copy link
Author

lublak commented Mar 7, 2022

disable the RTE

The thing about protecting because of the delay is a good thing. But unfortunately does not fix the problem that sometimes it is not loaded at all
Tested with: Firefox Edge (Edge you only need F5 to break the application, switching pages works)

@lublak
Copy link
Author

lublak commented Mar 7, 2022

@Nikhil-Nandagopal
Just a small thought, maybe sometimes the editor was not initialized yet. Possibly by the browser cache it is sometimes initialized faster before the data are there.
The data is sometimes faster and sometimes slower.

editor.on('init', function (e) {
  editor.setContent(content);
});

Alternatively, the html can be set directly in the textarea before the editor is created:
https://www.tiny.cloud/docs/demo/basic-example/

@Nikhil-Nandagopal Nikhil-Nandagopal added High This issue blocks a user from building or impacts a lot of users Rich Text Editor Widget and removed Cannot Reproduce Issue Issues that cannot be reproduced Needs Triaging Needs attention from maintainers to triage labels Mar 7, 2022
@github-actions github-actions bot added App Viewers Pod This label assigns issues to the app viewers pod UI Building Pod labels Mar 7, 2022
@Nikhil-Nandagopal
Copy link
Contributor

@lublak we're now able to reproduce the issue.
You need to open this on Safari and you will be able to see it. To reproduce it, we need to kill the safari desktop app and re-open it

@dilippitchika
Copy link
Contributor

Adding an app where this can be reproduced, please check the app in safari
RTEissue.json.zip

@dilippitchika
Copy link
Contributor

@lublak can you check and let us know if this is happening?

@lublak
Copy link
Author

lublak commented Mar 17, 2022

@dilippitchika For me the error still occurs: https://app.appsmith.com/applications/6225c53e45ea27345b4970f2/pages/6225c53e45ea27345b4970f5

What I notice is that undo is not set when it remains empty and undo is set when the content is successfully loaded.

HxEyUw47IE

I have the feeling that setContent is not called. Unfortunately I don't know how cypress is called (setTinyMceContent).

https://github.com/appsmithorg/appsmith/blob/release/app/client/cypress/support/commands.js#L2907

@Nikhil-Nandagopal
Copy link
Contributor

I can reproduce this on prod as well

@dilippitchika
Copy link
Contributor

@vivekverma2312 need some help here, we are able to reproduce this in safari in macbooks but the user reported that this is happening in firefox in a different OS.

Can we ask someone to check this across browsers and OS and help us with a report before we start triaging this?

@vivekverma2312
Copy link

@Tooluloope Able to repro the issue on Windows (Chrome & Firefox)
The data is not populating on RTE after deployment. If we change the page in view mode then the data starts populating.
https://loom.com/share/50bcab3eacc84aefb7711d3621ca6dbc

@dilippitchika
Copy link
Contributor

@vivekverma2312 is this happening anywhere else in mac? Or we only checked windows?

@somangshu whom can we assign this to? I believe this is clearly reproducible in windows machines.

@somangshu
Copy link
Contributor

This is happening on windows and as said above and also on safari on mac. @techbhavin please triage to identify the problem here

@dilippitchika
Copy link
Contributor

dilippitchika commented Apr 5, 2022

Stats

Stat Values
Reach 150
Effort (months) 0.5

@Nikhil-Nandagopal Nikhil-Nandagopal changed the title [Bug]: RichTextEditor not loading at start [Bug]-[600]:RichTextEditor not loading at start Apr 6, 2022
@dilippitchika
Copy link
Contributor

Above estimate is just to rank better, not a real estimate yet

@close-label close-label bot added the QA Needs QA attention label Apr 25, 2022
@chandannkumar chandannkumar added Verified When issue is retested post its fixed and removed QA Needs QA attention labels Apr 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
App Viewers Pod This label assigns issues to the app viewers pod Bug Something isn't working Community Reported issues reported by community members Firefox High This issue blocks a user from building or impacts a lot of users Rich Text Editor Widget safari Bugs seen on safari browser Verified When issue is retested post its fixed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

9 participants