Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dApp keeps redirecting to splash screen after connecting #1232

Closed
taleldayekh opened this issue Mar 26, 2020 · 7 comments · Fixed by #1245
Closed

dApp keeps redirecting to splash screen after connecting #1232

taleldayekh opened this issue Mar 26, 2020 · 7 comments · Fixed by #1245
Labels
bug 🕷️ Something isn't working

Comments

@taleldayekh
Copy link
Contributor

Steps to Reproduce

  1. Pull the latest master as of 26/3/2020
  2. Press connect

Expected Result

  • dApp connecting using my chosen MetaMask account or a dedicated Raiden account and then redirect to the transfer screen.

Actual Result

  • dApp connects and briefly displays the transfer screen before redirecting back to the splash screen.

Additional Infos (Optional)

Creating a completely fresh account did not help
Running npm ci did not help

Console displays:
Screenshot 2020-03-26 at 10 28 37

Logs:
raiden_2020-03-26T09_41_03.178Z.log

@taleldayekh taleldayekh added the bug 🕷️ Something isn't working label Mar 26, 2020
@andrevmatos
Copy link
Contributor

@taleldayekh setLevel is called only in two places, and the most probably instance of this issue seems to be the getter for log in the Raiden public interface. This would only fail if something at initialization went wrong, and this error seems to be masking the actual issue. I'll make a PR to improve on this, please, keep the account & state triggering this issue around, so we can investigate.
Thanks for the report.

@andrevmatos
Copy link
Contributor

The other instance (matrix-js-sdk logger) would only happen if you're out of sync with raiden-ts's package.json, which requires matrix-js-sdk 5.1+, which changed the logger export there. Any chance of this being the case?

@andrevmatos
Copy link
Contributor

andrevmatos commented Mar 27, 2020

@taleldayekh can you try same account & state on #1245 , please? Please, do in the following order:

  • npm ci on raiden-ts
  • npm ci on raiden-dapp
  • npm run serve
  • go to dApp, but before Connecting, go to DevTools, Application, and clear IndexedDB
  • Connect & reproduce
  • Upon seeing raidenShutdown action, double-click on reason and copy the error's stack (to be sure, as it should now be properly stored in the stored logs on my PR), paste the error above here together with the file from Stored logs

@nephix
Copy link
Contributor

nephix commented Mar 27, 2020

With these steps I get the following migration error in the console on #1245, but I think it's related to my state being corrupted by #1221 already since we introduced there the v2 migration

logger.js?1227:49 Error validating migrated state version=2 {address: "0x9FaA6E564c5Db01897C15d0085a30b32B9248360", version: 2, chainId: 5, registry: "0x9b0c8C8C75904CEf5B7a8dbF59c3459Ea85c6526", blockNumber: 2413178, …}address: "0x9FaA6E564c5Db01897C15d0085a30b32B9248360"version: 2chainId: 5registry: "0x9b0c8C8C75904CEf5B7a8dbF59c3459Ea85c6526"blockNumber: 2413178config: {pfsSafetyMargin: 1.1, pfs: "https://pfs.raidentransport.test001.env.raiden.network", matrixServer: "https://raidentransport.test001.env.raiden.network"}channels: {0x2001E8851d33CA476e209e37ED8db1BB9E72334F: {…}}tokens: {0xE2b702eD684bEb02850ac604278f078A4ce8b6E6: "0x2001E8851d33CA476e209e37ED8db1BB9E72334F"}transport: {matrix: {…}}sent: {}received: {0x87d02ea8e5f0cd2893697da33e3b2de00be2f68b3a950ad43fbe5711ba023d85: {…}}path: {iou: {…}}pendingTxs: []proto: Object
eval @ logger.js?1227:49
eval @ logstore.ts?80a1:68
decodeRaidenState @ state.ts?d859:107
_callee$ @ state.ts?d859:230
tryCatch @ runtime.js?98b8:45
invoke @ runtime.js?98b8:274
prototype. @ runtime.js?98b8:97
fulfilled @ state.js:43
Promise.then (async)
step @ state.js:58
eval @ state.js:61
__awaiter @ state.js:40
getState @ state.ts?d859:196
_callee22$ @ raiden.ts?21d6:317
tryCatch @ runtime.js?98b8:45
invoke @ runtime.js?98b8:274
prototype. @ runtime.js?98b8:97
fulfilled @ raiden.js:88
Promise.then (async)
step @ raiden.js:103
fulfilled @ raiden.js:88
Promise.then (async)
step @ raiden.js:103
eval @ raiden.js:106
__awaiter @ raiden.js:85
create @ raiden.ts?21d6:293
_callee22$ @ raiden-service.ts?863e:29
tryCatch @ runtime.js?98b8:45
invoke @ runtime.js?98b8:274
prototype. @ runtime.js?98b8:97
asyncGeneratorStep @ raiden-service.ts:52
_next @ raiden-service.ts:54
eval @ raiden-service.ts:54
eval @ raiden-service.ts:54
createRaiden @ raiden-service.ts:1040
_callee3$ @ raiden-service.ts?863e:110
tryCatch @ runtime.js?98b8:45
invoke @ runtime.js?98b8:274
prototype. @ runtime.js?98b8:97
asyncGeneratorStep @ raiden-service.ts:52
_next @ raiden-service.ts:54
Promise.then (async)
asyncGeneratorStep @ raiden-service.ts:52
_next @ raiden-service.ts:54
eval @ raiden-service.ts:54
eval @ raiden-service.ts:54
connect @ raiden-service.ts?863e:184
_callee$ @ App.vue?0ed1:85
tryCatch @ runtime.js?98b8:45
invoke @ runtime.js?98b8:274
prototype. @ runtime.js?98b8:97
asyncGeneratorStep @ cjs.js?!./node_modules/babel-loader/lib/index.js!./node_modules/ts-loader/index.js?!./node_modules/vuetify-loader/lib/loader.js?!./node_modules/cache-loader/dist/cjs.js?!./node_modules/vue-loader/lib/index.js?!./src/App.vue?vue&type=script&lang=ts&:17
_next @ cjs.js?!./node_modules/babel-loader/lib/index.js!./node_modules/ts-loader/index.js?!./node_modules/vuetify-loader/lib/loader.js?!./node_modules/cache-loader/dist/cjs.js?!./node_modules/vue-loader/lib/index.js?!./src/App.vue?vue&type=script&lang=ts&:19
eval @ cjs.js?!./node_modules/babel-loader/lib/index.js!./node_modules/ts-loader/index.js?!./node_modules/vuetify-loader/lib/loader.js?!./node_modules/cache-loader/dist/cjs.js?!./node_modules/vue-loader/lib/index.js?!./src/App.vue?vue&type=script&lang=ts&:19
eval @ cjs.js?!./node_modules/babel-loader/lib/index.js!./node_modules/ts-loader/index.js?!./node_modules/vuetify-loader/lib/loader.js?!./node_modules/cache-loader/dist/cjs.js?!./node_modules/vue-loader/lib/index.js?!./src/App.vue?vue&type=script&lang=ts&:19
connect @ App.vue?0ed1:49
invokeWithErrorHandling @ vue.runtime.esm.js?27b9:1854
invoker @ vue.runtime.esm.js?27b9:2179
invokeWithErrorHandling @ vue.runtime.esm.js?27b9:1854
Vue.$emit @ vue.runtime.esm.js?27b9:3888
emit @ vue-property-decorator.js?846b:233
emitter @ vue-property-decorator.js?846b:253
click @ SplashScreen.vue?fe6c:63
invokeWithErrorHandling @ vue.runtime.esm.js?27b9:1854
invoker @ vue.runtime.esm.js?27b9:2179
invokeWithErrorHandling @ vue.runtime.esm.js?27b9:1854
Vue.$emit @ vue.runtime.esm.js?27b9:3888
emit @ vue-property-decorator.js?846b:233
emitter @ vue-property-decorator.js?846b:253
click @ ActionButton.vue?4460:31
invokeWithErrorHandling @ vue.runtime.esm.js?27b9:1854
invoker @ vue.runtime.esm.js?27b9:2179
invokeWithErrorHandling @ vue.runtime.esm.js?27b9:1854
Vue.$emit @ vue.runtime.esm.js?27b9:3888
click @ VBtn.ts?0eff:156
invokeWithErrorHandling @ vue.runtime.esm.js?27b9:1854
invoker @ vue.runtime.esm.js?27b9:2179
original._wrapper @ vue.runtime.esm.js?27b9:6917
Show 36 more frames

@taleldayekh
Copy link
Contributor Author

@taleldayekh can you try same account & state on #1245

I followed your steps and cannot reproduce, it seems to work fine. The onlyraidenShutdown reason I get is providerAccountChanged when shifting between accounts but that is expected.

@andrevmatos
Copy link
Contributor

@nephix your error is specifically on state version=2, which is the WIP Receive branch. It means you tried to load the state you were testing on that branch, on master on on another branch. Notice our migration doesn't support downgrades, only ugprades, so state/account you used on that branch shouldn't be used on a previous branch or master, or you'll get these validation errors.

@nephix
Copy link
Contributor

nephix commented Mar 27, 2020

Yeah that's what I thought too

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🕷️ Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants