Notice: The Monaca & Onsen UI Community Forum is shutting down.
For Onsen UI bug reports, feature requests and questions, please use the Onsen UI GitHub issues page. For help with Monaca, please contact Monaca Support Team.
Thank you to all our community for your contributions to the forum. We look forward to hearing from you in the new communication channels.
resetToPage return exception on React version of OnsenUI 2
-
Hi guys,
I try to useresetToPage
method of a navigator in Meteor and React version of OnsenUI but it’s return bellow exception to me:Exception in delivering result of invoking 'login': handleClick/<@http://localhost:5000/app/app.js?hash=d2c5e2d97d01d44113c94c08fecb93a66230b14f:151:21 userCallback@http://localhost:5000/packages/accounts-password.js?hash=993cf226d269f65205aae85dbc3583a2c8742bb9:105:23 require<.node_modules.meteor["accounts-base"]["accounts_client.js"]</Ap.callLoginMethod/loginCallbacks<@http://localhost:5000/packages/accounts-base.js?hash=c7424d0534b3e239924ddf5240aec393f9456506:299:5 _.once/<@http://localhost:5000/packages/underscore.js?hash=27b3d669b418de8577518760446467e6ff429b1e:794:14 loggedInAndDataReadyCallback@http://localhost:5000/packages/accounts-base.js?hash=c7424d0534b3e239924ddf5240aec393f9456506:411:5 Meteor.bindEnvironment/<@http://localhost:5000/packages/meteor.js?hash=ae8b8affa9680bf9720bd8f7fa112f13a62f71c3:1105:17 ._maybeInvokeCallback@http://localhost:5000/packages/ddp-client.js?hash=27502404fad7fc072e57e8b0b6719f40d92709c7:3557:7 .receiveResult@http://localhost:5000/packages/ddp-client.js?hash=27502404fad7fc072e57e8b0b6719f40d92709c7:3577:5 ._livedata_result@http://localhost:5000/packages/ddp-client.js?hash=27502404fad7fc072e57e8b0b6719f40d92709c7:4742:7 Connection/onMessage@http://localhost:5000/packages/ddp-client.js?hash=27502404fad7fc072e57e8b0b6719f40d92709c7:3385:7 ._launchConnection/self.socket.onmessage/<@http://localhost:5000/packages/ddp-client.js?hash=27502404fad7fc072e57e8b0b6719f40d92709c7:2736:11 _.forEach@http://localhost:5000/packages/underscore.js?hash=27b3d669b418de8577518760446467e6ff429b1e:149:7 ._launchConnection/self.socket.onmessage@http://localhost:5000/packages/ddp-client.js?hash=27502404fad7fc072e57e8b0b6719f40d92709c7:2735:9 REventTarget.prototype.dispatchEvent@http://localhost:5000/packages/ddp-client.js?hash=27502404fad7fc072e57e8b0b6719f40d92709c7:175:9 SockJS.prototype._dispatchMessage@http://localhost:5000/packages/ddp-client.js?hash=27502404fad7fc072e57e8b0b6719f40d92709c7:1160:5 SockJS.prototype._didMessage@http://localhost:5000/packages/ddp-client.js?hash=27502404fad7fc072e57e8b0b6719f40d92709c7:1218:13 SockJS.websocket/that.ws.onmessage@http://localhost:5000/packages/ddp-client.js?hash=27502404fad7fc072e57e8b0b6719f40d92709c7:1365:9
This is my code:
Meteor.loginWithPassword(this.state.username, this.state.password, (err) => { if (err) { console.log(err); } else { this.props.navigator.resetToPage({ // <================== HERE (resetToPage return above exception but pushPage worked well without any issue) component: userProfile, key: 'User_Profile_Index' }); } });
resetToPage
return above exception butpushPage
worked well without any issue. What is the issue?
IsresetToPage
has any error or bug on React version?
-
@cyclops24 Can you try with
resetPage
instead ofresetToPage
? I think the one in React differs a little bit, I don’t know exactly why.
-
Thanks @Fran-Diox ,
YesresetPage
works well, I think it’s better to refactor this or add some documentation.Anyway thanks for your attention man.