[GH-ISSUE #562] Display goes blank and and an error is recorded when clicking on certain notes. #281

Closed
opened 2026-03-03 00:19:54 +03:00 by kerem · 6 comments
Owner

Originally created by @Kompiler on GitHub (Jul 26, 2020).
Original GitHub issue: https://github.com/BoostIO/BoostNote-App/issues/562

Current behavior

Just upgraded to 0.8.0 and clicking on certain notes causes the entire application to go blank when in preview or render mode.

When the application goes blank, the following errors are recorded in developer tools:

TypeError: Cannot read property 'includes' of undefined
at Zn (CodeFence.tsx:41)
at Yo (react-dom.production.min.js:153)
at gs (react-dom.production.min.js:261)
at cl (react-dom.production.min.js:246)
at sl (react-dom.production.min.js:246)
at Zs (react-dom.production.min.js:239)
at react-dom.production.min.js:123
at t.unstable_runWithPriority (scheduler.production.min.js:19)
at qi (react-dom.production.min.js:122)
at Wi (react-dom.production.min.js:123)

es @ react-dom.production.min.js:209
n.callback @ react-dom.production.min.js:226
fo @ react-dom.production.min.js:131
os @ react-dom.production.min.js:212
hl @ react-dom.production.min.js:255
t.unstable_runWithPriority @ scheduler.production.min.js:19
qi @ react-dom.production.min.js:122
fl @ react-dom.production.min.js:248
Zs @ react-dom.production.min.js:239
(anonymous) @ react-dom.production.min.js:123
t.unstable_runWithPriority @ scheduler.production.min.js:19
qi @ react-dom.production.min.js:122
Wi @ react-dom.production.min.js:123
Vi @ react-dom.production.min.js:122
Ys @ react-dom.production.min.js:230
ma @ react-dom.production.min.js:163
(anonymous) @ MarkdownPreviewer.tsx:249
async function (async)
(anonymous) @ MarkdownPreviewer.tsx:245
(anonymous) @ MarkdownPreviewer.tsx:271
is @ react-dom.production.min.js:211
gl @ react-dom.production.min.js:257
t.unstable_runWithPriority @ scheduler.production.min.js:19
qi @ react-dom.production.min.js:122
ml @ react-dom.production.min.js:257
(anonymous) @ react-dom.production.min.js:256
z @ scheduler.production.min.js:17
k.port1.onmessage @ scheduler.production.min.js:14

and

Uncaught (in promise) TypeError: Cannot read property 'includes' of undefined
at Zn (CodeFence.tsx:41)
at Yo (react-dom.production.min.js:153)
at gs (react-dom.production.min.js:261)
at cl (react-dom.production.min.js:246)
at sl (react-dom.production.min.js:246)
at Zs (react-dom.production.min.js:239)
at react-dom.production.min.js:123
at t.unstable_runWithPriority (scheduler.production.min.js:19)
at qi (react-dom.production.min.js:122)
at Wi (react-dom.production.min.js:123)

Zn @ CodeFence.tsx:41
Yo @ react-dom.production.min.js:153
gs @ react-dom.production.min.js:261
cl @ react-dom.production.min.js:246
sl @ react-dom.production.min.js:246
Zs @ react-dom.production.min.js:239
(anonymous) @ react-dom.production.min.js:123
t.unstable_runWithPriority @ scheduler.production.min.js:19
qi @ react-dom.production.min.js:122
Wi @ react-dom.production.min.js:123
Vi @ react-dom.production.min.js:122
Ys @ react-dom.production.min.js:230
ma @ react-dom.production.min.js:163
(anonymous) @ MarkdownPreviewer.tsx:249
async function (async)
(anonymous) @ MarkdownPreviewer.tsx:245
(anonymous) @ MarkdownPreviewer.tsx:271
is @ react-dom.production.min.js:211
gl @ react-dom.production.min.js:257
t.unstable_runWithPriority @ scheduler.production.min.js:19
qi @ react-dom.production.min.js:122
ml @ react-dom.production.min.js:257
(anonymous) @ react-dom.production.min.js:256
z @ scheduler.production.min.js:17
k.port1.onmessage @ scheduler.production.min.js:14

This is repeatable 100% of the time for these notes.

Note* When viewing in editor/markdown only mode (the <> icon view), these notes work as expected. When viewing with preview or render mode (the 3 horizontal lines followed by a block icon and 3 horizontal lines only icon) the problem occurs.

Expected behavior

Prior to 0.8.0, clicking on any note in preview/render mode, the rendered html would appear as expected.

Steps to reproduce

Unfortunately my BoostNote is now defaulting to a problematic note and I cannot view anything in it any more. As such, I cannot diagnose the exact cause of the problem but I do know that the following cheat sheet causes the problem.

Any tips on switching my default view back to code would be appreciated :)

  1. Copy the RAW version of the cheat sheet from https://github.com/TobseF/boostnote-markdown-cheatsheet
  2. Create a new note and paste the markup.
  3. View the note in preview or render mode.

