onfido-sdk-ui
onfido-sdk-ui copied to clipboard
disableAnalytics: true causes error during error handling
What was the expected behaviour?
Expected to get some error message after document upload. I intentionally used incorrect token to get some error. In case of incorrect token the expected error seems to be
"Connection lost Please try again"
What happened instead?
Got stuck to blank page with the loading circles.
Error in console: TypeError: On is null
Version info:
- Onfido SDK: 5.9.2
- Browser: FF
Integration configuration:
Onfido.init({
useModal: false,
disableAnalytics: true,
token: "token",
onComplete: function(data) {
// callback for when everything is complete
console.log("everything is complete")
},
steps: [
'welcome',
'document',
{
type: 'face',
options: {
uploadFallback: false
}
},
'complete'
]
});
Steps to reproduce:
Run onfido with the disableAnalytics: true
(above configuration) and intentionally use incorrect token to cause an error.
Demo:
https://jsfiddle.net/57v1rz9s
Hi @anttilbc, what are you passing as an invalid token? I'm unable to reproduce it by using a random string.
Hi @stefaniacardenas, I just appended random char to a working test token but I also tested with random strings and the same happens.
I noticed that I get different error when using chrome: Uncaught TypeError: Cannot read property 'captureException' of null
which actually seems to be the same error but chrome and firefox just report it differently.
It seems that it tries to capture exception for sentry but sentry is not intialised (Because of disableAnalytics I guess?)
Hi @stefaniacardenas, I added jsfiddle to demo this problem: https://jsfiddle.net/57v1rz9s.
Hi @anttilbc, thanks for reporting this issue. I can confirm it's a bug on our side. We will prioritise a fix for this issue in one of the upcoming releases.