You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
block .number and others do not show, instead a blank page appears.
js code snippet:
<script src="https://cdn.ethers.io/scripts/ethers-app-v0.4.min.js"
charset="utf-8" type="text/javascript">
</script>
<script>
var provider = ethers.getDefaultProvider('ropsten');
console.log(provider);
some code...
<script>
```
This is what the browser console shows:
[Ethers Container] Found Fragment URL: http://127.0.0.1:8080/" ropsten.ethers.io:186:847
[Ethers Container] Connected Provider: network=ropsten, chainId=3 ropsten.ethers.io:186:847
[Ethers Container] Initial Account: null ropsten.ethers.io:186:847
[Ethers Container] Ready ropsten.ethers.io:186:847
unreachable code after return statement ropsten.ethers.io:184:250325
Object { https: true, httpsAutoUpgrade: true, privacyScore: 2, entitiesBlocked: Object, entitiesNotBlocked: Object, scores: null } background.js:20780:25
tab.status: complete. site took 0.694 seconds to load. background.js:19350:13
The character encoding of the HTML document was not declared. The document will render with garbled text in some browser configurations if the document contains characters from outside the US-ASCII range. The character encoding of the page must be declared in the document or in the transfer protocol. ropsten.ethers.io
"[Ethers Container] Loaded: http://127.0.0.1:8080/" ropsten.ethers.io:186:847
[Ethers Client Library] Connected to Ethers Wallet Container: network=testnet ethers-app- v0.4.min.js:1:798
[Ethers Client Library] Ready ethers-app-v0.4.min.js:1:798
TypeError: ethers.getDefaultProvider is not a function 127.0.0.1:8080:23:20
```
I checked the documentation: [api-providers](https://docs.ethers.io/ethers.js/html/api-providers.html?highlight=getdefaultprovider) and see that the example uses let instead of var.
I'm a bit new and might be overlooking something, any guidance is welcome.
Cheers!
The text was updated successfully, but these errors were encountered:
Wow. I had no idea anyone still used ethers.space (the system ethers-deploy uses). I am planning to get more up on how to use meeseeks-app, which is far more scalable, requires less trust and is easier to use, once I get time to make a few small changes and get the docs updated.
I think ethers-deploy is also still based on the v3 branch of ethers. In v3, it was ethers.providers.getDefaultProvider(), but in v4 and in the v5-beta (available now using ethers@next in npm) it was moved to ethers.getDefaultProvider().
I can take a deeper look into this over the next few days though, and get an idea of how to beat migrate ethers.space to https://meeseeks.app.
I'm using it due to an online paid course, which now based on your statement seems to be highly deprecated :) ... don't worry too much, and thanks for your quick reply.
Steps to recreate issue:
First deploy ethers:
$ ethers-deploy serve
Serving content from file:///home/delta/Documents/blockgeeks/myfirstEtherio
Listening on port: 8080
Local Application Test URL:
mainnet: http://ethers.io/#!/app-link-insecure/localhost:8080/
ropsten: http://ropsten.ethers.io/#!/app-link-insecure/localhost:8080/
rinkeby: http://rinkeby.ethers.io/#!/app-link-insecure/localhost:8080/
kovan: http://kovan.ethers.io/#!/app-link-insecure/localhost:8080/
OK: / => ./index.html (1251 bytes) #this appears after opening web page
I do not use the links above as those do not work, instead open FF wit:
https://ropsten.ethers.io/#!/app-link-insecure/127.0.0.1:8080/
block .number and others do not show, instead a blank page appears.
js code snippet:
<script src="https://cdn.ethers.io/scripts/ethers-app-v0.4.min.js" charset="utf-8" type="text/javascript"> </script> <script> var provider = ethers.getDefaultProvider('ropsten'); console.log(provider); some code... <script> ``` This is what the browser console shows: [Ethers Container] Found Fragment URL: http://127.0.0.1:8080/" ropsten.ethers.io:186:847 [Ethers Container] Connected Provider: network=ropsten, chainId=3 ropsten.ethers.io:186:847 [Ethers Container] Initial Account: null ropsten.ethers.io:186:847 [Ethers Container] Ready ropsten.ethers.io:186:847 unreachable code after return statement ropsten.ethers.io:184:250325 Object { https: true, httpsAutoUpgrade: true, privacyScore: 2, entitiesBlocked: Object, entitiesNotBlocked: Object, scores: null } background.js:20780:25 tab.status: complete. site took 0.694 seconds to load. background.js:19350:13 The character encoding of the HTML document was not declared. The document will render with garbled text in some browser configurations if the document contains characters from outside the US-ASCII range. The character encoding of the page must be declared in the document or in the transfer protocol. ropsten.ethers.io "[Ethers Container] Loaded: http://127.0.0.1:8080/" ropsten.ethers.io:186:847 [Ethers Client Library] Connected to Ethers Wallet Container: network=testnet ethers-app- v0.4.min.js:1:798 [Ethers Client Library] Ready ethers-app-v0.4.min.js:1:798 TypeError: ethers.getDefaultProvider is not a function 127.0.0.1:8080:23:20 ``` I checked the documentation: [api-providers](https://docs.ethers.io/ethers.js/html/api-providers.html?highlight=getdefaultprovider) and see that the example uses let instead of var. I'm a bit new and might be overlooking something, any guidance is welcome. Cheers!The text was updated successfully, but these errors were encountered: