Pritunl SAML Issue w/ WSO2 Identity Server

Pritunl SAML is not working with WSO2 Identity Server. When I click Sign In With SAML it gives me a 500 Internal Server Error on the sso/request page. The Pritunl log does not provide much context about the SAML connection issue.

[snowy-plains-5952][2023-01-18 02:36:21,356][ERROR] Saml auth server error
  status_code = 500
  content     = "b''"
Traceback (most recent call last):
  File "/usr/lib/python3.9/threading.py", line 912, in _bootstrap
    self._bootstrap_inner()
  File "/usr/lib/python3.9/threading.py", line 954, in _bootstrap_inner
    self.run()
  File "/usr/lib/pritunl/lib/python3.9/site-packages/cheroot/workers/threadpool.py", line 125, in run
    keep_conn_open = conn.communicate()
  File "/usr/lib/pritunl/lib/python3.9/site-packages/cheroot/server.py", line 1300, in communicate
    req.respond()
  File "/usr/lib/pritunl/lib/python3.9/site-packages/cheroot/server.py", line 1090, in respond
    self.server.gateway(self).respond()
  File "/usr/lib/pritunl/lib/python3.9/site-packages/cheroot/wsgi.py", line 140, in respond
    response = self.req.server.wsgi_app(self.env, self.start_response)
  File "/usr/lib/pritunl/lib/python3.9/site-packages/flask/app.py", line 2091, in __call__
    return self.wsgi_app(environ, start_response)
  File "/usr/lib/pritunl/lib/python3.9/site-packages/flask/app.py", line 2073, in wsgi_app
    response = self.full_dispatch_request()
  File "/usr/lib/pritunl/lib/python3.9/site-packages/flask/app.py", line 1516, in full_dispatch_request
    rv = self.dispatch_request()
  File "/usr/lib/pritunl/lib/python3.9/site-packages/flask/app.py", line 1502, in dispatch_request
    return self.ensure_sync(self.view_functions[rule.endpoint])(**req.view_args)
  File "/usr/lib/pritunl/lib/python3.9/site-packages/pritunl-1.30.3388.46-py3.9.egg/pritunl/auth/app.py", line 26, in _wrapped
    return call(*args, **kwargs)
  File "/usr/lib/pritunl/lib/python3.9/site-packages/pritunl-1.30.3388.46-py3.9.egg/pritunl/handlers/sso.py", line 440, in sso_request_get
    logger.error('Saml auth server error', 'sso',
  File "/usr/lib/pritunl/lib/python3.9/site-packages/pritunl-1.30.3388.46-py3.9.egg/pritunl/logger/__init__.py", line 55, in error
    kwargs['traceback'] = traceback.format_stack()

WSO2 Identity Server log does not output any connection from Pritunl VPN server during the SAML connection. However, it the SAML connection is working between the VPN and Nextcloud service. The Pritunl Web Server is running behind a firewall and not exposed to the public internet. The only way to access the VPN web service, is through the VPN. What could the problem be? And what are some potential solutions?

I’m running

Pritunl v1.30.3388.46 d92ab2 (ARM64)

on

Raspberry OS 10

I had this error because the SAML Cert block was missing the -----BEGIN CERTIFICATE----- and -----END CERTIFICATE----- strings. adding this fixed.