Developer portal is having a problem connecting to widget in development mode

lzhou0 90 Reputation points
2023-08-24T01:18:22.61+00:00

Hi,

I'm trying to customize a widget with API Management's scaffold. However, when I run npm start, the browser opens with an error as seen in the screenshot.

MicrosoftTeams-image

How do I resolve the error that is throwing: Secrets send by Dev Portal are invalid?

Thanks in advance.

Azure API Management
Azure API Management
An Azure service that provides a hybrid, multi-cloud management platform for APIs.
2,447 questions
{count} vote

Accepted answer
  1. MuthuKumaranMurugaachari-MSFT 22,441 Reputation points Moderator
    2023-08-25T02:43:31.1866667+00:00

    Linda Zhou Thanks for posting your question in Microsoft Q&A. From the stack trace above, this error occurs when calling askForSecrets function. As per the code logic, the console error Could not get 'editorData' from the search params of the URL first occurred in this line when trying to get search params from URL http://localhost:3000/ and then followed by exception Secrets send by Dev Portal are invalid in this line. The URL didn't have any search params like editorData and hence the exception occurred.

    This appears to be happening in your local environment and suggest you pass the valid search params (query string) when calling the URL and debug the JavaScript if in case of any other errors or exception.

    Also note, this function may return undefined value when logged in as anonymous in the portal. I hope this helps and let me know if any questions.

    1 person found this answer helpful.

2 additional answers

Sort by: Most helpful
  1. Koijen, Ruud 5 Reputation points
    2024-01-03T12:47:07.0966667+00:00

    We are having similar problems. The dev screen in our browser says "Uncaught (in promise) Secrets send by Dev Portal are invalid", while the main screen (localhost:3000) is saying "Loading". If anyone can advise on this, it would be helpful.

    1 person found this answer helpful.
    0 comments No comments

  2. Dibya Ranjan Tripathy 21 Reputation points
    2024-08-07T09:28:32.7933333+00:00

    Any update on the issue ? It's been more than years but no reply from Microsoft on this. We have a requirement to improve apim developer portal through custom widget. I don;t think, MS is improving the Azure APIM developer portal.

    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.