Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

It seems Mythril has a connection issue. #1719

Open
AlirezaEthDev opened this issue Dec 31, 2022 · 1 comment
Open

It seems Mythril has a connection issue. #1719

AlirezaEthDev opened this issue Dec 31, 2022 · 1 comment

Comments

@AlirezaEthDev
Copy link

AlirezaEthDev commented Dec 31, 2022

Description

When I try Mythril to analyze a contract it throw some errors that I think they are connection error. I need to know am I right or not and what is the solution?

How to Reproduce

When I try this command on Windows PowerShell:

docker run -v ${pwd}:/tmp mythril/myth analyze /tmp/<contract>.sol

These errors throwed on PowerShell:

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/urllib3/connection.py", line 159, in _new_conn
    conn = connection.create_connection(
  File "/usr/lib/python3/dist-packages/urllib3/util/connection.py", line 61, in create_connection
    for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM):
  File "/usr/lib/python3.8/socket.py", line 918, in getaddrinfo
    for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno -3] Temporary failure in name resolution

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 665, in urlopen
    httplib_response = self._make_request(
  File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 376, in _make_request
    self._validate_conn(conn)
  File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 996, in _validate_conn
    conn.connect()
  File "/usr/lib/python3/dist-packages/urllib3/connection.py", line 314, in connect
    conn = self._new_conn()
  File "/usr/lib/python3/dist-packages/urllib3/connection.py", line 171, in _new_conn
    raise NewConnectionError(
urllib3.exceptions.NewConnectionError: <urllib3.connection.VerifiedHTTPSConnection object at 0x7f7c449600d0>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/requests/adapters.py", line 439, in send
    resp = conn.urlopen(
  File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 719, in urlopen
    retries = retries.increment(
  File "/usr/lib/python3/dist-packages/urllib3/util/retry.py", line 436, in increment
    raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='solc-bin.ethereum.org', port=443): Max retries exceeded with url: /linux-amd64/list.json (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x7f7c449600d0>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/bin/myth", line 11, in <module>
    load_entry_point('mythril==0.23.10', 'console_scripts', 'myth')()
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 490, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 2854, in load_entry_point
    return ep.load()
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 2445, in load
    return self.resolve()
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 2451, in resolve
    module = __import__(self.module_name, fromlist=['__name__'], level=0)
  File "/usr/local/lib/python3.8/dist-packages/mythril-0.23.10-py3.8.egg/mythril/__init__.py", line 8, in <module>
    from mythril.plugin.loader import MythrilPluginLoader
  File "/usr/local/lib/python3.8/dist-packages/mythril-0.23.10-py3.8.egg/mythril/plugin/__init__.py", line 1, in <module>
    from mythril.plugin.interface import MythrilPlugin, MythrilCLIPlugin
  File "/usr/local/lib/python3.8/dist-packages/mythril-0.23.10-py3.8.egg/mythril/plugin/interface.py", line 2, in <module>
    from mythril.laser.plugin.builder import PluginBuilder as LaserPluginBuilder
  File "/usr/local/lib/python3.8/dist-packages/mythril-0.23.10-py3.8.egg/mythril/laser/plugin/builder.py", line 1, in <module>
    from mythril.laser.plugin.interface import LaserPlugin
  File "/usr/local/lib/python3.8/dist-packages/mythril-0.23.10-py3.8.egg/mythril/laser/plugin/interface.py", line 1, in <module>
    from mythril.laser.ethereum.svm import LaserEVM
  File "/usr/local/lib/python3.8/dist-packages/mythril-0.23.10-py3.8.egg/mythril/laser/ethereum/svm.py", line 10, in <module>
    from mythril.analysis.potential_issues import check_potential_issues
  File "/usr/local/lib/python3.8/dist-packages/mythril-0.23.10-py3.8.egg/mythril/analysis/potential_issues.py", line 1, in <module>
    from mythril.analysis.report import Issue
  File "/usr/local/lib/python3.8/dist-packages/mythril-0.23.10-py3.8.egg/mythril/analysis/report.py", line 12, in <module>
    from mythril.solidity.soliditycontract import SolidityContract
  File "/usr/local/lib/python3.8/dist-packages/mythril-0.23.10-py3.8.egg/mythril/solidity/soliditycontract.py", line 7, in <module>
    from mythril.ethereum.evmcontract import EVMContract
  File "/usr/local/lib/python3.8/dist-packages/mythril-0.23.10-py3.8.egg/mythril/ethereum/evmcontract.py", line 8, in <module>
    from mythril.disassembler.disassembly import Disassembly
  File "/usr/local/lib/python3.8/dist-packages/mythril-0.23.10-py3.8.egg/mythril/disassembler/disassembly.py", line 2, in <module>
    from mythril.ethereum import util
  File "/usr/local/lib/python3.8/dist-packages/mythril-0.23.10-py3.8.egg/mythril/ethereum/util.py", line 139, in <module>
    all_versions = solcx.get_installable_solc_versions()
  File "/usr/local/lib/python3.8/dist-packages/solcx/install.py", line 322, in get_installable_solc_versions
    data = requests.get(BINARY_DOWNLOAD_BASE.format(_get_os_name(), "list.json"))
  File "/usr/lib/python3/dist-packages/requests/api.py", line 75, in get
    return request('get', url, params=params, **kwargs)
  File "/usr/lib/python3/dist-packages/requests/api.py", line 60, in request
    return session.request(method=method, url=url, **kwargs)
  File "/usr/lib/python3/dist-packages/requests/sessions.py", line 533, in request
    resp = self.send(prep, **send_kwargs)
  File "/usr/lib/python3/dist-packages/requests/sessions.py", line 646, in send
    r = adapter.send(request, **kwargs)
  File "/usr/lib/python3/dist-packages/requests/adapters.py", line 516, in send
    raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPSConnectionPool(host='solc-bin.ethereum.org', port=443): Max retries exceeded with url: /linux-amd64/list.json (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x7f7c449600d0>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution'))

Expected behavior

I expect Mythril prints the analyze result on PowerShell.

Thanks for helping!

@norhh
Copy link
Collaborator

norhh commented Jan 2, 2023

Can you check this with the latest docker image in develop? I think Mythril should run without this issue when the internet is not connected with the latest version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants