Skip to content

Cross-origin error in Gatsby  #3

@linneaherman

Description

@linneaherman

I included fastcomments into my Gatsby site using this snippet:

<FastCommentsCommentWidget
  tenantId="MY_ID"
  urlId={uniqueId}
/>

When running the app in development mode locally, on localhost:8000,
Whenever I access any page that has this snippet on it, I get a cross-origin error:

Error in function Object.invokeGuardedCallbackDev in ./node_modules/react-dom/cjs/react-dom.development.js:4005
A cross-origin error was thrown. React doesn't have access to the actual error object in development. See https://reactjs.org/link/crossorigin-error for more information.

fastcommentsError

What I have tried:

  • lazyloading the comment section (only rendering after a button press) -> no success
  • only showing comments in production mode -> pages with comment section do not load at all

Details:

  • Gatsby version: 3.7.2
  • React version: 17.0.2
  • Fastcomments-react version: 2.0.1
  • OS: Windows
  • Browser: Chrome

Any idea as to why this might happen?

Edit: the tenantId "demo" works just fine. Only when I put in my own id does it stop working.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions