On previous steps, did you give proper CSR with VAT number , and created CSR with that ???
Yes, I filled in all the data including the VAT number, and then CSR and CSID were created and filled automatically, and in the next step, I was getting error.
i Have completed the simulation scuccessfully. was confused between wizard and zatca setting tab at company doctype.
completed simulation integration at Zatca setting page inside company.
Dear ERPGulf Support Team,
I am experiencing connection issues with the ZATCA integration in our ERPNext system. This integration was working perfectly until recently, but has suddenly stopped working without any configuration changes on our end.
System Details:
- ERPNext Version: 14.33.1
- ZATCA ERPGulf App Version: Latest
- Environment: Self-hosted on VPS (Hostinger)
Current Issue:
We are consistently receiving timeout errors when:
- Submitting invoices to ZATCA
- Creating CSR
- Any attempt to connect to ZATCA servers
Error Message:
requests.exceptions.ConnectTimeout: HTTPSConnectionPool(host='gw-fatoora.zatca.gov.sa', port=443): Max retries exceeded with url: /e-invoicing/core/compliance (Caused by ConnectTimeoutError(, 'Connection to gw-fatoora.zatca.gov.sa timed out. (connect timeout=30)'))
Troubleshooting Steps Attempted:
-
Network Diagnostics:
- DNS resolution works correctly (resolves to 185.117.128.50 and 185.117.129.50)
- Can reach ZATCA’s server (gets 405 error in browser)
- Traceroute shows the connection path
-
System Level:
- Cleared DNS cache
- Flushed IP and routing tables
- Restarted all services
- Verified no firewall issues
-
Application Level:
- Completely uninstalled and reinstalled the ZATCA app
- Verified all settings are correct
- Confirmed no recent configuration changes
- Tested with different timeout values
Important Notes:
- The issue occurs consistently across all attempts
- The same error happens from both our VPS and local machines
- Other HTTPS services work fine
- No changes were made to our configuration before this started
- This is blocking our entire invoicing process
Our team urgently needs this resolved as it’s blocking our business operations. Any assistance or guidance would be greatly appreciated.
Additional Details:
- Tax Number (TIN): 302259322100003
- Company Name: Elite Resources Center
- Previously working configuration remains unchanged
Please let me know if you need any additional information or logs to assist with troubleshooting this issue.
Best Regards,
Sarib Arshad Khan.
These are urls
sandbox
https://gw-fatoora.zatca.gov.sa/e-invoicing/developer-portal/
simulation
https://gw-fatoora.zatca.gov.sa/e-invoicing/simulation/
production.
https://gw-fatoora.zatca.gov.sa/e-invoicing/core/
try to telnet to from server console to gw-fatoora.zatca.gov.sa
or curl to https://gw-fatoora.zatca.gov.sa/e-invoicing/simulation/
and make sure it gets a response.
Also, pls note that , zatca may restrict posts from servers outside Saudi IP addresses.
Hi in mycompany page setttings these are the same URLs i have added, and also i am in the saudi region.
it was working fine till thursday.
try to telnet to from server console to gw-fatoora.zatca.gov.sa
or curl to https://gw-fatoora.zatca.gov.sa/e-invoicing/simulation/
and make sure it gets a response.
i ran traceout command and got the following output:-
root@myhost:/home/frappe/frappe-bench# traceroute 185.117.129.50
traceroute to 185.117.129.50 (185.117.129.50), 30 hops max, 60 byte packets
1 169.254.0.1 (169.254.0.1) 0.916 ms 0.875 ms 0.860 ms
2 153.92.3.25 (153.92.3.25) 0.542 ms 1.283 ms 1.196 ms
3 153.92.2.194 (153.92.2.194) 0.523 ms 153.92.2.201 (153.92.2.201) 0.712 ms 153.92.2.194 (153.92.2.194) 0.482 ms
4 153.92.2.135 (153.92.2.135) 0.417 ms 0.403 ms 0.488 ms
5 *
6 be5702.agr62.phx01.atlas.cogentco.com (154.24.33.69) 2.855 ms 1.753 ms be5701.agr61.phx01.atlas.cogentco.com (154.24.32.205) 2.071 ms
7 be3091.ccr32.phx01.atlas.cogentco.com (154.54.161.194) 7.347 ms be3057.ccr31.phx01.atlas.cogentco.com (154.54.161.190) 1.668 ms be2881.ccr32.phx01.atlas.cogentco.com (154.54.161.186) 7.335 ms
8 be5473.ccr22.elp02.atlas.cogentco.com (154.54.166.69) 10.576 ms be5471.ccr21.elp02.atlas.cogentco.com (154.54.166.57) 10.780 ms 10.145 ms
9 be3821.ccr31.dfw01.atlas.cogentco.com (154.54.165.25) 21.385 ms be3846.ccr32.dfw01.atlas.cogentco.com (154.54.165.29) 21.419 ms be3821.ccr31.dfw01.atlas.cogentco.com (154.54.165.25) 21.594 ms
10 port-channel8121.ccr91.jan02.atlas.cogentco.com (154.54.40.250) 28.307 ms 28.288 ms port-channel8122.ccr92.jan02.atlas.cogentco.com (154.54.41.54) 28.212 ms
11 be3704.ccr42.atl01.atlas.cogentco.com (154.54.40.109) 36.166 ms 36.144 ms be3009.ccr41.atl01.atlas.cogentco.com (154.54.29.133) 36.126 ms
12 be2113.ccr42.dca01.atlas.cogentco.com (154.54.24.221) 52.881 ms be2112.ccr41.dca01.atlas.cogentco.com (154.54.7.157) 93.701 ms be2113.ccr42.dca01.atlas.cogentco.com (154.54.24.221) 52.977 ms
13 be3095.ccr41.par01.atlas.cogentco.com (154.54.89.222) 129.941 ms be3111.ccr42.par01.atlas.cogentco.com (154.54.89.226) 129.218 ms be3095.ccr41.par01.atlas.cogentco.com (154.54.89.222) 129.909 ms
14 be7946.ccr42.fra05.atlas.cogentco.com (154.54.72.118) 145.151 ms 144.620 ms be4975.ccr41.fra05.atlas.cogentco.com (154.54.63.69) 140.741 ms
15 be5484.rcr22.fra06.atlas.cogentco.com (130.117.1.2) 138.660 ms be7948.rcr22.fra06.atlas.cogentco.com (154.54.72.125) 140.673 ms be5484.rcr22.fra06.atlas.cogentco.com (130.117.1.2) 138.793 ms
16 be2045.nr71.b015761-1.fra06.atlas.cogentco.com (154.25.11.230) 139.906 ms 139.483 ms 140.098 ms
17 149.11.86.34 (149.11.86.34) 219.699 ms 220.752 ms 219.920 ms
18 *
19 5.42.229.126 (5.42.229.126) 219.600 ms 218.395 ms 218.355 ms
20 *
21 *
22 *
23 *
24 *
25 *
26 *
27 *
28 *
29 *
30 * **
Use curl from server to test
also, 153.92.3.25 is in the USA , and 169.254.0.1 is a private IP. Check your server network settings.
A while ago I updated ZATCA PhaseII
Everything went well
But notice that the Create button has disappeared
That is, after making the invoice, it is not possible to make a refund, for example
The button remains hidden on all old and new invoices, even if you deactivate the API
Do you have any ideas?
Dont think our app has anything to do with create button. We have added Create-PDF-A3 on the menu, but not on create button. Can you bench build once again
My server is in same location as it was before and its been working fine for last 1 and half month, it just stopped working out of no where, we did not even change any settings too,
Can you please tell if its related to the file changed in the recently on your git repo.
Can you please guide, your help in this matter is really needed.
Run this command on server console, and send the response here
curl https://gw-fatoora.zatca.gov.sa/e-invoicing/simulation/
root@myhost:/home/frappe/frappe-bench# curl https://gw-fatoora.zatca.gov.sa/e-invoicing/simulation/
curl: (28) Failed to connect to gw-fatoora.zatca.gov.sa port 443 after 216127 ms: Connection timed out
curl is a direct OS command. nothing to do with Frappe. So you can confirm its a network issue. Either you have some issue with your network, or zatca blocking your IP.
What are the scenarios where Zatca will block my IP?
I have tested this in my local computer its working fine, when i try it in my VPS which i purchased from Hostigner it does not work.
Zatca dont publish their firewall policies. We dont know when they block or how. Some of their training videos suggest ERP machines must be hosted in Saudi Arabia.
Thank you
The problem solved after bench build
Update: Now simplfied invoices ( POS invoices ) will create QR and XML before submitting to Zatca. so if there is connection issue with Zatca , cashier can still issue invoices with QR codes.
This will work with both POS-Awesome and normal POS
Please pull or update, and send your feedback.