GetScatter / scatter-js

Importable JavaScript library that allows web applications to directly interface with Scatter Desktop, Classic and Mobile.
MIT License
262 stars 148 forks source link

Scatter can't connect in a new blank Tab #134

Open icelanDesert opened 5 years ago

icelanDesert commented 5 years ago

Scatter always can't connect when my dapp open a new black tab, after refresh page some times, it may be connected well. This problem appeared after I Scatter desktop update to v11.0.0

ScatterJS.scatter.connect('dapp').then(connected => {
        if (!connected) {
          return false
        }
        if (!this.$store.state.isPC) {
          const requiredFields = {
            accounts: [ NETWORK ]
          }
          ScatterJS.scatter.getIdentity(requiredFields).then(() => {
            this.$store.dispatch('setScatter', { scatter: ScatterJS.scatter })
          })
        }
      })

this is my code to connect Scatter is there some thing wrong?

nsjames commented 5 years ago

This was a problem in 11.0.0 which was fixed in 11.0.1. Check if you've updated since then

icelanDesert commented 5 years ago

thanky you, new version works good

icelanDesert commented 5 years ago

This was a problem in 11.0.0 which was fixed in 11.0.1. Check if you've updated since then

There is another problem. Same code Scatterjs just can't connect in some people's computer, authorization window won't appear , even they use the latest Scatter desktop. But if I use websock manually, it could be connected.

image

nsjames commented 5 years ago

I'd update your packages. There was a connection bug which might have been affecting you.

ifunsu commented 4 years ago

Hi, I have something to show. Here is the detail: 1 Server page from tomcat embeded in spring boot. 2 Windows 10+chrome browser connect Scatter desktop client(v12 updated from v9 then v11). Scatter connect faild, error promot due to "NET::ERR_CERT_DATE_INVALID".(availabled until 19/03/2020, maybe I install v9 on 19/09/2019), I can't find way to delete that pem from system. I have try to uninstall then install, same result is got. I don't know the result beyond v12 because I don't go that far then. 3 Ubuntu 18.04.03 LTS with Scatter v11 work fine. 4 Ubuntu 18.04.04 LTS with Scatter v11 work faild. Then I install v12, it still fail again. Through install I delete .config/scatter to make sure that it's a fresh install. I can telnet to port 50006 from terminal but I can't connect to https://local.get-scatter.com:50006 by Firefox(version by system). It said "The connection was reset." I try to disable IPV6 but netstat show that it still listen on port 50006 at tcpv6.

Js code like "ScatterJS.scatter.connect('dapp').then(connected => { ..." as sample code.

Thanks.