Azure Digital Twins Explorer (preview) - TypeError | Illegal constructor

Abdiqani Jama 0 Reputation points
2024-06-25T18:48:25.6233333+00:00

I'm new to Azure IoT - I have created Azure digital Twin, and given it permission owner,

When I open Azure Digital Twin Explorer (preview) via the portal.azure, message appears about pop up blocking, I have allowed all popups for Azure. The window appears briefly and disappear (assuming is the authentication?)

Once this window disappear, error message is thrown - User's image

What I want to do is understand the data that is reported from my Dusun gateway device as i have senors connected to this - I then want to model this data in the Azure Iot Central Hub.

Any tips?

Thank you in advance.

Azure Digital Twins
Azure Digital Twins
An Azure platform that is used to create digital representations of real-world things, places, business processes, and people.
231 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Anna 0 Reputation points
    2024-06-25T18:54:30.01+00:00

    The "TypeError: Illegal constructor" error in Azure Digital Twins Explorer is commonly caused by attempting to instantiate an object using a constructor that is not intended for direct use. This issue might stem from incorrect usage of classes, conflicts within the SDK, or compatibility issues with your browser. To address this, it's crucial to first ensure you are following the correct procedures as outlined in the Azure Digital Twins SDK documentation.

    Updating all relevant dependencies, including the Azure Digital Twins SDK, is a recommended step. This ensures you benefit from any bug fixes or improvements that might resolve the issue. Additionally, verifying that you are using a compatible browser can help, as some browser-specific issues might be causing the unexpected error. Make sure to clear your browser cache or try running the Azure Digital Twins Explorer in an incognito window to rule out cached scripts or extensions as potential culprits.

    Double-checking your initialization code is also important. Ensure you are not directly using a constructor that should be instantiated through a factory method or a static method instead. Examining the full error stack trace can provide more context and pinpoint the exact location of the problem, aiding in troubleshooting. Comparing your code with official sample code from Azure can help identify any discrepancies in your implementation.

    If these steps do not resolve the issue, more detailed information would be helpful. Providing a snippet of the code causing the error, the exact error message and stack trace, and details about the browser and version you are using can assist in diagnosing the problem more accurately. This targeted approach will help in identifying and fixing the root cause of the "Illegal constructor" error in Azure Digital Twins Explorer.

    4o

    0 comments No comments

  2. Sander van de Velde | MVP 33,146 Reputation points MVP
    2024-06-25T20:41:23.5333333+00:00

    Hello @Abdiqani Jama,

    welcome to this moderated Azure community forum.

    You have created an Azure Digital Twins resource and you assigned Azure Digital Twins Data Owner Role. This option was available during the creation of the resource or you can set it in the Access control pane:

    User's image

    Should be able to see you have access to Azure Digital Twins:

    User's image

    The ADT explorer is a separate website, not bound to the Azure portal so you need to log in again with the same credentials for this ADT explorer.

    It is recommended to try this inside an InPrivate browser session.

    Make sure you log in with the same credentials.

    I just tried it myself and it works for me in the West Europe region.


    If the response helped, do "Accept Answer". If it doesn't work, please let us know the progress. All community members with similar issues will benefit by doing so. Your contribution is highly appreciated.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.