[Image Editor Plugin] Cannot read property '1' of null

Forge Component
(0)
Published on 18 Jul by André Gonçalves
0 votes
Published on 18 Jul by André Gonçalves

I am developing a mobile app that features image editing so I used this plugin but I am encountering an error Cannot read property '1' of null during the actual editing part of the image.

This is the error log details:


I debugged the client action and the error appeared right after stepped over the action EditImageFromBase64.


Any help would be deeply appreciated.

Hi Katrina,

Can you share the values of the properties passed to EditImageFromBase64?

Regards,

Daniel

Hi Daniël,

I just passed the current image (as binary data) from my List of LocalFileImages. The binary data is then converted to Base64 using the action BinaryDataToBase64, which is also included in the plugin.  


Then the converted value (Base64) is what I passed as property to EditImageFromBase64 action.

Hi Katrina,

Did you check in debugger that the base64 returned from the binary to base64 is a valid base64 string?

You can google for online base64 string validators.

Regards,

Daniel

Hi Katrina, 


Thanks for reporting the issue. After checking if the base64 is valid, like Daniël suggested, if it is valid, can you please provide the OML?

Thanks! 

Another question, are you able to test in an iOS device?

There's also a sample app that you can download and test. Please notice the screen property Base64Image in the HomeScreen, that has a default value of "data:image/jpeg (...)". 

Can check? 

Thanks :)

Hi Daniël,

I don't know how to get the binary data from the entity's "View Data", but I checked and compared the value with BinaryToBase64 action of the BinaryData extension and they are completely the same. I tested the returned value and as per base64.guru, it is a valid Base64 string.

Hi André,


Attached is the OML file for your review.

I did not test it in iOS since I am not an iOS user and there is no device available for testing.

I already reviewed the sample app you provided, does this mean that the plugin only works for .jpeg files? I am currently testing the plugin with .svg files. These .svg files are from slides of an uploaded presentation which are then converted to images.