Jump to content

How to locate / debug console errors - Syntax & React related?

Go to solution Solved by creedon,

Recommended Posts

Hi there, I know some console errors with Squarespace are normal, but there are some extra ones that I'm pretty sure are actual issues. The trouble is, I'm not even sure how to locate these errors, much less do anything with them.

These errors are appearing across my site, which leads me to believe it may be something I'm putting in Code Injection from a 3rd party plugin. But I have no idea where they would be given the line number references here don't seem to point to anything and are different on each page. See bolded parts.

URL: https://www.youbelongsd.com/membership-page

membership-page:4895 Uncaught SyntaxError: Invalid or unexpected token

membership-page:4933 Uncaught SyntaxError: missing ) after argument list

blur.js:42 Uncaught (in promise) Error: Minified React error #321; visit https://reactjs.org/docs/error-decoder.html?invariant=321 for the full message or use the non-minified dev environment for full errors and additional helpful warnings.

    at it (blur.js:42:3933)

    at s.useContext (blur.js:42:5675)

    at cr (blur.js:57:31858)

    at blur.js:61:494

    at blur.js:126:5191

    at Generator.next (<anonymous>)

    at I (blur.js:126:4967)

 

how it looks on the default home page:

URL: https://www.youbelongsd.com/

www.youbelongsd.com/:2833 Uncaught SyntaxError: Invalid or unexpected token 

www.youbelongsd.com/:2871 Uncaught SyntaxError: Invalid or unexpected token 


blur.js:42 Uncaught (in promise) Error: Minified React error #321; visit https://reactjs.org/docs/error-decoder.html?invariant=321 for the full message or use the non-minified dev environment for full errors and additional helpful warnings.
    at it (blur.js:42:3933)
    at s.useContext (blur.js:42:5675)
    at cr (blur.js:57:31858)
    at blur.js:61:494
    at blur.js:126:5191
    at Generator.next (<anonymous>)
    at I (blur.js:126:4967)

Edited by jinlikegold

Hey, I'm Jin (he/him). I'm a front end dev learning to make custom sites in Squarespace.

If you find my suggestions helpful, please upvote & like!😺

 

Link to comment

I think you should discuss this issue with the third party which you are working with. They can give you a helpful suggestion

Edited by Beyondspace

BeyondSpace - Squarespace Website Developer

🖼️ Lightbox Studio (Enable Pinch/Zoom on lightbox)
🗓️ Delivery Date Picker (Squarespace Date picker form field)
💫 Gallery block 7.1 workaround
🥳 Sparkplugin Customisations Browsers (Browse +100 Spark plugin customisations)
🥳 Elfsight Template Browsers (Browse +1000 Elfsight widget Templates)

If you find my answer useful, let's leave a like or upvote so others with the same issue can find their solution. Thank you!

 

Link to comment
5 hours ago, Beyondspace said:

I think you should discuss this issue with the third party which you are working with. They can give you a helpful suggestion

Thank you. I have a number of plugins currently in use, so I'll have to go through and narrow down which one it may be.

Hey, I'm Jin (he/him). I'm a front end dev learning to make custom sites in Squarespace.

If you find my suggestions helpful, please upvote & like!😺

 

Link to comment
  • Solution

It may be helpful to know that for diagnostic purposes you want to have your Inspector window open, clear the console messages, then reload the page. From there you should have full access to the errors and you can open the errors, arrow toggle, and trace down errors.

At least that is how it works in Chrome DevTools. I assume other browsers have similar diagnostic tools.

Find my contributions useful? Please like, upvote, mark my answer as the best ( solution ), and see my profile. Thanks for your support! I am a Squarespace ( and other technological things ) consultant open for new projects.

Link to comment
On 3/3/2023 at 1:15 AM, creedon said:

It may be helpful to know that for diagnostic purposes you want to have your Inspector window open, clear the console messages, then reload the page. From there you should have full access to the errors and you can open the errors, arrow toggle, and trace down errors.

At least that is how it works in Chrome DevTools. I assume other browsers have similar diagnostic tools.

Thank you!! I did not know this, it helped me troubleshoot several of the errors myself.

Hey, I'm Jin (he/him). I'm a front end dev learning to make custom sites in Squarespace.

If you find my suggestions helpful, please upvote & like!😺

 

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.