Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
ziyi
Regular Visitor

Cannot import my own custom visual

Hello,

 

I created a custom visual with PowerBI Visuals Tools version 2.3.0.

It works fine at my local environment.

So I import it to PowerBI Online, PowerBI shows a error message.

Selection_268.png

 

And also JavaScript shows this.

Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://wabi-south-east-asia-redirect.analysis.windows.net/powerbi/content/visual. (Reason: CORS header ‘Access-Control-Allow-Origin’ missing).[Learn More]

How can I fix this ?

 

1 ACCEPTED SOLUTION
v-evelk
Microsoft Employee
Microsoft Employee

The reason was found.

Your package has size of more than 3Mb but PowerBI Service alow to import packages of size no more than 2Mb.

 

In than case you should unpack a built package by any archivator and pack manually as zip file and then change the extension to PIVIZ. It must help to reduce the package size.

 

Also you can use new tools that let to use JS modules and import 3rd party libraries as modules without including external links to pbiviz.json. It must help to reduce a package size and simplify work with outer libraries.

Details you can find by the following link (https://community.powerbi.com/t5/Custom-Visuals-Community-Blog/New-Beta-version-of-powerbi-visual-to...)

View solution in original post

9 REPLIES 9
v-evelk
Microsoft Employee
Microsoft Employee

Hello,

 

Looks like your visual tries to communicate with the outer environment (outside iframe) by sending some events or so on.

If there is a possibility to provide access to your code, I can try to investigate the issue.

 

Thanks!

 

Evgenii Elkin,

Software Engineer

Microsoft Power BI Custom Visuals
[email protected]

Hello,

 

I pushed my code to github.

https://github.com/sengokyu/ex-powerbi-and-igniteui

 

Following are parts of my code.

 

visuals.ts

module powerbi.extensibility.visual {
    'use strict';

    export class Visual implements IVisual {
private table: JQuery<HTMLElement>; // ignite-ui grid // (snip) constructor(options: VisualConstructorOptions) { // (snip) try { this.table.igGrid(params); } catch (err) { console.log(err); } }
// (snip) } }

pbiviz.json

{
  /* (snip) */
  "externalJS": [
    "node_modules/jquery/dist/jquery.js",
    "src/jquery.adapter.js",
    "vendor/jquery-ui-1.12.1/jquery-ui.js",
    "vendor/ignite-ui/js/infragistics.core.js",
    "vendor/ignite-ui/js/infragistics.lob.js",
    "src/infragistics.adapter.js",
    "node_modules/powerbi-visuals-utils-dataviewutils/lib/index.js"
  ],
  /* (snip) */
}

igGrid is a component manufactured by Infragistics.

https://www.infragistics.com/products/ignite-ui

 

Thank you.

 

 

v-evelk
Microsoft Employee
Microsoft Employee

I tried to build it but it requires some files from "vendor" folder.

Is it possible to provide them?

 

Evgenii Elkin,
Software Engineer
Microsoft Power BI Custom Visuals
[email protected]

I zipped some files in vendor directory.

https://1drv.ms/f/s!AoOnXNteXYjpiQSsAS6l4wOfeDvP

 

Zip password: greatbi

 

I will delete this file after a day.

 

Thanks.

 

 

v-evelk
Microsoft Employee
Microsoft Employee

Thanks, I have downloaded them.

 

Evgenii Elkin,
Software Engineer
Microsoft Power BI Custom Visuals
[email protected]

v-evelk
Microsoft Employee
Microsoft Employee

The reason was found.

Your package has size of more than 3Mb but PowerBI Service alow to import packages of size no more than 2Mb.

 

In than case you should unpack a built package by any archivator and pack manually as zip file and then change the extension to PIVIZ. It must help to reduce the package size.

 

Also you can use new tools that let to use JS modules and import 3rd party libraries as modules without including external links to pbiviz.json. It must help to reduce a package size and simplify work with outer libraries.

Details you can find by the following link (https://community.powerbi.com/t5/Custom-Visuals-Community-Blog/New-Beta-version-of-powerbi-visual-to...)

Thank you! You saved me.

 

I did unzip pbiviz and re-zip them.

unzip exGrid.pbiviz
zip -9 -r exGrid.zip package.json resources
mv exGrid.zip exGrid.rezip.pbiviz

 

I have imported my pbiviz successfully.

 

Can you elaborate how you acheived this?

v-viig
Community Champion
Community Champion

We are integrating ZIP compression into PBIVIZ 3.x.x. It will be released soon once we are sure it works well.

 

Ignat Vilesov,

Software Engineer

 

Microsoft Power BI Custom Visuals

[email protected]

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Fabric Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Top Solution Authors