privacybydesign / irmajs

IRMA JavaScript library for attribute verification and issuance
10 stars 4 forks source link

Statusevents unsupported by server #7

Closed melvinkoopmans closed 5 years ago

melvinkoopmans commented 5 years ago

The irma.js library makes a call to the IRMA server on /statusevents, line 259 in index.js.

It looks like the server has not implemented this feature as we get a 501 HTTP response with the message:

{"status":501,"error":"UNSUPPORTED","description":"Unsupported by this server"}

We are using the IRMA demo server at: https://metrics.privacybydesign.foundation/irmaserver.

I'm not sure if this is an issue with the server, or that client is calling a deprecated endpoint which used to exist in older versions of the server.

davidv1992 commented 5 years ago

This error is caused by irmajs supporting a feature (server-sent events for status updates) that is not by default enabled on the server, as it can give hard to diagnose issues when using reverse proxies in front of the server. In particular, this feature is not enabled on our demo server.

In order to properly utilize this functionality when it is enabled however, the library tries it before falling back on a more reliable method. This is not causing issues as a normal session with human interactions will take significantly longer than it takes irmajs to detect failure and fall back.

Hence, the observed behaviour is by design.