cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
itayrom Member
Member

Re: Custom Visuals Sandbox is coming - Here's what you need to know

Hello, @bashirs.

I encountered some additional issues caused by the sandboxing, for which I was not able to find suitable workarounds:

  1. IVisual's destroy() method is not invoked when changing the page on the report. I've been using this method to persist properties regarding the state of the visual so that the user can move between pages without having the visual reset. Is there another way I can perform this operation when the page is changed? My current workaround is to persist the state every time the user performs a sequence of state changing operations, but it is a horrible solution because it involves a lot of unnecessary communication with the server and it invokes the update() method every time.
  2. DOM drag events are not functioning properly. More specifically, when a "drag" event occures, it won't stop firing even after the mouse button is released. Also, the "dragend" event never occurs. This causes the dragged element to be dragged indefinitely. My guess is that the window element's events are not captured inside the visual's iframe so elements inside it are not informed when the mouse button is released. My workaround for this issue was- a) Defining a flag that makes the drag event handler to return immediately when set to "false". b) Set the flag to "true" on "dragstart". c) Set the flag to "false" on "mouseup" events for all of the element's ancestors and the window element. The problem with this solution is that the drag event never stops firing, and just won't perform anything when the flag is set to "false". Additionally, while this workaround works better than expected in Firefox and Chrome, it has some annoying issues in IE11 and Edge(Will specify if needed).

I'd appreciate your assistance on these matters,

Thank you,

Itay.

jamesdales
Advisor

Re: Custom Visuals Sandbox is coming - Here's what you need to know

I'm experiencing @itayrom's 2nd issue too. This is affecting my map control (the one Jen Underwood used in the Gartner BI bake offi) Once you start dragging the map, you can't stop. This is underlying LeafletJS functionality and not something I can control.

 

mplus Frequent Visitor
Frequent Visitor

Re: Custom Visuals Sandbox is coming - Here's what you need to know

Hi,

Before sandboxing it was possible to have a custom visual click the “Refresh” button programmatically. This was a very practical yet simple way to bring real-time or near real-time behavior into reports. There is some support for auto-refreshing visuals in dashboards; however it is not as useful as having it in reports since we cannot interact with the content of the visuals in dashboards. It would be nice to have more easy-to-use real-time support in reports, maybe from the custom visuals API or by having access to an official visual that calls for a “refresh” at regular time intervals.

 

Thanks,

cmn Member
Member

Re: Custom Visuals Sandbox is coming - Here's what you need to know

@bashirs, is there any update on a workaround or eta for a fix?  We are under a lot of pressure from clients to have this issue resolved.  Even a rough ETA would be appreciated.  Are we talking days, weeks or months for a fix?  

 

Is a rollback possible, or a flag to turn off sandboxing at our own risk?  

 

There are other posts highlighting the same issue. Here are some that I have found, in case you have missed them:

 

http://community.powerbi.com/t5/Mobile-Apps/Custom-Visuals-no-longer-working-with-iPhone-app/m-p/284...

http://community.powerbi.com/t5/Service/Custom-Visuals-not-working/m-p/28687

http://community.powerbi.com/t5/Developer/Links-in-Custom-Visuals-for-Microsoft-Showcase-URGENT/m-p/...

 

 

bashirs Regular Visitor
Regular Visitor

Re: Custom Visuals Sandbox is coming - Here's what you need to know

Hi cmn,

 

I am working with the mobile team to come up with an estimate. When I get that information from them I will let you know.

 

Thanks,

Bashir

----------------------------------
Microsoft Employee on PowerBi Platform Team
mplus Frequent Visitor
Frequent Visitor

Re: Custom Visuals Sandbox is coming - Here's what you need to know

Hi Bashirs,

I am pleased to see that the problem I mentioned in my first post (the 'grab and drag' problem) has been fixed.

 

Thanks

 

Update Apr 20, 2016: the problem seems to be back now.

Update May 2016: now fixed, thanks.

