# Issue in create pcsid in simulation

**URL:** <https://zatca1.discourse.group/t/issue-in-create-pcsid-in-simulation/565>\
**Category:** FATOORA portal and Simulation portal\
**Created:** [August 20, 2023, 10:40am UTC](https://zatca1.discourse.group/t/issue-in-create-pcsid-in-simulation/565 "2023-08-20T10:40:34Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![eng.samah.saad](https://avatars.discourse-cdn.com/v4/letter/e/ea666f/32.png) [@eng.samah.saad](https://zatca1.discourse.group/u/eng.samah.saad)\
**Post date:** [August 20, 2023, 10:40am UTC](https://zatca1.discourse.group/t/issue-in-create-pcsid-in-simulation/565/1 "2023-08-20T10:40:34Z")

</div>

When try to create pcsid in simulation environment  
after success sign document by csid  
It give internal server error 500

---

<div class="post-metadata">

**Author:** ![kiaziz](https://avatars.discourse-cdn.com/v4/letter/k/dc4da7/32.png) [@kiaziz](https://zatca1.discourse.group/u/kiaziz)\
**Post date:** [August 20, 2023, 12:31pm UTC](https://zatca1.discourse.group/t/issue-in-create-pcsid-in-simulation/565/2 "2023-08-20T12:31:46Z")

</div>

please try to generate the CSR from the beginning for the simulation using the SDK, this command:

**Fatoora -sim -csr -csrConfig _[propertiesfilename. properties]_** and the properties file that comes with it in data/input directory

,complete the onboarding process again and it will work as expected

---

<div class="post-metadata">

**Author:** ![kmanickam.c](https://avatars.discourse-cdn.com/v4/letter/k/db5fbb/32.png) [@kmanickam.c](https://zatca1.discourse.group/u/kmanickam.c)\
**Post date:** [August 21, 2023, 1:10pm UTC](https://zatca1.discourse.group/t/issue-in-create-pcsid-in-simulation/565/3 "2023-08-21T13:10:31Z")

</div>

We are also getting same error while using production CSID api

Request  
{  
“compliance\_request\_id”: “1692621015604”  
}

Response  
{  
“code”: “Invalid-Request”,  
“message”: “System failed to process your request”  
}

Request id : 1692621015604

Log: 500 Internal server error

Please help us to resolve the issue.

---

<div class="post-metadata">

**Author:** ![jiri](https://avatars.discourse-cdn.com/v4/letter/j/53a042/32.png) [@jiri](https://zatca1.discourse.group/u/jiri)\
**Post date:** [August 22, 2023, 7:37am UTC](https://zatca1.discourse.group/t/issue-in-create-pcsid-in-simulation/565/4 "2023-08-22T07:37:53Z")

</div>

Please, try to perform the task via Postman collection. If the issue still persists, please, share the postman collection with ZATCA via the official channels or your RM for further investigation as the technical team needs to analyze the provided inputs and steps.

---

<div class="post-metadata">

**Author:** ![kmanickam.c](https://avatars.discourse-cdn.com/v4/letter/k/db5fbb/32.png) [@kmanickam.c](https://zatca1.discourse.group/u/kmanickam.c)\
**Post date:** [August 22, 2023, 9:33am UTC](https://zatca1.discourse.group/t/issue-in-create-pcsid-in-simulation/565/5 "2023-08-22T09:33:13Z")

</div>

Thanks for your response.

We have tried via Postman still the issue persists. We will share the collection and csr files to technical team via RM manger.

---

<div class="post-metadata">

**Author:** ![eng.samah.saad](https://avatars.discourse-cdn.com/v4/letter/e/ea666f/32.png) [@eng.samah.saad](https://zatca1.discourse.group/u/eng.samah.saad)\
**Post date:** [August 22, 2023, 3:50pm UTC](https://zatca1.discourse.group/t/issue-in-create-pcsid-in-simulation/565/6 "2023-08-22T15:50:46Z")

</div>

> [@jiri](#):
>
> se, try to perform the task via Postman collection. If the issue still persists, please, share the postman collection with ZATCA via the official channels or your RM for further investigation as the technical team needs to analyze the provided inputs and steps.

thanks it solved with me by make certificateTemplateName = ASN1:PRINTABLESTRING:PREZATCA-Code-Signing

---

<div class="post-metadata">

**Author:** ![kmanickam.c](https://avatars.discourse-cdn.com/v4/letter/k/db5fbb/32.png) [@kmanickam.c](https://zatca1.discourse.group/u/kmanickam.c)\
**Post date:** [August 24, 2023, 11:34am UTC](https://zatca1.discourse.group/t/issue-in-create-pcsid-in-simulation/565/7 "2023-08-24T11:34:21Z")

</div>

we have added “certificateTemplateName = ASN1:PRINTABLESTRING:PREZATCA-Code-Signing” in csr property file but still same error. Can you please share the sample csr file with us.

Note : We are using below command to generate the CSR

fatoora -sim -csr -csrConfig csr-config-saco.properties

---

<div class="post-metadata">

**Author:** ![jiri](https://avatars.discourse-cdn.com/v4/letter/j/53a042/32.png) [@jiri](https://zatca1.discourse.group/u/jiri)\
**Post date:** [August 24, 2023, 12:14pm UTC](https://zatca1.discourse.group/t/issue-in-create-pcsid-in-simulation/565/8 "2023-08-24T12:14:27Z")

</div>

Sample CSR files are in the SDK → Data - Inputs. You can find there examples of English and Arabic CSRs, incl. VAT groups.

---

<div class="post-metadata">

**Author:** ![kmanickam.c](https://avatars.discourse-cdn.com/v4/letter/k/db5fbb/32.png) [@kmanickam.c](https://zatca1.discourse.group/u/kmanickam.c)\
**Post date:** [August 27, 2023, 2:02pm UTC](https://zatca1.discourse.group/t/issue-in-create-pcsid-in-simulation/565/9 "2023-08-27T14:02:23Z")

</div>

We used the same mechanism as per the above thread still same issue. Can you please help us to resolve the issue?

Please find the below CSR property file

csr.common.name=SAICO-23456-300071179800003  
csr.serial.number=1-SAICO|2-SAICO1|3-1234567891  
csr.organization.identifier=300071179800003  
csr.organization.unit.name=HEADOFFICE  
csr.organization.name=SAICO  
csr.country.name=SA  
csr.invoice.type=1000  
csr.location.address=Riyadh  
csr.industry.business.category=INSURANCE

---

<div class="post-metadata">

**Author:** ![jiri](https://avatars.discourse-cdn.com/v4/letter/j/53a042/32.png) [@jiri](https://zatca1.discourse.group/u/jiri)\
**Post date:** [August 27, 2023, 2:20pm UTC](https://zatca1.discourse.group/t/issue-in-create-pcsid-in-simulation/565/10 "2023-08-27T14:20:50Z")

</div>

Please, try to perform the task via Postman collection. If the issue still persists, please, share the postman collection with ZATCA via the official channels or your RM for further investigation as the technical team needs to analyze the provided inputs and steps.

---

<div class="post-metadata">

**Author:** ![kmanickam.c](https://avatars.discourse-cdn.com/v4/letter/k/db5fbb/32.png) [@kmanickam.c](https://zatca1.discourse.group/u/kmanickam.c)\
**Post date:** [August 27, 2023, 2:33pm UTC](https://zatca1.discourse.group/t/issue-in-create-pcsid-in-simulation/565/11 "2023-08-27T14:33:45Z")

</div>

Yes. we have tried with postman. Still same issue. we have sent email to Zatca via RM. All steps are mentioned.

---

<div class="post-metadata">

**Author:** ![amerrabba](https://avatars.discourse-cdn.com/v4/letter/a/6bbea6/32.png) [@amerrabba](https://zatca1.discourse.group/u/amerrabba)\
**Post date:** [September 4, 2023, 10:34am UTC](https://zatca1.discourse.group/t/issue-in-create-pcsid-in-simulation/565/12 "2023-09-04T10:34:38Z")

</div>

where you put this  
certificateTemplateName = ASN1:PRINTABLESTRING:PREZATCA-Code-Signing  
???

---

<div class="post-metadata">

**Author:** ![Aturkistani](https://avatars.discourse-cdn.com/v4/letter/a/8baadc/32.png) [@Aturkistani](https://zatca1.discourse.group/u/Aturkistani)\
**Post date:** [September 6, 2023, 2:43pm UTC](https://zatca1.discourse.group/t/issue-in-create-pcsid-in-simulation/565/13 "2023-09-06T14:43:49Z")

</div>

dear @amerrabba,

in order to generate a CSR for simulation environment using openssl, then you need a CNF config file containing below fields (example) :

oid\_section = OIDs  
[OIDs]  
certificateTemplateName = 1.3.6.1.4.1.311.20.2  
[req]  
default\_bits = 2048  
emailAddress = [MyEmail@email.com](mailto:MyEmail@email.com)  
req\_extensions = v3\_req  
x509\_extensions = v3\_ca  
prompt = no  
default\_md = sha 256  
req\_extensions = req\_ext  
distinguished\_name = dn  
[dn]  
C=SA  
OU=Riyad Branch  
O=Contoso  
CN=EA123456789  
[v3\_req]  
basicConstraints = CA:FALSE  
keyUsage = digitalSignature, nonRepudiation, keyEncipherment  
[req\_ext]  
certificateTemplateName = ASN1:PRINTABLESTRING:PREZATCA-Code-Signing  
subjectAltName = dirName:alt\_names  
[alt\_names]  
SN=1-TST|2-TST|3-ed22f1d8-e6a2-1118-9b58-d9a8f11e445f  
UID=310122393500003  
title=1100  
registeredAddress= MyAddress  
businessCategory=Industry

so the certificateTemplateName = ASN1:PRINTABLESTRING:PREZATCA-Code-Signing is one of the fields.

however, you can still generate the CSR from the csr config properties file by using SDK using the following command:  
**Fatoora -sim -csr -csrConfig _[propertiesfilename. properties]_**

**note** : make sure to use the latest version of the SDK.

please do not hesitate to reach out if you have any further questions.

thanks.

---

<div class="post-metadata">

**Author:** ![amerrabba](https://avatars.discourse-cdn.com/v4/letter/a/6bbea6/32.png) [@amerrabba](https://zatca1.discourse.group/u/amerrabba)\
**Post date:** [September 6, 2023, 2:56pm UTC](https://zatca1.discourse.group/t/issue-in-create-pcsid-in-simulation/565/14 "2023-09-06T14:56:50Z")

</div>

many thanks dear anas  
after add certificate template line  
and install simulation sdk  
its working fine  
many thanks

في الأربعاء، 6 أيلول 2023, 5:54 م Anas Turkistani via Fatoora Developer Community \<[notifications@zatca1.discoursemail.com](mailto:notifications@zatca1.discoursemail.com)\> كتب:

---

<div class="post-metadata">

**Author:** ![Aturkistani](https://avatars.discourse-cdn.com/v4/letter/a/8baadc/32.png) [@Aturkistani](https://zatca1.discourse.group/u/Aturkistani)\
**Post date:** [September 6, 2023, 9:12pm UTC](https://zatca1.discourse.group/t/issue-in-create-pcsid-in-simulation/565/15 "2023-09-06T21:12:56Z")

</div>

@amerrabba any time dear :). if you have any other questions, please do not hesitate to submit them as posts, and the team will be happy to help always.

---

<div class="post-metadata">

**Author:** ![Shzzamx](https://dub1.discourse-cdn.com/flex013/user_avatar/zatca1.discourse.group/shzzamx/32/480_2.png) [@Shzzamx](https://zatca1.discourse.group/u/Shzzamx)\
**Post date:** [September 24, 2024, 7:25am UTC](https://zatca1.discourse.group/t/issue-in-create-pcsid-in-simulation/565/16 "2024-09-24T07:25:06Z")

</div>

i have arabic name of organization along with the english name  
do i need to make changes in config file?

---

<div class="post-metadata">

**Author:** ![Aturkistani](https://avatars.discourse-cdn.com/v4/letter/a/8baadc/32.png) [@Aturkistani](https://zatca1.discourse.group/u/Aturkistani)\
**Post date:** [September 27, 2024, 2:14pm UTC](https://zatca1.discourse.group/t/issue-in-create-pcsid-in-simulation/565/17 "2024-09-27T14:14:03Z")

</div>

It’s up to you, no restrections by ZATCA wheter you enter the org name in arabic or english in your CSR config file.

---

<div class="post-metadata">

**Author:** ![Shzzamx](https://dub1.discourse-cdn.com/flex013/user_avatar/zatca1.discourse.group/shzzamx/32/480_2.png) [@Shzzamx](https://zatca1.discourse.group/u/Shzzamx)\
**Post date:** [October 2, 2024, 2:33pm UTC](https://zatca1.discourse.group/t/issue-in-create-pcsid-in-simulation/565/18 "2024-10-02T14:33:57Z")

</div>

I have one more Question to ask ! Will be very gratefull to your response

my question is  
i am generating a csr file using chilkat library ,by submitting this csr file i got the Compliance CSID and i did the compliance of invoices but when i try to generate the PCSID it gives me the error of “Invalid-CSR”.

Then i used OpenSSL .i didnt do any changes just replaced the CSR generattion from chilkat to OpenSSL and i got succeed in onboarding the Unit device and everything

is there any restriction by ZATCA that it only accpets the CSR generated by OpenSSL or there is something else that could cause the Error in the CSR generated by chilkat library

---

<div class="post-metadata">

**Author:** ![Aturkistani](https://avatars.discourse-cdn.com/v4/letter/a/8baadc/32.png) [@Aturkistani](https://zatca1.discourse.group/u/Aturkistani)\
**Post date:** [October 6, 2024, 7:59am UTC](https://zatca1.discourse.group/t/issue-in-create-pcsid-in-simulation/565/19 "2024-10-06T07:59:40Z")

</div>

@Shzzamx,

Please note that there is a special requirement for CSR generation in simulation environment, which probably you configured it correctly in OpenSSL.

+there is no such restriction by ZATCA to accept CSRs from openSSL only.

---

<div class="post-metadata">

**Author:** ![AhmedTarekYA](https://avatars.discourse-cdn.com/v4/letter/a/9fc29f/32.png) [@AhmedTarekYA](https://zatca1.discourse.group/u/AhmedTarekYA)\
**Post date:** [October 27, 2024, 9:52am UTC](https://zatca1.discourse.group/t/issue-in-create-pcsid-in-simulation/565/20 "2024-10-27T09:52:40Z")

</div>

Please note that there is a special requirement for CSR generation in simulation environment, which probably you configured it correctly in OpenSSL. ??? what is this requirement ?

[Next page](https://zatca1.discourse.group/t/issue-in-create-pcsid-in-simulation/565.md?page=2)
