microsoft / azure-devops-extension-sdk

Client SDK for developing Azure DevOps extensions

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

SDK.getPageContext failed

zagaria opened this issue · comments

commented

Hello team,

I tried to use getPageContext as outlined in the official documentation, but I encountered the following error:

Attempted to call getPageContext() before init() was complete. Wait for init to complete or place within a ready() callback

Even after adding

await SDK.init();
await SDK.ready();

before SDK.getPageContext(), I still received the same error.

Can anyone provide assistance with this issue?

Thanks.

commented

After a short debug, I found that the pageContext is located inside the context object. I have prepared a patch #82

cc: @lohitakshgupta, @nkirchem

commented

Hello.

@lohitakshgupta, @nkirchem did you have a chance to review?

New version: 3.1.3 contains the fix for this issue. Thanks for letting us know about it.