Comments (5)
In tests/setup.js
can you all take a look at the following lines?
const infura = {
type: "WS_Infura",
envKeyID: "PROVIDER_INFURA_ID" // This is the name of the env variable storing the ID, NOT THE ID ITSELF
};
const alchemy = {
type: "WS_Alchemy",
envKeyKey: "PROVIDER_ALCHEMY_KEY" // This is the name of the env variable storing the key, NOT THE KEY ITSELF
};
web3.mainnet = new MultiSendProvider("mainnet", [infura, alchemy]);
Feel free to delete either the infura or alchemy entry; you only need one. But Do make sure that envKeyID
and envKeyKey
point to the name of the environment variable not ID/key itself. The idea here is that your private info will never be plain-text in the code. Getting this wrong would cause Infura and Alchemy to timeout, since the code would see an undefined
ID/key.
If the issue remains after checking this, feel free to reopen this issue. Thanks!
from cafe-chi.
Hi @mjsmorgan, thanks for your interest in Cafe-Chi.
When I wrote the tests I was focused on my local machine, on which I could connect to Geth via IPC. It's probably timing out for you because it takes longer to communicate with Infura/Alchemy APIs than it does to communicate over IPC. I'll try to push a fix this weekend, but in the mean time you should be able to fix this by adding .timeout(10000)
after each failing test.
Example:
it("should retrieve name", async () => {
return Pair.chi_eth
.name()(web3.ganache)
.then(x => assert(x === "Uniswap V2"));
}).timeout(10000);
See this thread for other options. You may be able to just update the test
command in package.json
with the flag --timeout 10000
, though I haven't tried that method myself.
from cafe-chi.
@haydenshively thanks for your work.
i hit the same problem. increasing timeout does not bring anything. thnks for pointing out using local geth. I'm using infura but also tried alchemy. I can see there are informations requested on the servers of infura (and alchemy) by tcpdump, but it seems to fail since no requests are counted in the dashboard of infura.
from cafe-chi.
@martinsteldinger I noticed the same thing using iftop.....it is connecting, but the connection is rejected for some reason
from cafe-chi.
I was only able to replicate these results after uninstalling/reinstalling dependencies, so I assume some package was updated and broke compatibility. Looking into it now
This only happened once, so I don't think it's the root cause
from cafe-chi.
Related Issues (2)
- Making it work? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cafe-chi.