Troubleshooting
This document serves as a guide for the most common issues developers may encounter when implementing solutions within the gov.gr ecosystem. It is part of the official technical documentation and includes recommended solutions to frequent problems during the development of gov.gr applications.
Error: Invalid redirect_uri
- Description: The
redirect URIused in theOAuth/OpenIDflow is not registered with theprovider. - Solution: Confirm that the
URIis registered on the platform (GSISor otherIdentity Provider). - Tip: Watch out for
trailing slashesor mismatches betweenhttpandhttps.
Error: Expired Token
- Description: The
access tokenhas expired. - Solution: Use the
refresh tokenflow. - Tip: Don’t rely on long-lived
tokens. Get newtokensbefore expiration.
Error: 401 Unauthorized in Web Service
- Description: A call to a
SOAP APIis rejected due to badcredentialsor incorrectauthentication header. - Solution: Make sure you're using the correct
username/passwordand sending them withBasic Authheader. - Tip: Check the
SSL certificatesand the formatting ofSOAP headers.
Error: JSON Parse Error in API Response
- Description: The
API responseismalformedor not inJSONformat. - Solution: If the
responseisSOAP/XML, usexmltodictor a similar library. - Tip: Always wrap
parsingintry/catchand uselogging.
Local Testing Errors
- Description: The
login redirectdoesn't work correctly in thelocalenvironment. - Solution: Make sure you've declared the
local redirect URI(e.g.http://localhost:8000/authorize/) in the service. - Tip: For
Django, check if there's aconflictwith theCSRF middleware.
User with Same VAT Number Cannot Log In
- Description: If a user with the same
VAT number(AFM/vat_number) already exists and a newloginis attempted, it fails. - Solution: Delete the existing user or clear the
nullvalue of thevat_numberfield from thedatabase. - Tip: This mostly applies to
local testingwithsocial-auth-gsis.