danieleperilli Regular Visitor
Regular Visitor

Re: Custom Visuals Sandbox is coming - Here's what you need to know

Hi @bashirs

 

It seems that custom visuals that are NOT in the official gallery don't show in iPhone dashboards. Can you confirm it?

For example, if I pin Card With States By SQLBI to the dashboard it works, but if I change its GUID (from package.json), produce a new PBIVIZ package and pin the new visual (that has the same code of the original) to the dasboard, then nothing appears in the iPhone app.

cardissue.png

tomhawley Regular Visitor
Regular Visitor

Re: Custom Visuals Sandbox is coming - Here's what you need to know

I'd also like to throw in that i'm experiencing similar issues on iOS devices since sandboxing went live.

 

In my report I have a few "Card with State" visuals on the initially active page which fail to render, though I see blank grey rectangles rather than the Power BI logo. If I navigate to another page and come back, they do then render, and continue to respond to changes on the page.

 

The "Chiclet Slicer" is also failing to render initially in exactly the same manner on that page, as well as one of my own visuals. Unfortunately mine doesn't render even when I return to the page, but the chiclets and cards do. I can't discount that my faulty visual is breaking the others, but that would seem a rather counter-intuitive to now happen given what you've tried to achieve with sandboxing. Finally, I have another visual within the same report that only appears on initially hidden pages, and that is also failing to render entirely on iOS. Other visuals on those pages render without issue.

 

Are there any suggestions as to how to debug a custom visual that works successfully on the web but not on iOS? Preferably something that doesn't involve having to hand over a visual to MS to fix, because that's not going to be sustainable.

 

On this topic, did I miss an eventual announcement that sandboxing was live, or were we expected to keep watching until something broke? The developer blog was the perfect place for all of this to be communicated, but you've for some reason abandoned it and merged it with the main blog which you seem to want to keep high level and limited to product promotion and feature announcements. A little additional communication beyond a well hidden single thread on the community forum would  have helped. Only so much however...  as has been pointed out, we couldn't test and debug on mobile platforms, and that's clearly showing now.

vpat Frequent Visitor
Frequent Visitor

Re: Custom Visuals Sandbox is coming - Here's what you need to know

Hi guys,

 

I have noticed that my custom visualzation is working very slow and sometimes doesn't render completely. I have created custom viz using d3 and it used to work fine. Issues observed with it are,

  1. Performance: Before init method is invoked it takes huge amount of time and then visualization is shown on the dashboard/reports. Tried on chrome as well as on firefox. On firefox one of the log showed warning that "mutating the [[Prototype]] of an object will cause your code to run very slowly; instead create the object with the correct initial [[Prototype]] value using Object.create" in visualsandbox.externals.min.js (10:9847). This warning also appears even when I use ?sandboxVisualsEnabled=false in url.
  2. Visual rendering issue: Sometimes on dashboard/reports only 25% of visual is rendered. There are no exceptions OR errors on console. Issue goes away after page refresh multiple times OR if you try to resize the dashboard tile (even if you just try to drag for size change and doesn't actually change size).
  3. Visualization not working on iPhone/Android: I see that this is already raised by many people and we are also facing this issue.

As this is in production it is urgent issue. Any suggestions or help will be much appreciated.

 

Thanks.

Highlighted
vpat Frequent Visitor
Frequent Visitor

Re: Custom Visuals Sandbox is coming - Here's what you need to know

I have noticed that issue where custom visualization are partially generated OR not generated are occuring only on the pinned custom visuals on dashboard and not on reports.

Also, today it's completely behaving unpredictable and sometime few of the custom viz are not shown on dashboard with errors on console as,

Sandbox plugin

XMLHttpRequest cannot load https://app.powerbi.com/undefined/explore/resourcePackageItem/669f2a91-32cb-4b50-b8cc-8322e50c8b90vE... Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'null' is therefore not allowed access. The response had HTTP status code 404.

 

Any idea on how to fix it ?

Issue Power BI.png