Skip to content

Fix spurious console log errors (Uncaught SyntaxError: Unexpected token o in JSON at position 1)#34

Merged
chrisglein merged 1 commit into
conorhastings:masterfrom
chrisglein:fixConsoleErrors
Sep 19, 2023
Merged

Fix spurious console log errors (Uncaught SyntaxError: Unexpected token o in JSON at position 1)#34
chrisglein merged 1 commit into
conorhastings:masterfrom
chrisglein:fixConsoleErrors

Conversation

@chrisglein

Copy link
Copy Markdown
Collaborator

On the console you'll see a lot of errors like this:

Uncaught SyntaxError: Unexpected token o in JSON at position 1

The reason for that can be found here:
PrismJS/prism#1303
This PR applies the recommended fix for that thread and also tried with this PR: #32

The fix is to add a prism-config.js that sets
disableWorkerMessageHandler: true

Fixes #12

On the console you'll see a lot of errors like this:
> Uncaught SyntaxError: Unexpected token o in JSON at position 1

The reason for that can be found here:
PrismJS/prism#1303
This PR applies the recommended fix for that thread and also tried with
this PR: conorhastings#32

The fix is to add a prism-config.js that sets
`disableWorkerMessageHandler: true`

Fixes conorhastings#12
@KonstantinZhukovskij

Copy link
Copy Markdown

It didn't help me. I still get an error. Are you sure it works?

@chrisglein chrisglein changed the title Fix spurious console log errors (Uncaught SyntaxError: Unexpected token o in JSON at position 1) Fix spurious console log errors on Windows (Uncaught SyntaxError: Unexpected token o in JSON at position 1) Mar 24, 2023
@chrisglein chrisglein changed the title Fix spurious console log errors on Windows (Uncaught SyntaxError: Unexpected token o in JSON at position 1) Fix spurious console log errors (Uncaught SyntaxError: Unexpected token o in JSON at position 1) Mar 24, 2023
@chrisglein

Copy link
Copy Markdown
Collaborator Author

It didn't help me. I still get an error. Are you sure it works?

It worked for me? How did you test it?
It should be the same as the fix suggested here (but reduced): #32

@KonstantinZhukovskij

Copy link
Copy Markdown

Done in exactly the same way, in the debug mode there is still an error.

@chrisglein

Copy link
Copy Markdown
Collaborator Author

Done in exactly the same way, in the debug mode there is still an error.

Looks like the misunderstanding of how to test the patch was answered here: #32 (comment)

@conorhastings, what would it take to get this PR merged?

@chrisglein

Copy link
Copy Markdown
Collaborator Author

@conorhastings Ping on what it would take to get this merged?

@conorhastings

Copy link
Copy Markdown
Owner

@chrisglein sorry i haven't used this library in a long time, i invited you as a collaborator, if there is some permission i missed please let me know but happy to give you merge ability, if you give me your npm handle i can add you three as well

@chrisglein chrisglein merged commit bf1c223 into conorhastings:master Sep 19, 2023
@chrisglein chrisglein deleted the fixConsoleErrors branch September 19, 2023 21:29
@chrisglein

Copy link
Copy Markdown
Collaborator Author

@chrisglein sorry i haven't used this library in a long time, i invited you as a collaborator, if there is some permission i missed please let me know but happy to give you merge ability, if you give me your npm handle i can add you three as well

I accepted the invite, thanks. Happy to try to help. For npm, this is me.

@conorhastings

Copy link
Copy Markdown
Owner

@chrisglein invited you as a maintainer, let me know if it didnt go through

@jcubic

jcubic commented Dec 28, 2023

Copy link
Copy Markdown

Does it mean that the library has an active maintainer?

@chrisglein

Copy link
Copy Markdown
Collaborator Author

Does it mean that the library has an active maintainer?

As someone who's using the module, I'll try to help out. But there's a lot on my plate.

@jcubic

jcubic commented Jan 4, 2024

Copy link
Copy Markdown

I created a PR, but someone needs to merge it and release a new version.

Anyway, I created a fork and published it to NPM with my fix included. This is the only way to handle unmaintained projects.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Console errors in React Native Debug mode

5 participants