SDK Crashing before being able to upload Passport photo
#What was the expected behaviour?
After uploading the passport photo, it should proceed to the facial check
What happened instead?
I'm still experiencing the issue from #1165. Users experience a crash before they get to submit the passport photo
I set up sentry.io after submitting the error previously to try and help catch/debug the error. Can still see the Cannot read property 'length' of undefined being reported.
https://sentry.io/share/issue/542956502b1a43d28710f1519e19c8e5/
For reference the sequence of events:
The first two are the user clicking the button to load the modal and fetching the sdk-token to pass to the onfido-sdk
Version info:
- Onfido SDK: 6.0.0
- OS: Windows, Android, IOS
- Browser
- Device
- Node
- Framework or relevant dependencies (if applicable): React
Integration configuration:
onfido = init({
useModal: true,
isModalOpen: true,
onError: () => {
log.error('Error in onfido modal');
log.error(err);
},
onModalRequestClose: () => {
// Update options with the state of the modal
onfido.setOptions({ isModalOpen: false });
onfido.tearDown();
onClose();
},
// the JWT token that you generated earlier on
token,
// id of the element you want to mount the component on
containerId: 'onfido-mount',
onComplete: handleComplete,
userDetails: {
smsNumber: phoneNumber,
},
steps: [
{
type: 'document',
options: {
documentTypes: {
passport: true,
},
},
},
{
type: 'face',
options: {
requestedVariant: 'video',
// Force them to take photo
uploadFallback: false,
},
},
'complete',
],
});
Steps to reproduce:
Haven't managed to reproduce on my end :/
Hi @mistersimon
The configuration you've provided also looks fine as far as we can tell. We've tried reproducing this issue and were also unable to on our end. Was this issue happening consistently only at the passport photo submission step and regardless of browser/device?
Hi @kopijunkie,
Thanks for looking into the issue.
From what I can see the users can't seem to get past the passport photo submission step. I've checked some cases using the onfido API, and I can see they have uploaded passports but not done the selfie step. Seems odd that they would upload their passport photo but not take the selfie - which supports the theory its crashing on the passport photo submission.
On the browser/device: Actually since moving to v6.0.0 (and installing sentry) I'm only seeing this for windows 7+10.
Any advice on what I can do to debug this better? Would it be worth jumping on a call to share more details?
Thanks, Simon
Hi @mistersimon,
Could you please try using the user tracked events we expose to integrators to try and determine which screen the crash is happening at. https://github.com/onfido/onfido-sdk-ui#user-analytics? This should help you /us in debugging the issue.
Our SDK team is available meeting between 2-4.30pm BST. Could you please share with us your availability?
Kind regards, Andra
Hi @andra-radu,
May I suggest we wait a while with the call? We've just set up the event tracking so perhaps once thats working it would be a more informative conversation.
I'll reach out once I've got some data to share.
Thanks for you help! Simon
Hi @mistersimon,
Sure. Please let us know how it goes.
Kind regards, Andra
Hi,
We managed to capture some of the events in sentry. Seems that only 1 event is produced before crashing:

Also some feedback from a user:
The website is not letting me upload my passport picture, either by pressing "Continue on phone" or "or upload photo – no scans or photocopies" the popup doesn't change, only a "Back" button appears on the top left corner, and it doesn't do anything. I tried different browsers and computers with no luck, can you help me with this?
With regards to the call 2pm BST would work best for me (based in Singapore), and any day is suitable at this time.
Thanks, Simon [email protected]
Hi @mistersimon
Thank you for the further info. If you're available on Thursday at 2pm BST we can have the call then. We'll get in touch with you directly to set up a Zoom call.
Thursday 2pm BST works for me! Will await the invite.
Hi @mistersimon, Would it be possible to please share with us your email address associated with your Onfido account so that I can send you the invite?
Looking forward to hear from you.
Kind regards, Andra
Sure! [email protected]
On Wed, 28 Oct 2020, 20:19 andra-radu, [email protected] wrote:
Hi @mistersimon https://github.com/mistersimon, Would it be possible to please share with us your email address associated with your Onfido account so that I can send you the invite?
Looking forward to hear from you.
Kind regards, Andra
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/onfido/onfido-sdk-ui/issues/1199#issuecomment-717895813, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAF6NN35K75ZW7DRLSYPQ63SNAD5LANCNFSM4SF5POCA .
Hi @mistersimon
Just following up on this to check if you're still seeing this issue crop up since making the change to have uploadFallback enabled from our discussion during the call?
Hi @kopijunkie,
Yes we are still seeing this issue come up. (Still seeing the same error on Sentry and behaviour)
We did change to uploadFallback: true, and while we perhaps seeing a slightly lower error rate im not sure its correlated.
Any ideas on your end?
Thanks, Simon
Hi @hodlnaut
Unfortunately no ideas from our end. The initialisation code shared with us privately looked fine and we've not been able to replicate the issue still. Looking through our Sentry logs there doesn't seem to be any occurrences of the error either.
Hi @kopijunkie,
We have made some improvements to our build system, and are getting the onfido source maps into our code now. There's a little more info where the error is happening, and hopefully you can make some sense of it.

https://sentry.io/share/issue/81cf0a2134744a42813abbb8edf896d2/
Hi @mistersimon
Thank you for the additional info. We'll try to look further and see if we can identify the issue.