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

spectacles lookml RemoteProtocolError #819

Open
wsjk opened this issue Sep 6, 2024 · 6 comments
Open

spectacles lookml RemoteProtocolError #819

wsjk opened this issue Sep 6, 2024 · 6 comments

Comments

@wsjk
Copy link

wsjk commented Sep 6, 2024

Running spectacles lookml --project my_project and getting following error:

Completed validation in .


Encountered unexpected RemoteProtocolError: "Server disconnected without sending a response."
Full error traceback logged to file.

For support, please create an issue at https://github.com/spectacles-ci/spectacles/issues

I'm currently trying to run this for first time in our staging Looker instance. The cmd works for our Production instance just fine. Is there some setting we need to update in our staging instance for this to work?

@DylanBaker
Copy link
Collaborator

Hi @wsjk! Would you mind running the command with the -v flag? I'm interested in seeing the full logs to understand which endpoint is failing.

Thanks!

@wsjk
Copy link
Author

wsjk commented Sep 10, 2024

Output when i run spectacles lookml -v --project looker_proj

Authenticating to the Looker as client ID 'xxxxxxxxxx'
Completed content validation in .

Server disconnected without sending a response.
Traceback (most recent call last):
  File "/Users/xxxx/anaconda3/lib/python3.11/site-packages/httpx/_transports/default.py", line 67, in map_httpcore_exceptions
    yield
  File "/Users/xxxx/anaconda3/lib/python3.11/site-packages/httpx/_transports/default.py", line 231, in handle_request
    resp = self._pool.handle_request(req)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/xxxx/anaconda3/lib/python3.11/site-packages/httpcore/_sync/connection_pool.py", line 216, in handle_request
    raise exc from None
  File "/Users/xxxx/anaconda3/lib/python3.11/site-packages/httpcore/_sync/connection_pool.py", line 196, in handle_request
    response = connection.handle_request(
               ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/xxxx/anaconda3/lib/python3.11/site-packages/httpcore/_sync/connection.py", line 101, in handle_request
    return self._connection.handle_request(request)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/xxxx/anaconda3/lib/python3.11/site-packages/httpcore/_sync/http11.py", line 143, in handle_request
    raise exc
  File "/Users/xxxx/anaconda3/lib/python3.11/site-packages/httpcore/_sync/http11.py", line 113, in handle_request
    ) = self._receive_response_headers(**kwargs)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/xxxx/anaconda3/lib/python3.11/site-packages/httpcore/_sync/http11.py", line 186, in _receive_response_headers
    event = self._receive_event(timeout=timeout)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/xxxx/anaconda3/lib/python3.11/site-packages/httpcore/_sync/http11.py", line 238, in _receive_event
    raise RemoteProtocolError(msg)
httpcore.RemoteProtocolError: Server disconnected without sending a response.

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/Users/xxxx/anaconda3/lib/python3.11/site-packages/spectacles/cli.py", line 187, in wrapper
    return function(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/xxxx/anaconda3/lib/python3.11/site-packages/spectacles/cli.py", line 347, in main
    asyncio.run(
  File "/Users/xxxx/anaconda3/lib/python3.11/asyncio/runners.py", line 190, in run
    return runner.run(main)
           ^^^^^^^^^^^^^^^^
  File "/Users/xxxx/anaconda3/lib/python3.11/asyncio/runners.py", line 118, in run
    return self._loop.run_until_complete(task)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/xxxx/anaconda3/lib/python3.11/asyncio/base_events.py", line 653, in run_until_complete
    return future.result()
           ^^^^^^^^^^^^^^^
  File "/Users/xxxx/anaconda3/lib/python3.11/site-packages/spectacles/utils.py", line 65, in timed_function
    result = await fn(*args, **kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/xxxx/anaconda3/lib/python3.11/site-packages/spectacles/cli.py", line 844, in run_content
    client = LookerClient(
             ^^^^^^^^^^^^^
  File "/Users/xxxx/anaconda3/lib/python3.11/site-packages/spectacles/client.py", line 101, in __init__
    self.authenticate()
  File "/Users/xxxx/anaconda3/lib/python3.11/site-packages/spectacles/client.py", line 117, in authenticate
    response = httpx.post(url=url, data=body, timeout=TIMEOUT_SEC)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/xxxx/anaconda3/lib/python3.11/site-packages/httpx/_api.py", line 317, in post
    return request(
           ^^^^^^^^
  File "/Users/xxxx/anaconda3/lib/python3.11/site-packages/httpx/_api.py", line 104, in request
    return client.request(
           ^^^^^^^^^^^^^^^
  File "/Users/xxxx/anaconda3/lib/python3.11/site-packages/httpx/_client.py", line 828, in request
    return self.send(request, auth=auth, follow_redirects=follow_redirects)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/xxxx/anaconda3/lib/python3.11/site-packages/httpx/_client.py", line 915, in send
    response = self._send_handling_auth(
               ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/xxxx/anaconda3/lib/python3.11/site-packages/httpx/_client.py", line 943, in _send_handling_auth
    response = self._send_handling_redirects(
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/xxxx/anaconda3/lib/python3.11/site-packages/httpx/_client.py", line 980, in _send_handling_redirects
    response = self._send_single_request(request)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/xxxx/anaconda3/lib/python3.11/site-packages/httpx/_client.py", line 1016, in _send_single_request
    response = transport.handle_request(request)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/xxxx/anaconda3/lib/python3.11/site-packages/httpx/_transports/default.py", line 230, in handle_request
    with map_httpcore_exceptions():
  File "/Users/xxxx/anaconda3/lib/python3.11/contextlib.py", line 155, in __exit__
    self.gen.throw(typ, value, traceback)
  File "/Users/xxxx/anaconda3/lib/python3.11/site-packages/httpx/_transports/default.py", line 84, in map_httpcore_exceptions
    raise mapped_exc(message) from exc
httpx.RemoteProtocolError: Server disconnected without sending a response.

Encountered unexpected RemoteProtocolError: "Server disconnected without sending a response."
Full error traceback logged to file.

For support, please create an issue at https://github.com/spectacles-ci/spectacles/issues

@DylanBaker
Copy link
Collaborator

Thanks. It seems we're failing at the very first API call when we try to authenticate.

Do you have access tot he API explorer in your Looker instance? I'd want to test whether you are able to make the /login API call with the same credentials.

Is all your config in a config file? i.e. host, port, etc.

@wsjk
Copy link
Author

wsjk commented Sep 11, 2024

yep just ran the ApiAuth.Login method via API explorer in our staging instance with creds and got status 200

I'm running passing creds via env vars LOOKER_BASE_URL, LOOKER_CLIENT_ID, LOOKER_CLIENT_SECRET

Running spectacles==2.4.7 btw

@DylanBaker
Copy link
Collaborator

This probably isn't the issue, but mind bumping to the newest version to check? Allows us to rule out any issues with other packages.

@wsjk
Copy link
Author

wsjk commented Sep 13, 2024

yea same issue on 2.4.10.

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