nikitastupin / clairvoyance

Obtain GraphQL API schema even if the introspection is disabled
Apache License 2.0
1.02k stars 92 forks source link

clairvoyance error : connector: <aiohttp.connector.TCPConnector object at 0x7f373f35bdf0> #74

Open aliwjpi opened 1 year ago

aliwjpi commented 1 year ago

hello, and thanks for this useful tool, i got an error when runing this tool on https://tdm.dell.com/graphql, please fix the bug (sorry for my english i'm french)

$ clairvoyance https://tdm.dell.com/graphql -c 10 -o graphql.json -H "Apollographql-Client-Name: tdm-ui-mfe"

2023-07-28 13:22:54 INFO | Starting blind introspection on https://tdm.dell.com/graphql... 2023-07-28 13:22:54 INFO | Iteration 1 Traceback (most recent call last): File "/usr/local/bin/clairvoyance", line 8, in sys.exit(cli()) File "/usr/local/lib/python3.8/dist-packages/clairvoyance/cli.py", line 142, in cli asyncio.run( File "/usr/lib/python3.8/asyncio/runners.py", line 44, in run return loop.run_until_complete(main) File "/usr/lib/python3.8/asyncio/base_events.py", line 616, in run_until_complete return future.result() File "/usr/local/lib/python3.8/dist-packages/clairvoyance/cli.py", line 89, in blind_introspection schema = await oracle.clairvoyance( File "/usr/local/lib/python3.8/dist-packages/clairvoyance/oracle.py", line 568, in clairvoyance typename = await probe_typename(input_document) File "/usr/local/lib/python3.8/dist-packages/clairvoyance/oracle.py", line 487, in probe_typename return (match.group('typename').replace('[', '').replace(']', '').replace('!', '')) AttributeError: 'NoneType' object has no attribute 'group' 2023-07-28 13:22:55 ERROR | Unclosed client session client_session: <aiohttp.client.ClientSession object at 0x7f373f3f1af0> 2023-07-28 13:22:55 ERROR | Unclosed connector connections: ['[(<aiohttp.client_proto.ResponseHandler object at 0x7f373dab12e0>, 1663069.501347268)]'] connector: <aiohttp.connector.TCPConnector object at 0x7f373f35bdf0>

Oooooooooooooooooooooooooooops commented 1 year ago

i have too this trouble: 2023-09-07 14:09:18 DEBUG | Entered get_path_from_root(CampaignPostbackEventEnum) 2023-09-07 14:09:18 DEBUG | get_path_from_root: Ran an iteration with no matches found Traceback (most recent call last): File "C:\Users\USR\AppData\Local\Programs\Python\Python38\lib\runpy.py", line 194, in _run_module_as_main return _run_code(code, main_globals, None, File "C:\Users\USR\AppData\Local\Programs\Python\Python38\lib\runpy.py", line 87, in _run_code exec(code, run_globals) File "C:\Users\USR\AppData\Local\Programs\Python\Python38\Scripts\clairvoyance.exe__main__.py", line 7, in File "C:\Users\USR\AppData\Local\Programs\Python\Python38\lib\site-packages\clairvoyance\cli.py", line 142, in cli asyncio.run( File "C:\Users\USR\AppData\Local\Programs\Python\Python38\lib\asyncio\runners.py", line 44, in run return loop.run_until_complete(main) File "C:\Users\USR\AppData\Local\Programs\Python\Python38\lib\asyncio\base_events.py", line 616, in run_until_complete return future.result() File "C:\Users\USR\AppData\Local\Programs\Python\Python38\lib\site-packages\clairvoyance\cli.py", line 106, in blind_introspection input_document = s.convert_path_to_document(s.get_path_from_root(_next)) File "C:\Users\USR\AppData\Local\Programs\Python\Python38\lib\site-packages\clairvoyance\graphql.py", line 122, in get_path_from_root raise Exception(f'Could not find path from root to \'{initial_name}\' \nCurrent path: {path_from_root}') Exception: Could not find path from root to 'CampaignPostbackEventEnum' Current path: ['campaign', 'postbacks', 'event'] 2023-09-07 14:09:18 ERROR | Unclosed client session client_session: <aiohttp.client.ClientSession object at 0x00000231F5210EE0>

rew1nter commented 11 months ago

I have the same error. Using the -p slow flag seems to be temporary resolution