The visual section inside the formatting tab does not appear next to the General section: the photo in the tutorial (https://github.com/autodesk-platform-services/aps-powerbi-tools/tree/develop/visuals/aps-viewer-visual) shows:
I started the Javascript environment using the "npm start" command and activated the developer settings, then I chose in the visualisation section the developer visual but when selecting the white visual box in the report and looking at the formatting tab to insert what is need from access tokens and GUID and urn I don't seem to find the visual section (only general);
What I see:
The Errors i get:
Access to fetch at cvSandboxPack.cshtml:1
'https://app.powerbi.com/13.0.22683.73/cvSandboxPack.cshtml?locale=en-
US&emCVBundle=1&pbiglobals=1' from origin 'null' has been blocked by
CORS policy: No 'Access-Control-Allow-Origin' header is present on the
requested resource. If an opaque response serves your needs, set the
request's mode to 'no-cors' to fetch the resource with CORS disabled.
visual.ts:146
`GET https://app.powerbi.com/13.0.22683.73/cvSandboxPack.cshtml?
locale=en-US&emCVBundle=1&pbiglobals=1 net::ERR_FAILED 200 (OK)`
`visual.ts:154 TypeError: Failed to fetch
at Visual.getAccessToken (<anonymous>:299:36)
at initializeAuth (envinit.js:604:35)
at eval (envinit.js:519:13)
at new Promise (<anonymous>)
at initializeAuthPromise (envinit.js:518:16)
at Object.Initializer (envinit.js:764:24)
at <anonymous>:78:62
at new Promise (<anonymous>)
at <anonymous>:78:20
at async Visual.initializeViewer (<anonymous>:278:13)`
Thank you for the heads up. It looks like PowerBI has changed the way custom visuals define their custom settings. Instead of defining the settings like so:
export class VisualSettingsModel extends Model {
viewerCard = new ViewerCard();
designCard = new DesignCard();
Card = [this.viewerCard, this.designCard];
}
They should now look like this:
export class VisualSettingsModel extends Model {
viewerCard = new ViewerCard();
designCard = new DesignCard();
cards = [this.viewerCard, this.designCard];
}
I've just updated the code, and the visual settings show up again.