Hi,
Today we got the following error while generating OMR template
InvalidArgumentException: invalid value for ewogICAgIlZlcnNpb24iOiAxLjAsIAogICAgIk5hbWUiOiAib21…AgICAgICAgICAgICAgICJCdWJibGVXaWR0aCI6IDYxCiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIF0KICAgICAgICB9CiAgICBdCn0= when calling FileInfo., must conform to the pattern /^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/. in /home/178604.cloudwaysapps.com/hryreucnqm/public_html/vendor/aspose/aspose-omr-cloud/src/Model/FileInfo.php:264
However if we decode the string given in the error it gets decoded without any problem. Why is this error coming?
Please help.
@ankurgupta555
We are sorry for your inconvenience. We will appreciate it if you please share your sample code and template source file here to replicate the issue at our end. We will investigate the issue and will guide you accordingly.
Code is written in Yii2 Framework. Few days ago this code was working.
Download The code: omr-code.zip (2.5 KB)
@ankurgupta555
I’m afraid I’m unable to test your sample code. However, We have not made any changes in our API recently. Aspose.OMR Cloud PHP Demo is working fine at our end. Please find sample PHP codeGenerateTemplate.zip (1.4 KB) to generate Template using filesAnswerSheet.zip (14.8 KB). You can customize it as per your requirements.
You can not test my code because it is part of our software. You can not even test any code if it has been integrated in a software. Just tell me why that string is not getting validated? What is wrong with the string?
If we try to base64decode it successfully decodes into json data. Then why your sdk class is not able to decode it?
ewogICAgIlZlcnNpb24iOiAxLjAsIAogICAgIk5hbWUiOiAib21yXzIzMCIsIAogICAgIlBhZ2VzIjogWwogICAg…6IDYxCiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIF0KICAgICAgICB9CiAgICBdCn0
Our template is like this.
align=center
?text=Booklet ID: [495] Test: test/test/My Omr
?text=Mobile__________________________________ Date____________
?answer_sheet=MainQuestions
elements_count=21
columns_count=5
Even on your demo files I am getting the same error
(I have only changed the API keys and template files)
Download aspose-omr-cloud-php.zip - pCloud
@ankurgupta555
Thanks for sharing the template generation markup. We have noticed the reported issue and logged a ticket OMRCLOUD-32 for further investigation and rectification. We will notify you as soon as it is resolved.
@ankurgupta555
Thanks for your patience. We have fixed your above reported issue and pushed the changes to GitHub repository. It should work now. Furthermore, we will update the PHP package on Packagist shortly.
I have installed your SDK using composer. So I think it needs the package from Packagist.
When will you update the package in Packagist? I am waiting.
In Packagist it is still saying Version 18.8 (2018-08-29 18:12 UTC)
@ankurgupta555
Thanks for your feedback. We have pushed the updated PHP SDK package to Packagist as well.