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

Switching from search to mail viewer produces a silent error #4570

Closed
11 tasks done
charlag opened this issue Sep 12, 2022 · 0 comments · Fixed by #4568
Closed
11 tasks done

Switching from search to mail viewer produces a silent error #4570

charlag opened this issue Sep 12, 2022 · 0 comments · Fixed by #4568
Labels
bug broken functionality, usability problems, unexpected errors state:done meets our definition of done state:tested We tested it and are about to release it
Milestone

Comments

@charlag
Copy link
Contributor

charlag commented Sep 12, 2022

  1. Select any email
  2. Search for anything and go to the search view
  3. Go back to mail view

The line where it happens:

this.loadAllListener.end(true)
this.loadAllListener = this.viewModel.loadCompleteNotification.map(async () => {
// Wait for mail body to be redrawn before replacing images
m.redraw.sync()

mithril.js:1240 TypeError: Node is currently being rendered to and thus is locked.
    at mithril.js:1208:10
    at Function.sync (mithril.js:1239:10)
    at MailViewer.ts:185:14
    at Stream.stream71._map (stream.js:55:50)
    at Stream.stream71.map (stream.js:63:17)
    at MailViewer.setViewModel (MailViewer.ts:183:67)
    at new MailViewer (MailViewer.ts:138:8)
    at initComponent (mithril.js:418:103)
    at createComponent (mithril.js:427:3)
    at createNode (mithril.js:342:8)

mithril.js:1240 TypeError: Cannot read properties of undefined (reading 'view')
    at initComponent (mithril.js:408:25)
    at createComponent (mithril.js:427:3)
    at createNode (mithril.js:342:8)
    at createNodes (mithril.js:326:5)
    at updateNodes (mithril.js:538:45)
    at mithril.js:1221:4
    at sync (mithril.js:1239:10)
    at mithril.js:1249:5

Test notes

  • Search
    • From mail view
    • From contacts view
    • From search
    • Switching between search parameters
    • Opening different items in search
    • From user list
    • From group list
    • On mobile: mail
    • On mobile: contacts
    • On mobile: switching between types
@charlag charlag added the bug broken functionality, usability problems, unexpected errors label Sep 12, 2022
charlag added a commit that referenced this issue Sep 12, 2022
Stream.map() callback would be called immediately during setViewModel()
because of how streams are implemented, and we would try to do
m.redraw.sync() inside of another redraw.

Now we schedule a microtask after the current redraw.

fix #4570
@charlag charlag added the state:done meets our definition of done label Sep 15, 2022
@charlag charlag added this to the 3.100.1 milestone Sep 15, 2022
charlag added a commit that referenced this issue Sep 16, 2022
Stream.map() callback would be called immediately during setViewModel()
because of how streams are implemented, and we would try to do
m.redraw.sync() inside of another redraw.

Now we schedule a microtask after the current redraw.

fix #4570
@vitoreiji vitoreiji self-assigned this Sep 20, 2022
@vitoreiji vitoreiji added the state:tested We tested it and are about to release it label Sep 20, 2022
@vitoreiji vitoreiji removed their assignment Sep 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug broken functionality, usability problems, unexpected errors state:done meets our definition of done state:tested We tested it and are about to release it
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants