star-micronics / react-native-star-io10

react-native-star-io10 is a library for supporting application development for Star Micronics devices.
Other
83 stars 54 forks source link

Failed to create image decoder with message 'unimplemented' #19

Closed pedromcunha closed 2 years ago

pedromcunha commented 3 years ago

Getting an error when trying to print and image, this is on the mCPrint3 printer. I'm passing in a valid http url but it seems to throw this error:

07-22 14:44:37.272  8746  8790 D skia    : --- Failed to create image decoder with message 'unimplemented'
07-22 14:44:37.272  8746  8790 D DRM/DcfDecoder: decodeDrmImageIfNeeded with data

I'm on Android running it in production mode. Any idea if there's a work around? Worst case scenario I feel like a failed image shouldn't cancel all the print actions (which is what's happening now).

pedromcunha commented 2 years ago

I fixed the issue, the url needs to be https otherwise it won't load which creates this error. Should be added to the docs or handled more gracefully.

bandit-ibayashi commented 2 years ago

Although this issue has already been closed and time has passed, I will describe the information for this matter.

When used on iOS and Android, this appears to be due to OS security specifications that restrict non-secure communications (http communications) from within the app. Therefore, https is basically recommended when specifying by URL.

However, if it is desired to use non-secure communication by specifying the image source, it is necessary to configure the following settings in your application.

Thank you.