Error with IAV example flow


(Bharat Verma) #22

Error: {“code”:“UnexpectedPage”,“message”:“IAV navigated to an unexpected page and was cancelled.”} – Response: undefined
and in console I am getting
GET https://sandbox.dwolla.com/Fi/Token/Search 500 ()
GET https://sandbox.dwolla.com/Content/images/500.png 404 ()


(Luna27) #23

Hi there,
am getting this error:

and this is the script :
$('#start').click(function() { var iavToken = 'Token'; dwolla.configure('sandbox'); dwolla.iav.start(iavToken, { container: 'iavContainer', stylesheets: [ 'http://fonts.googleapis.com/css?family=Lato&subset=latin,latin-ext' ], microDeposits: false }, function(err, res) { console.log('Error: ' + JSON.stringify(err) + ' -- Response: ' + JSON.stringify(res)); }); });

any tip or solution to fix this.!


(Shreya Thapa) #24

Hi @Luna27, are you receiving this error when in Sandbox? We apologize for this roadblock, we appreciate your patience in helping us get you a solution to this! Also, does your application come across this error right at the beginning, or do you see part of the flow successfully?

Thanks.


(Luna27) #25

the message appear after i click the button to add bank, and yes, its Sandbox.

i tried on Mozilla, Chrome and webView in my app, on all browser got the same error.


(Shreya Thapa) #26

Thanks for replying back! Currently, there seems to be an issue with http:// breaking things in some browsers.

Would you please try changing

http://fonts.googleapis.com/css?family=Lato&subset=latin,latin-ext

to

https

and see if that works. Please let us know once you’ve tried it. We are also working to get that exception handled better on our side.


(Luna27) #27

i do that too, but, got the same error, the only browser work its on Edge

on my app browser not working, when i run the html on chrome, mozilla, dont work

when i place the https got this message
DOMException: Failed to execute ‘postMessage’ on ‘Window’: Invalid target origin ‘null’ in a call to ‘postMessage’.

and the unexpectedpage IAV Navigated to an unexpected page and cancelled


(Stephen Ausman) #28

Hey Luna,

I’m having trouble recreating the issue. Are you by chance using the file:/// protocol to access your website? We’ve seen that cause issues before. If that’s the case, you should be able to fix things by serving your site over http or https.

If that’s not it, could you give us some more information about your development setup so we can see if we can recreate the issue? Thanks and sorry for the trouble!


(Luna27) #29

hi, am using file:/// for testing, as i mentionated before if i open the html on Microsft Edge work normally, but if opened with chrome or mozilla or on my app. got the message error


(Stephen Ausman) #30

Ah ok. You’ll need to use something like https://www.npmjs.com/package/http-server to serve the files over http or https due to the behavior of some browsers. Hopefully that fixes it!


(Vitaliy Kravchyshyn) #31

I integrated dwolla.js to react-native app in WebView and I’m getting an error: UnexpectedPage.
Any solutions?

Code:

dwolla.configure('sandbox');
dwolla.iav.start(token, {
    container: 'dwolla',
    microDeposits: false,
    fallbackToMicroDeposits: false,
    backButton: false,
    subscriber: ({ currentPage, error }) => {
        alert('SUCCESS');
        console.log('currentPage:', currentPage, 'error:', JSON.stringify(error))
    }
}, function(err, res) {
    alert(JSON.stringify(err));
    console.log('Error: ' + JSON.stringify(err) + ' -- Response: ' + JSON.stringify(res));
});

(Shreya Thapa) #32

Hi @freevital, there seems to be an issue in IAV sometimes when serving the files. Were you able to go through the flow alright after following the instructions above?

Please let us know if you are still running into this error even after trying the solutions outlined above in the thread. We would love to help you get through this roadblock.


(Vitaliy Kravchyshyn) #33

Hi, @shreya.
No, I get this error when executing code above, namely in the section:

function(err, res) {
    alert(JSON.stringify(err));
    console.log('Error: ' + JSON.stringify(err) + ' -- Response: ' + JSON.stringify(res));
});

(Stephen Ausman) #34

Hey @freevital,

What is the URL of the page where dwolla.iav.start is being called?


(Vitaliy Kravchyshyn) #35

Hi, @stephen.
No URL. I execute that code from WebView component in React Native app.


(Vitaliy Kravchyshyn) #36

@stephen, @shreya Any ideas?


(Stephen Ausman) #37

Hey @freevital, I think that’s why it’s not working. If you load the page over https in the WebView it should work. Sorry for the confusion, I’ll see if we can get a more descriptive error message when that’s the case.


(Vitaliy Kravchyshyn) #38

Please, look at my WebView full content:

<script src="https://cdn.dwolla.com/1/dwolla.js"></script>
<div id="dwolla"></div>
<script>
    dwolla.configure('sandbox');
    dwolla.iav.start('${token}', {
        container: 'dwolla',
        microDeposits: false,
        fallbackToMicroDeposits: false,
        backButton: false,
        subscriber: ({ currentPage, error }) => {
            alert('SUCCESS');
            console.log('currentPage:', currentPage, 'error:', JSON.stringify(error))
        }
    }, function(err, res) {
        alert(JSON.stringify(err));
        console.log('Error: ' + JSON.stringify(err) + ' -- Response: ' + JSON.stringify(res));
    });
</script>

And error:

{
    "code": "UnexpectedPage",
    "message": "IAV navigated to an unexpected page and was cancelled."
}

(Vitaliy Kravchyshyn) #39

What do u mean?


(Spencer Hunter) #40

Hi @freevital, The webpage that hosts the iframe that IAV is rendered in should be loaded via https and not http. Can you confirm that is the case for the webpage loaded within the WebView?


(Vitaliy Kravchyshyn) #41

Hi @spencer. I answered above: It’s not WEBpage. It’s a mobile application on React Native, no URLs there.