privacybydesign / irmajs Goto Github PK
View Code? Open in Web Editor NEWIRMA JavaScript library for attribute verification and issuance
IRMA JavaScript library for attribute verification and issuance
I ran into this when working on nuts-foundation/irma-web-glue#2. I hope you can reproduce it on your end.
Running the irmajs
browser example on iOS results in unpredictable behaviour. I see three different possible end states:
This happens when I kill the IRMA app and go through the disclosure flow.
[Log] Session started – {u: "http://c06098be.ngrok.io/irma/ouuQtsrQDsyZecHg5MQK", irmaqr: "disclosing"} (irma.js, line 9)
[Log] Options: – {server: "http://c06098be.ngrok.io", token: "EtOAB5iY2Du8w8HAyZJD", method: "popup", …} (irma.js, line 9)
{server: "http://c06098be.ngrok.io", token: "EtOAB5iY2Du8w8HAyZJD", method: "popup", language: "en"}Object
[Log] Detected iOS (irma.js, line 9)
[Log] On mobile; using method mobile instead of popup (irma.js, line 9)
[Log] Navigating: – "irma://qr/json/%7B%22u%22%3A%22http%3A%2F%2Fc06098be.ngrok.io%2Firma%2FouuQtsrQDsyZecHg5MQK%22%2C%22irmaqr%22%3A%22disclosing%22%7D" (irma.js, line 9)
[Log] Received server event error – Event {isTrusted: true, type: "error", target: EventSource, …} (irma.js, line 9)
Event {isTrusted: true, type: "error", target: EventSource, currentTarget: EventSource, eventPhase: 2, …}Event
[Log] error in server sent event, falling back to polling: – Event {isTrusted: true, type: "error", target: EventSource, …} (irma.js, line 9)
Event {isTrusted: true, type: "error", target: EventSource, currentTarget: EventSource, eventPhase: 2, …}Event
[Error] Unhandled Promise Rejection: DONE
(anonymous function)
promiseReactionJob
This happens most of the time when I have my IRMA app already open.
[Log] Session started – {u: "http://c06098be.ngrok.io/irma/2iIMsCMdczbnfI5V3tzg", irmaqr: "disclosing"} (irma.js, line 9)
[Log] Options: – {server: "http://c06098be.ngrok.io", token: "6lYEqcr4IUEGaJetQFqy", method: "popup", …} (irma.js, line 9)
{server: "http://c06098be.ngrok.io", token: "6lYEqcr4IUEGaJetQFqy", method: "popup", language: "en"}Object
[Log] Detected iOS (irma.js, line 9)
[Log] On mobile; using method mobile instead of popup (irma.js, line 9)
[Log] Navigating: – "irma://qr/json/%7B%22u%22%3A%22http%3A%2F%2Fc06098be.ngrok.io%2Firma%2F2iIMsCMdczbnfI5V3tzg%22%2C%22irmaqr%22%3A%22disclosing%22%7D" (irma.js, line 9)
[Log] Received server event error – Event {isTrusted: true, type: "error", target: EventSource, …} (irma.js, line 9)
Event {isTrusted: true, type: "error", target: EventSource, currentTarget: EventSource, eventPhase: 2, …}Event
[Log] error in server sent event, falling back to polling: – Event {isTrusted: true, type: "error", target: EventSource, …} (irma.js, line 9)
Event {isTrusted: true, type: "error", target: EventSource, currentTarget: EventSource, eventPhase: 2, …}Event
[Error] Failed to load resource: De bewerking kan niet worden voltooid. Verbinding verbroken door software
[Error] Unhandled Promise Rejection: TypeError: De bewerking kan niet worden voltooid. Verbinding verbroken door software
(anonymous function)
promiseReactionJob
This happens sometimes when I have the IRMA app already open.
[Log] Session started – {u: "http://c06098be.ngrok.io/irma/ar4BibBrDpw8qzvahrvF", irmaqr: "disclosing"} (irma.js, line 9)
[Log] Options: – {server: "http://c06098be.ngrok.io", token: "cKpaJyf6r6Qi3tKTkhbU", method: "popup", …} (irma.js, line 9)
{server: "http://c06098be.ngrok.io", token: "cKpaJyf6r6Qi3tKTkhbU", method: "popup", language: "en"}Object
[Log] Detected iOS (irma.js, line 9)
[Log] On mobile; using method mobile instead of popup (irma.js, line 9)
[Log] Navigating: – "irma://qr/json/%7B%22u%22%3A%22http%3A%2F%2Fc06098be.ngrok.io%2Firma%2Far4BibBrDpw8qzvahrvF%22%2C%22irmaqr%22%3A%22disclosing%22%7D" (irma.js, line 9)
[Log] Received server event error – Event {isTrusted: true, type: "error", target: EventSource, …} (irma.js, line 9)
Event {isTrusted: true, type: "error", target: EventSource, currentTarget: EventSource, eventPhase: 2, …}Event
[Log] error in server sent event, falling back to polling: – Event {isTrusted: true, type: "error", target: EventSource, …} (irma.js, line 9)
Event {isTrusted: true, type: "error", target: EventSource, currentTarget: EventSource, eventPhase: 2, …}Event
[Log] Session state changed – "CONNECTED" – "http://c06098be.ngrok.io/irma/ar4BibBrDpw8qzvahrvF" (irma.js, line 9)
[Log] error in server sent event, falling back to polling: – "no open message received" (irma.js, line 9)
[Log] Received server event error – Event {isTrusted: true, type: "error", target: EventSource, …} (irma.js, line 9)
Event {isTrusted: true, type: "error", target: EventSource, currentTarget: EventSource, eventPhase: 2, …}Event
[Log] Done – {token: "cKpaJyf6r6Qi3tKTkhbU", status: "DONE", type: "disclosing", …} (16f00669.ngrok.io, line 51)
{token: "cKpaJyf6r6Qi3tKTkhbU", status: "DONE", type: "disclosing", proofStatus: "VALID", disclosed: Array}Object
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.
It would be good to updated all dependencies. It would also be good to use a tool like dependabot to automate this process.
Running npm audit
:
Running npm outdated
:
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.