Getline-Network / getline

Distributed P2P Lending System
https://getline.in
Apache License 2.0
9 stars 6 forks source link

[front-end] crashes when connected to wrong network without a visible user error #42

Closed ritave closed 6 years ago

ritave commented 6 years ago

When connected to any other network other than Rinkeby, the front-end crashes, showing no visible error to the user. Changing the network doesn't resolve the issue, a refresh is needed.

Uncaught (in promise) Error: web3 is connected to wrong network
    at new s (app.e16483494b1250262f36.js:16)
    at new s (app.e16483494b1250262f36.js:1)
    at Object.init (app.e16483494b1250262f36.js:16)
    at Object.<anonymous> (app.e16483494b1250262f36.js:16)
    at Generator.next (<anonymous>)
    at app.e16483494b1250262f36.js:16
    at new Promise (<anonymous>)
    at c (app.e16483494b1250262f36.js:16)
    at setTimeout (app.e16483494b1250262f36.js:16)
s @ app.e16483494b1250262f36.js:16
s @ app.e16483494b1250262f36.js:1
init @ app.e16483494b1250262f36.js:16
(anonymous) @ app.e16483494b1250262f36.js:16
(anonymous) @ app.e16483494b1250262f36.js:16
c @ app.e16483494b1250262f36.js:16
setTimeout @ app.e16483494b1250262f36.js:16
setTimeout (async)
x35b @ app.e16483494b1250262f36.js:16
n @ manifest.ae31751258e1833ee059.js:1
window.webpackJsonp @ manifest.ae31751258e1833ee059.js:1
(anonymous) @ app.e16483494b1250262f36.js:1
app.e16483494b1250262f36.js:1 Uncaught (in promise) TypeError: Cannot read property 'currentUser' of undefined
    at o.<anonymous> (app.e16483494b1250262f36.js:1)
    at Generator.next (<anonymous>)
    at app.e16483494b1250262f36.js:1
    at new Promise (<anonymous>)
    at LYHj.i (app.e16483494b1250262f36.js:1)
    at setTimeout (app.e16483494b1250262f36.js:1)
q3k commented 6 years ago

The second snippet is unrelated - it's due to a page load race condition that we've fixed in #43

q3k commented 6 years ago

Verified, works now.