Environment

  • Boost Note.next version: 0.8.0
  • OS version and name: Windows Server 2016 Standard
Originally created by @Kompiler on GitHub (Jul 26, 2020). Original GitHub issue: https://github.com/BoostIO/BoostNote-App/issues/562 # Current behavior Just upgraded to 0.8.0 and clicking on certain notes causes the entire application to go blank when in preview or render mode. When the application goes blank, the following errors are recorded in developer tools: ``` TypeError: Cannot read property 'includes' of undefined at Zn (CodeFence.tsx:41) at Yo (react-dom.production.min.js:153) at gs (react-dom.production.min.js:261) at cl (react-dom.production.min.js:246) at sl (react-dom.production.min.js:246) at Zs (react-dom.production.min.js:239) at react-dom.production.min.js:123 at t.unstable_runWithPriority (scheduler.production.min.js:19) at qi (react-dom.production.min.js:122) at Wi (react-dom.production.min.js:123) es @ react-dom.production.min.js:209 n.callback @ react-dom.production.min.js:226 fo @ react-dom.production.min.js:131 os @ react-dom.production.min.js:212 hl @ react-dom.production.min.js:255 t.unstable_runWithPriority @ scheduler.production.min.js:19 qi @ react-dom.production.min.js:122 fl @ react-dom.production.min.js:248 Zs @ react-dom.production.min.js:239 (anonymous) @ react-dom.production.min.js:123 t.unstable_runWithPriority @ scheduler.production.min.js:19 qi @ react-dom.production.min.js:122 Wi @ react-dom.production.min.js:123 Vi @ react-dom.production.min.js:122 Ys @ react-dom.production.min.js:230 ma @ react-dom.production.min.js:163 (anonymous) @ MarkdownPreviewer.tsx:249 async function (async) (anonymous) @ MarkdownPreviewer.tsx:245 (anonymous) @ MarkdownPreviewer.tsx:271 is @ react-dom.production.min.js:211 gl @ react-dom.production.min.js:257 t.unstable_runWithPriority @ scheduler.production.min.js:19 qi @ react-dom.production.min.js:122 ml @ react-dom.production.min.js:257 (anonymous) @ react-dom.production.min.js:256 z @ scheduler.production.min.js:17 k.port1.onmessage @ scheduler.production.min.js:14 ``` and ``` Uncaught (in promise) TypeError: Cannot read property 'includes' of undefined at Zn (CodeFence.tsx:41) at Yo (react-dom.production.min.js:153) at gs (react-dom.production.min.js:261) at cl (react-dom.production.min.js:246) at sl (react-dom.production.min.js:246) at Zs (react-dom.production.min.js:239) at react-dom.production.min.js:123 at t.unstable_runWithPriority (scheduler.production.min.js:19) at qi (react-dom.production.min.js:122) at Wi (react-dom.production.min.js:123) Zn @ CodeFence.tsx:41 Yo @ react-dom.production.min.js:153 gs @ react-dom.production.min.js:261 cl @ react-dom.production.min.js:246 sl @ react-dom.production.min.js:246 Zs @ react-dom.production.min.js:239 (anonymous) @ react-dom.production.min.js:123 t.unstable_runWithPriority @ scheduler.production.min.js:19 qi @ react-dom.production.min.js:122 Wi @ react-dom.production.min.js:123 Vi @ react-dom.production.min.js:122 Ys @ react-dom.production.min.js:230 ma @ react-dom.production.min.js:163 (anonymous) @ MarkdownPreviewer.tsx:249 async function (async) (anonymous) @ MarkdownPreviewer.tsx:245 (anonymous) @ MarkdownPreviewer.tsx:271 is @ react-dom.production.min.js:211 gl @ react-dom.production.min.js:257 t.unstable_runWithPriority @ scheduler.production.min.js:19 qi @ react-dom.production.min.js:122 ml @ react-dom.production.min.js:257 (anonymous) @ react-dom.production.min.js:256 z @ scheduler.production.min.js:17 k.port1.onmessage @ scheduler.production.min.js:14 ``` This is repeatable 100% of the time for these notes. **Note*** When viewing in *editor/markdown* only mode (the <> icon view), these notes work as expected. When viewing with preview or render mode (the 3 horizontal lines followed by a block icon and 3 horizontal lines only icon) the problem occurs. # Expected behavior Prior to 0.8.0, clicking on any note in preview/render mode, the rendered html would appear as expected. # Steps to reproduce Unfortunately my BoostNote is now defaulting to a problematic note and I cannot view anything in it any more. As such, I cannot diagnose the exact cause of the problem but I do know that the following cheat sheet causes the problem. Any tips on switching my default view back to code would be appreciated :) 1. Copy the RAW version of the cheat sheet from [https://github.com/TobseF/boostnote-markdown-cheatsheet](https://github.com/TobseF/boostnote-markdown-cheatsheet) 2. Create a new note and paste the markup. 3. View the note in preview or render mode. # Environment - Boost Note.next version: 0.8.0 - OS version and name: Windows Server 2016 Standard
kerem 2026-03-03 00:19:54 +03:00
  • closed this issue
  • added the
    bug 🐛
    label
