Giter VIP home page Giter VIP logo

irmajs's People

Contributors

bobhageman avatar confiks avatar davidv1992 avatar ivard avatar sebastiaannijland avatar sietseringers avatar timendus avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

irmajs's Issues

Disclosure flow on iOS sometimes results in promise rejection

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:

1. Rejected promise "DONE"

This happens when I kill the IRMA app and go through the disclosure flow.

IMG_40C98354E27C-1

Safari console

[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

2. Rejected promise with connection error

This happens most of the time when I have my IRMA app already open.

IMG_2D3C208D3F2F-1

Safari console

[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

3. Resolved promise (as intended)

This happens sometimes when I have the IRMA app already open.

IMG_43C3552B7C60-1

Safari console

[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

Statusevents unsupported by server

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.