2

Error

Server Error
Error: self-signed certificate
This error happened while generating the page. Any console logs will be displayed in the terminal window.

Hello team,

I'm a newcomer to Sitecore and have recently completed a local setup of Sitecore Headless SXA with Next.js. While my Sitecore instance is functioning correctly, I'm encountering an issue when I try accessing http://localhost:3000 using jss start:connected.

error message page

Specifically, I'm receiving a self-signed certificate error. Any assistance or guidance on resolving this would be greatly appreciated. Thank you in advance for your help.

2

2 Answers 2

1

I encountered a similar issue while setting up Sitecore Headless SXA with Next.js locally.

To resolve this problem when launching the application in connected mode,

follow these steps:

First Go to your root directory, run the following command:

$env:NODE_TLS_REJECT_UNAUTHORIZED=0

Then, start the application in connected mode:

jss start:connected

By executing these commands in this order, you should be able to resolve the issue and access http://localhost:3000 successfully.

Hope this helps!!!

1
  • Thanks this is working. @Praveen
    – Jitesh
    Commented Aug 12 at 3:40
0

In order to solve this issue, you will need to the add the following entry inside the .env file in the jss application you are running locally.

NODE_TLS_REJECT_UNAUTHORIZED=0

Once above changes are made, you can re-run the above command jss start:connected again.

Hope this helps!!! Let me know in case you face any issues.

Not the answer you're looking for? Browse other questions tagged or ask your own question.