Author
Owner

@TimeBomb commented on GitHub (Jul 26, 2020):

I'm also seeing this, opening dev tools and debugging makes it apparent that the problematic line of code is

const CodeFence = (props: React.HTMLProps<HTMLPreElement>) => {
  if (props.className!.includes('CodeMirror')) { // this line is erroring
    const otherProps = { ...props }

props looks like {children: [""]}.

For what it's worth, I also appear unable to use the app entirely due to this error.

The problematic note contains only three backticks, i.e. the start of a codeblock, but not the end. The note title is "Hey".

<!-- gh-comment-id:664056973 --> @TimeBomb commented on GitHub (Jul 26, 2020): I'm also seeing this, opening dev tools and debugging makes it apparent that the problematic line of code is ``` const CodeFence = (props: React.HTMLProps<HTMLPreElement>) => { if (props.className!.includes('CodeMirror')) { // this line is erroring const otherProps = { ...props } ``` `props` looks like `{children: [""]}`. For what it's worth, I also appear unable to use the app entirely due to this error. The problematic note contains only three backticks, i.e. the start of a codeblock, but not the end. The note title is "Hey".
Author
Owner

@yupengkong commented on GitHub (Jul 27, 2020):

same issue encountered. CANNOT switch back to the code. The whole APP is unable to use. Please give me a tip to fix it. Thanks!

<!-- gh-comment-id:664068955 --> @yupengkong commented on GitHub (Jul 27, 2020): same issue encountered. CANNOT switch back to the code. The whole APP is unable to use. Please give me a tip to fix it. Thanks!
Author
Owner

@Rokt33r commented on GitHub (Jul 27, 2020):

I'll deploy the fix ASAP. Sorry for making the propblem.

<!-- gh-comment-id:664080976 --> @Rokt33r commented on GitHub (Jul 27, 2020): I'll deploy the fix ASAP. Sorry for making the propblem.
Author
Owner

@Rokt33r commented on GitHub (Jul 27, 2020):

The fix will be deployed in 20 mins

<!-- gh-comment-id:664085834 --> @Rokt33r commented on GitHub (Jul 27, 2020): The fix will be deployed in 20 mins
Author
Owner

@Rokt33r commented on GitHub (Jul 27, 2020):

@Kompiler @TimeBomb @yupengkong
Fixed in v0.8.2. Please download it from here https://github.com/BoostIO/BoostNote.next/releases/tag/v0.8.2

<!-- gh-comment-id:664090917 --> @Rokt33r commented on GitHub (Jul 27, 2020): @Kompiler @TimeBomb @yupengkong Fixed in v0.8.2. Please download it from here https://github.com/BoostIO/BoostNote.next/releases/tag/v0.8.2
Author
Owner

@Rokt33r commented on GitHub (Jul 27, 2020):

Sorry for the problem. I'll make sure this kind of errors never happen again.

<!-- gh-comment-id:664091876 --> @Rokt33r commented on GitHub (Jul 27, 2020): Sorry for the problem. I'll make sure this kind of errors never happen again.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/BoostNote-App#281
No description provided.