Dear SOGo community,When trying to have SOGo authenticate and authorize a user using xoauth2, I find the following error in the SOGo server log:
ERROR: null value in column "c_access_token_expires_in" of relation "sogo_openid" violates not-null constraint
However, when I look at the token I received from the identity provider, I do see the "expires_in" field with the value 600:
sogod[243522:243522] fetch token response: {"access_token" = "..."; "expires_in" = 600; "id_token" = "..."; scope = "openid profile email"; "token_type" = Bearer; }
You’ll find the full stack trace of the error below. Why is SOGo unable to read the "expires_in" value and insert it into the "sogo_openid" table in column "c_access_token_expires_in"?
I would greatly appreciate your help. Best regards Markus Grandpré ---------- 8< -----------2025-06-10 10:16:14.988 sogod[243522:243522] fetch token response: {"access_token" = "AAdzZWNyZXQxJEqfOc8hn6mtswfJVwPCPZ7aNkqWEZqzqZkGRMY_PpQoRZPsS2Pf3rdRl0wb5VzUPpuJMuT_VNoJoxoSDVFELwA2sqeulK749qlnapiLMvOg_k2j_pBwBa8YdfW8CwtS5wBRPrMYSa8m07mjeImR_aB-AUHbLaUx38CvW1Z1qmcQYD354sNscp0RoSrsaldnYiBJRnt_-Nyvz2Jq5uWhU8f70g1uKS8aWdLZ5gXAFrTR_D3RQ0xnrVKTKSFwXYeNhfemVLpWC9BcSHrbKGvZ39y24Zj8mWsT4JAmDJBACl4rzlZPmV7buQHlmAvEIhrWBazvDHgO6cETpwnD6Y6tVkQGkypzOpDWTQxjjCxIP38sHc69dIEwH4KLq-QETyvG0PF9dB69P5d-EbQLC8hz9oZVOXHOd4tjJfhSz5-e-pyuD7irz3aK1kXFdR6kG27fKgkt4732rxBHk_SKww"; "expires_in" = 600; "id_token" = "eyJraWQiOiJkZWZhdWx0UlNBU2lnbiIsImFsZyI6IlJTNTEyIn0.eyJhdF9oYXNoIjoiWEtteWNZaHdkVG1JUm9MbzFnTnM2cDlidDRXS3Y2NHpaS1dCaDJteTctSSIsInN1YiI6ImZiNGVkZDdmN2IyNDc5ODY3NDNiYzQ3NDM4NTUzZDUwIiwiYXVkIjoiX2ExM2ExZmMyMjg5N2Q0MzgxOWZhMGUxY2VmZjExMWNjIiwiYXV0aF90aW1lIjoxNzQ5NTQzMzcxLCJpc3MiOiJodHRwczovL2lkcC10ZXN0LnVuaS1rb25zdGFuei5kZSIsImV4cCI6MTc0OTU0Njk3NCwiaWF0IjoxNzQ5NTQzMzc0LCJzaWQiOiJfMGZiMmNmMjAyNzZhOGJiYjgwYjlmYzcxZGY1NmRhYjcifQ.WbDkIhkkNe2nBs2RWEzP-eGGMrBZ6V_kY_OiG5jBvmtZgfXboCOyT-t9rKxtsFPkNVLnwnHJF4u58cw5XZcCVj4vzELC6YpVIxpM9nOZ0VCR8mleQILiZez8ETNp4XT8m-quoPf9dw-2t_jXcLf4qSNQiE6qMhyDEsfdyJtNTQl8skkYGKgcPo_WWYjfVy2cShlseIrybmb9Zc5hjgMus_h8TWISYtDdGBwDvLCRLWW63Mf0jw8uCOZzLUuqRVzrpiHdaOBvOCQ5gNXm3X2-ymg0X_EmQbTR8ITg1-4tCPpEGDxofft9E4j7M5TceVqbrmB3AhtehdFoxWMkOLQairUC8OFsttYcVI9akRRJ1TF8sgWekst33dYIpJvjPGiPfK-SL2S94gmnvzKGNt4EDugef37wzwzRMtb2GgUx0Z-0z2SSol0jXg14s27KNdY5VR6FdhynRK94BZzZX_5GgUOqq7Fh90_P0SjE1msqpdQcaNh91vU2t5PhBBWVYb_X"; scope = "openid profile email"; "token_type" = Bearer; } 2025-06-10 10:16:14.988 sogod[243522:243522] OpenId perform request: GET https://idp-test.uni-konstanz.de/idp/profile/oidc/userinfo 2025-06-10 10:16:14.988 sogod[243522:243522] OpenId perform request, headers {authorization = "Bearer AAdzZWNyZXQxJEqfOc8hn6mtswfJVwPCPZ7aNkqWEZqzqZkGRMY_PpQoRZPsS2Pf3rdRl0wb5VzUPpuJMuT_VNoJoxoSDVFELwA2sqeulK749qlnapiLMvOg_k2j_pBwBa8YdfW8CwtS5wBRPrMYSa8m07mjeImR_aB-AUHbLaUx38CvW1Z1qmcQYD354sNscp0RoSrsaldnYiBJRnt_-Nyvz2Jq5uWhU8f70g1uKS8aWdLZ5gXAFrTR_D3RQ0xnrVKTKSFwXYeNhfemVLpWC9BcSHrbKGvZ39y24Zj8mWsT4JAmDJBACl4rzlZPmV7buQHlmAvEIhrWBazvDHgO6cETpwnD6Y6tVkQGkypzOpDWTQxjjCxIP38sHc69dIEwH4KLq-QETyvG0PF9dB69P5d-EbQLC8hz9oZVOXHOd4tjJfhSz5-e-pyuD7irz3aK1kXFdR6kG27fKgkt4732rxBHk_SKww"; "content-type" = "application/x-www-form-urlencoded"; } 2025-06-10 10:16:15.490 sogod[243522:243522] OpenId fetch user info, profile is {eduPersonEntitlement = "urn:mace:dir:entitlement:common-lib-terms"; eduPersonPrincipalName = "andreas.di...@uni-konstanz.de"; eduPersonScopedAffiliation = "mem...@uni-konstanz.de"; email = "andreas.di...@uni-konstanz.de"; "family_name" = Dietz; "given_name" = Andreas; name = "Andreas Dietz"; "preferred_username" = pop519315; sub = fb4edd7f7b247986743bc47438553d50; } Jun 10 10:16:15 sogod [243522]: [ERROR] <0x0x56368057a7f0[GCSOpenIdFolder]> -[GCSOpenIdFolder writeOpenIdSession:withOldSession:withRefreshToken:withExpire:withRefreshExpire:]: cannot write record: <PostgreSQL72Exception: 0x5636807ad820> NAME:PostgreSQL72FatalError REASON:fatal pgsql error (channel=<0x0x5636806902b0[PostgreSQL72Channel]: connection=<0x0x563680766ff0[PGConnection]: connection=0x0x5636807671a0>>): ERROR: null value in column "c_access_token_expires_in" of relation "sogo_openid" violates not-null constraint DETAIL: Failing row contains (AAdzZWNyZXQxJEqfOc8hn6mtswfJVwPCPZ7aNkqWEZqzqZkGRMY_PpQoRZPsS2Pf..., , 1749543375, null, null, null).
---------- >8 ----------- -- Markus Ludwig Grandpré Universität Konstanz Kommunikations-, Informations-, Medienzentrum (KIM) Abteilung IT-Dienste Forschung und Lehre, B803, Tel: +49 7531 88 4342
smime.p7s
Description: Kryptografische S/MIME-Signatur