Open liam-ot opened 3 years ago
manually visiting https://data-seed-prebsc-1-s1.binance.org:8545/ does not return 502, it attempts a download
run('deploy')
also sometimes just gets stuck at the first tx sent out like this
>>> run('deploy')
Running 'scripts/deploy.py::main'...
Transaction sent: 0xc842a0213eb7b0e20fd1971df9780262f56269468f74844578c5abdd094b1a3f
Gas price: 10.0 gwei Gas limit: 699999 Nonce: 545
Waiting for confirmation...
and checking the tx address shows a confirmed tx on the testnet https://testnet.bscscan.com/tx/0xc842a0213eb7b0e20fd1971df9780262f56269468f74844578c5abdd094b1a3f
okay and now, after numerous times quit()
ing and trying again with no success, it ran the whole deploy script without issue
edit: and directly after printed this to the console?
>>> Exception in thread Thread-1:
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/threading.py", line 954, in _bootstrap_inner
self.run()
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/threading.py", line 892, in run
self._target(*self._args, **self._kwargs)
File "/Users/mac/.local/pipx/venvs/eth-brownie/lib/python3.9/site-packages/brownie/network/middlewares/caching.py", line 142, in block_filter_loop
new_blocks = self.block_filter.get_new_entries()
File "/Users/mac/.local/pipx/venvs/eth-brownie/lib/python3.9/site-packages/web3/_utils/filters.py", line 164, in get_new_entries
log_entries = self._filter_valid_entries(self.eth_module.get_filter_changes(self.filter_id))
File "/Users/mac/.local/pipx/venvs/eth-brownie/lib/python3.9/site-packages/web3/module.py", line 58, in caller
result = w3.manager.request_blocking(method_str, params, error_formatters)
File "/Users/mac/.local/pipx/venvs/eth-brownie/lib/python3.9/site-packages/web3/manager.py", line 154, in request_blocking
response = self._make_request(method, params)
File "/Users/mac/.local/pipx/venvs/eth-brownie/lib/python3.9/site-packages/web3/manager.py", line 133, in _make_request
return request_func(method, params)
File "/Users/mac/.local/pipx/venvs/eth-brownie/lib/python3.9/site-packages/brownie/network/middlewares/caching.py", line 179, in process_request
return make_request(method, params)
File "cytoolz/functoolz.pyx", line 250, in cytoolz.functoolz.curry.__call__
File "/Users/mac/.local/pipx/venvs/eth-brownie/lib/python3.9/site-packages/web3/middleware/formatting.py", line 76, in apply_formatters
response = make_request(method, params)
File "/Users/mac/.local/pipx/venvs/eth-brownie/lib/python3.9/site-packages/web3/middleware/gas_price_strategy.py", line 34, in middleware
return make_request(method, params)
File "cytoolz/functoolz.pyx", line 250, in cytoolz.functoolz.curry.__call__
File "/Users/mac/.local/pipx/venvs/eth-brownie/lib/python3.9/site-packages/web3/middleware/formatting.py", line 76, in apply_formatters
response = make_request(method, params)
File "/Users/mac/.local/pipx/venvs/eth-brownie/lib/python3.9/site-packages/web3/middleware/attrdict.py", line 33, in middleware
response = make_request(method, params)
File "cytoolz/functoolz.pyx", line 250, in cytoolz.functoolz.curry.__call__
File "/Users/mac/.local/pipx/venvs/eth-brownie/lib/python3.9/site-packages/web3/middleware/formatting.py", line 76, in apply_formatters
response = make_request(method, params)
File "/Users/mac/.local/pipx/venvs/eth-brownie/lib/python3.9/site-packages/web3/middleware/normalize_errors.py", line 25, in middleware
result = make_request(method, params)
File "cytoolz/functoolz.pyx", line 250, in cytoolz.functoolz.curry.__call__
File "/Users/mac/.local/pipx/venvs/eth-brownie/lib/python3.9/site-packages/web3/middleware/formatting.py", line 76, in apply_formatters
response = make_request(method, params)
File "cytoolz/functoolz.pyx", line 250, in cytoolz.functoolz.curry.__call__
File "/Users/mac/.local/pipx/venvs/eth-brownie/lib/python3.9/site-packages/web3/middleware/formatting.py", line 76, in apply_formatters
response = make_request(method, params)
File "/Users/mac/.local/pipx/venvs/eth-brownie/lib/python3.9/site-packages/brownie/network/middlewares/catch_tx_revert.py", line 24, in process_request
result = make_request(method, params)
File "/Users/mac/.local/pipx/venvs/eth-brownie/lib/python3.9/site-packages/brownie/network/middlewares/geth_poa.py", line 21, in process_request
return middleware_fn(method, params)
File "cytoolz/functoolz.pyx", line 250, in cytoolz.functoolz.curry.__call__
File "/Users/mac/.local/pipx/venvs/eth-brownie/lib/python3.9/site-packages/web3/middleware/formatting.py", line 76, in apply_formatters
response = make_request(method, params)
File "/Users/mac/.local/pipx/venvs/eth-brownie/lib/python3.9/site-packages/web3/middleware/exception_retry_request.py", line 104, in middleware
return make_request(method, params)
File "/Users/mac/.local/pipx/venvs/eth-brownie/lib/python3.9/site-packages/web3/providers/rpc.py", line 92, in make_request
raw_response = make_post_request(
File "/Users/mac/.local/pipx/venvs/eth-brownie/lib/python3.9/site-packages/web3/_utils/request.py", line 40, in make_post_request
response.raise_for_status()
File "/Users/mac/.local/pipx/venvs/eth-brownie/lib/python3.9/site-packages/requests/models.py", line 943, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 502 Server Error: Bad Gateway for url: https://data-seed-prebsc-1-s1.binance.org:8545/
and now, after a reinstallation of eth-brownie and restarting my mac i am greeted with the error whenever pulling up the console on bsc-test network
user@user-MacBook-Pro new_crypto_bsc % brownie console --network bsc-test
Brownie v1.15.0 - Python development framework for Ethereum
NewCryptoBscProject is the active project.
Exception in thread Thread-1:
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/threading.py", line 954, in _bootstrap_inner
self.run()
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/threading.py", line 892, in run
self._target(*self._args, **self._kwargs)
File "/Users/mac/.local/pipx/venvs/eth-brownie/lib/python3.9/site-packages/brownie/network/middlewares/caching.py", line 142, in block_filter_loop
new_blocks = self.block_filter.get_new_entries()
File "/Users/mac/.local/pipx/venvs/eth-brownie/lib/python3.9/site-packages/web3/_utils/filters.py", line 160, in get_new_entries
log_entries = self._filter_valid_entries(self.eth_module.get_filter_changes(self.filter_id))
File "/Users/mac/.local/pipx/venvs/eth-brownie/lib/python3.9/site-packages/web3/module.py", line 57, in caller
result = w3.manager.request_blocking(method_str,
File "/Users/mac/.local/pipx/venvs/eth-brownie/lib/python3.9/site-packages/web3/manager.py", line 180, in request_blocking
response = self._make_request(method, params)
File "/Users/mac/.local/pipx/venvs/eth-brownie/lib/python3.9/site-packages/web3/manager.py", line 141, in _make_request
return request_func(method, params)
File "/Users/mac/.local/pipx/venvs/eth-brownie/lib/python3.9/site-packages/brownie/network/middlewares/caching.py", line 179, in process_request
return make_request(method, params)
File "cytoolz/functoolz.pyx", line 250, in cytoolz.functoolz.curry.__call__
File "/Users/mac/.local/pipx/venvs/eth-brownie/lib/python3.9/site-packages/web3/middleware/formatting.py", line 76, in apply_formatters
response = make_request(method, params)
File "/Users/mac/.local/pipx/venvs/eth-brownie/lib/python3.9/site-packages/web3/middleware/gas_price_strategy.py", line 80, in middleware
return make_request(method, params)
File "cytoolz/functoolz.pyx", line 250, in cytoolz.functoolz.curry.__call__
File "/Users/mac/.local/pipx/venvs/eth-brownie/lib/python3.9/site-packages/web3/middleware/formatting.py", line 76, in apply_formatters
response = make_request(method, params)
File "/Users/mac/.local/pipx/venvs/eth-brownie/lib/python3.9/site-packages/web3/middleware/attrdict.py", line 33, in middleware
response = make_request(method, params)
File "cytoolz/functoolz.pyx", line 250, in cytoolz.functoolz.curry.__call__
File "/Users/mac/.local/pipx/venvs/eth-brownie/lib/python3.9/site-packages/web3/middleware/formatting.py", line 76, in apply_formatters
response = make_request(method, params)
File "cytoolz/functoolz.pyx", line 250, in cytoolz.functoolz.curry.__call__
File "/Users/mac/.local/pipx/venvs/eth-brownie/lib/python3.9/site-packages/web3/middleware/formatting.py", line 76, in apply_formatters
response = make_request(method, params)
File "cytoolz/functoolz.pyx", line 250, in cytoolz.functoolz.curry.__call__
File "/Users/mac/.local/pipx/venvs/eth-brownie/lib/python3.9/site-packages/web3/middleware/formatting.py", line 76, in apply_formatters
response = make_request(method, params)
File "/Users/mac/.local/pipx/venvs/eth-brownie/lib/python3.9/site-packages/web3/middleware/buffered_gas_estimate.py", line 40, in middleware
return make_request(method, params)
File "/Users/mac/.local/pipx/venvs/eth-brownie/lib/python3.9/site-packages/brownie/network/middlewares/catch_tx_revert.py", line 24, in process_request
result = make_request(method, params)
File "/Users/mac/.local/pipx/venvs/eth-brownie/lib/python3.9/site-packages/brownie/network/middlewares/geth_poa.py", line 21, in process_request
return middleware_fn(method, params)
File "cytoolz/functoolz.pyx", line 250, in cytoolz.functoolz.curry.__call__
File "/Users/mac/.local/pipx/venvs/eth-brownie/lib/python3.9/site-packages/web3/middleware/formatting.py", line 76, in apply_formatters
response = make_request(method, params)
File "/Users/mac/.local/pipx/venvs/eth-brownie/lib/python3.9/site-packages/web3/middleware/exception_retry_request.py", line 104, in middleware
return make_request(method, params)
File "/Users/mac/.local/pipx/venvs/eth-brownie/lib/python3.9/site-packages/web3/providers/rpc.py", line 88, in make_request
raw_response = make_post_request(
File "/Users/mac/.local/pipx/venvs/eth-brownie/lib/python3.9/site-packages/web3/_utils/request.py", line 49, in make_post_request
response.raise_for_status()
File "/Users/mac/.local/pipx/venvs/eth-brownie/lib/python3.9/site-packages/requests/models.py", line 953, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 502 Server Error: Bad Gateway for url: https://data-seed-prebsc-1-s1.binance.org:8545/
Hi!
I am getting something similar after running brownie run my_scrip.py
after a clean install of latest brownie (macOS + conda env + pip install eth-brownie).
Even though myself scripts seem to run correctly I get something like:
Terminating local RPC client...
Exception in thread Thread-11:
Traceback (most recent call last):
File "/usr/local/anaconda3/envs/f38/lib/python3.8/site-packages/urllib3/connectionpool.py", line 699, in urlopen
httplib_response = self._make_request(
File "/usr/local/anaconda3/envs/f38/lib/python3.8/site-packages/urllib3/connectionpool.py", line 445, in _make_request
six.raise_from(e, None)
File "<string>", line 3, in raise_from
File "/usr/local/anaconda3/envs/f38/lib/python3.8/site-packages/urllib3/connectionpool.py", line 440, in _make_request
httplib_response = conn.getresponse()
File "/usr/local/anaconda3/envs/f38/lib/python3.8/http/client.py", line 1344, in getresponse
response.begin()
File "/usr/local/anaconda3/envs/f38/lib/python3.8/http/client.py", line 307, in begin
version, status, reason = self._read_status()
File "/usr/local/anaconda3/envs/f38/lib/python3.8/http/client.py", line 268, in _read_status
line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
File "/usr/local/anaconda3/envs/f38/lib/python3.8/socket.py", line 669, in readinto
return self._sock.recv_into(b)
ConnectionResetError: [Errno 54] Connection reset by peer
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/anaconda3/envs/f38/lib/python3.8/site-packages/requests/adapters.py", line 439, in send
resp = conn.urlopen(
File "/usr/local/anaconda3/envs/f38/lib/python3.8/site-packages/urllib3/connectionpool.py", line 755, in urlopen
retries = retries.increment(
File "/usr/local/anaconda3/envs/f38/lib/python3.8/site-packages/urllib3/util/retry.py", line 532, in increment
raise six.reraise(type(error), error, _stacktrace)
File "/usr/local/anaconda3/envs/f38/lib/python3.8/site-packages/urllib3/packages/six.py", line 769, in reraise
raise value.with_traceback(tb)
File "/usr/local/anaconda3/envs/f38/lib/python3.8/site-packages/urllib3/connectionpool.py", line 699, in urlopen
Hope this helps, Cheers
re-installed and upgraded to v1.15.1, deploy script acting as before, although one difference and this may not have to do with brownie is before when i searched the tx on bsc test net scanner it showed me a tab for internal txns showing all the subsequent contract calls after the initial contract call, however it no longer does that
either way this issue seems resolved thanks ben, @iamdefinitelyahuman you do great work for the crypto community especially the niche vyper devs
Great to hear! I'm gonna leave this open a bit longer in case the issue still persists for anyone else - i'm only 95% sure I fixed it.
@iamdefinitelyahuman well i spoke too soon, issue has popped back up, same error stack trace
brownie
Version: latestrunning a deploy script which deploys a couple contracts then makes calls to them which previously worked now returning big error trace, something about a 502 bad gateway from binance seed
then
sometimes the error comes immediately sometimes after a few calls
full stack trace:
like i said was working fine before
possible related to this