Showing results for 
Search instead for 
Did you mean: 
Helper III
Helper III

Contract failure: Construction of a PABinary always result in a valid instance



I am getting below issue while uploading image to sharepoint by taking image from mobile . Its really urgent . Suddenly it stopped working . 


"Contract failure: Construction of a PABinary always result in a valid instance"

Quick help will really be appriciated.




Power Apps
Power Apps



We are currently investigating this issue. To help investigate would you be able to provide a session ID when this issue occurs in the mobile player. Also do you happen to know the size of the image being uploaded.




Impactful Individual
Impactful Individual

I have also been suffering this issue for the last few days.
How are we meant to use these apps in a live environment when it’s so so buggy.
Jeez I reported about Patch not working on collections where initilally its a null value nearly a year ago and it’s still not fixed

Hi Cody,


Please find the session ID below .


Session ID: 9085c4eb-aec6-4ce5-980a-134bc6462ea9
PowerApps 3.18042.26


Please try to solve this soon , its really critical . whole application is stuck for this step . 




Impactful Individual
Impactful Individual

Found couple bits:



When you 'Ask In Powerapps' for the base64 representation of a camera image it also includes the 'data:image/png;base64,' part before the base64 data

Solution: Add a Label, Set is Text Property to a substitute function of the base64 data and replace 'data:image/png;base64,' with '' , then use this for your 'ask in powerapps'.



Doesnt like blank data (nullvalue)


Just do a simple If Isblank formula and replace with minimal image such as 'iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNkYAAAAAYAAjCB0C8AAAAASUVORK5CYII='




Not applicable

Hi, Can we get an update on this?

Hi @gautmish, I am looking at the session ID you provided, but I am failing to find the "Construction of a PABinary should always result in a valid instance" error. Are you sure that you hit this error in the session you provided?


Regarding the error, there is currently a known regression in the area of uploading photos to SharePoint through binary data (using a custom connector and a Flow). One way to know if you are affected by this issue is the following:


  1. Uploading a photo to SharePoint works on WebPlayer but not iOS or Android.
  2. If you take a photo that results in a smaller image size, the upload will succeed. You can test this by taking a photo of a solid, white background.

We are currently working on a permanent fix.




Hi @Delid4ve



Hi @AllenKim,


Could you please let me know how soon this can be fixed . 




Impactful Individual
Impactful Individual

you can get the binary data from that blob url using sql.


add action, sql, add rows, set up a dummy table and save the data. (this automatically grabs the binary data from the bloburl)

now add a compose action, and use a function binarytobase64 (this converts the binary data to base64)

now do whatever you want with it, note: you will have to add the data:image/png;base64 to the front of the string if you want to put this in html code for instance

Helpful resources

Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (3,942)