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

HTMLView failing to update (occasionally) #520

Open
jgclark opened this issue Jan 27, 2024 · 9 comments
Open

HTMLView failing to update (occasionally) #520

jgclark opened this issue Jan 27, 2024 · 9 comments
Assignees
Labels
API bug Something isn't working P-7 Priority 7

Comments

@jgclark
Copy link
Collaborator

jgclark commented Jan 27, 2024

A few times now I've had an existing HTMLView window failing to update, but without any errors in the np-out or np-error logs.

More detail: I've had either Dashboard or Project List window open. I've hit update on the window, and all my usual debug logging shows the expected work, up to and including the usual messages about finding the existing window and calling await HTMLView.showWindowWithOptions(). This call seems to return a valid object, as I can read the .customID and .id from it.

The copy of the HTML that I additionally persist to disk is fine.

But the HTMLView does not update at all, instead just stays the same.

This feels related to the as-yet-unidentified-cause of the missing requiredFiles file that occasionally drops .css files. (Reported in ⁠Occasional loss of a Required File)

@jgclark jgclark added bug Something isn't working API P-3 Priority 3 (med-low) labels Jan 27, 2024
@jgclark
Copy link
Collaborator Author

jgclark commented Jan 29, 2024

It's happening again, so I've been able to record a short video.

html-win-not-drawing.mp4

Note:

  • date on the dashboard for 'today' is 2 days old.
  • this is after opening laptop in morning. App has updated to use 'light' theme, and the log shows the Dashboard generation picks it up. But the window doesn't update.
  • the end of the log shows that it thinks the HTML window has been written to OK.

The copy of the HTML that is then persisted to disk (at ../../jgclark.Dashboard/dashboard.html) looks as expected like this (rendered in Safari):
dashboard-safari-ok@2x

@jgclark
Copy link
Collaborator Author

jgclark commented Jan 29, 2024

The more I think about it, @EduardMe, the more it seems related to #522 -- perhaps showing there's a more general occasional issue than just with 'requiredFiles'.

@jgclark
Copy link
Collaborator Author

jgclark commented Feb 24, 2024

And another example today @EduardMe. Quite a few times I refreshed the Dashboard, but it insisted on not updating, and instead kept the view from the day before.
Here is more evidence that the issue is in the app not the plugin:

bug-on-dashboard-dates@2x

View from left to right is

  • Dashboard, showing the wrong dates and wrong tasks count
  • plugin console log showing the dates its actually processing
  • copy of the HTML that's saved to disk showing that it has output the correct dates.

I'm raising the priority on this, as it seems to be happening increasingly frequently.

Restarting NP clears the problem, but not just closing the HTMLWindow.

@jgclark jgclark added P-7 Priority 7 and removed P-3 Priority 3 (med-low) labels Feb 24, 2024
@jgclark
Copy link
Collaborator Author

jgclark commented Feb 26, 2024

@ksanderer is finding this as well. I've asked him to post the details he's collected.

@ksanderer
Copy link

ksanderer commented Feb 27, 2024

In the Review plugin folder, dashboard.html is being updated correctly when clicking "Refresh" but it won't re-render in the NotePlan. It looks like some kind of cache at work.

CleanShot 2024-02-27 at 09 03 30@2x

I use CloudKit as a sync engine

image

refresh.log
task_mark_done.log

@EduardMe @jgclark anything I can check to help with debug?

@EduardMe
Copy link
Contributor

EduardMe commented Mar 2, 2024

Interesting, thanks for sharing. Does it re-render when you click again on update or it stays no matter how often you click? Maybe it completely refuses to reload it at some point.

@ksanderer
Copy link

It doesn't reload no matter many times I clicked “Refresh”

@dwertheimer
Copy link
Collaborator

@EduardMe I am seeing this a lot and it's very frustrating. Can you please have a look at how we can fix it?

@EduardMe
Copy link
Contributor

EduardMe commented Mar 8, 2024

Fixed and uploading a beta, please confirm once it's available to close this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API bug Something isn't working P-7 Priority 7
Projects
None yet
Development

No branches or pull requests

4 participants