Azure-Samples / Azure-Samples/digital-twins-explorer
ADT Explorer gives error when used in Private Link Environment
- Dominant language
- JavaScript
- Stars
- 215
- Forks
- 127
- PR merge metrics
- No merged PRs in 30d
Description
My customer is trying to test out ADT behind a private endpoint, they've created a VM on the same VNET as the ADT Private Endpoint and installed ADT Explorer onto it. However when they run it they get the following error :
"Unexpected Token E in JSON at position 0" accurred while parsing the response body - Error occurred while trying to proxy to: localhost:3000/models?api-version=2010-10-31....
I've seen the StackOverflow article advising to allow pop-ups in the browser and that doesn't fix it for the customer. I've set up my own environment and can replicate the error, looking in the command prompt in my environment I see :
[HPM] Error occurred while trying to proxy request /models?api-version=2020-10-31&dependenciesFor=&includeModelDefinition=true from localhost:3000 to / (UNABLE_TO_VERIFY_LEAF_SIGNATURE) (https://nodejs.org/api/errors.html#errors_common_system_errors)
This seems to be certificate related, I've tried setting process.env['NODE_TLS_REJECT_UNAUTHORIZED'] = '0'; in both of the .env files that I can find in the ADT Explorer directories but it still doesn't work. [Update - I've also tried some other Node settings to turn certificate/TLS checking off, but without success]
Contributor guide
Assessment
This issue has not been assessed yet.