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.
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.
Please find the session ID below .
Session ID: 9085c4eb-aec6-4ce5-980a-134bc6462ea9
Please try to solve this soon , its really critical . whole application is stuck for this step .
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='
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:
We are currently working on a permanent fix.
We are using add picture control in our app . So we are getting blob storage URL , In powerapps i dont think it is possible to convert the same to base 64 URL (If possible to please lte me know). And for photo taken from camera , its not sending any triggering the flow , its failing before that .
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
The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.
Join us on June 28 for our monthly User Group leader call!
This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.
Check out our new release planning portal, an interactive way to plan and prepare for upcoming features in Power Platform.