Skip to content
This repository was archived by the owner on Jan 23, 2024. It is now read-only.
This repository was archived by the owner on Jan 23, 2024. It is now read-only.

Should cleanup logs from Firebase Client when RTDB does not exist #75

@jasonborg

Description

@jasonborg

The agent currently logs the following when the project does not contain a Firebase RTDB:

  File "/tmp/cdbg-venv/lib/python3.10/site-packages/firebase_admin/db.py", line 929, in request
    return super(_Client, self).request(method, url, **kwargs)
  File "/tmp/cdbg-venv/lib/python3.10/site-packages/firebase_admin/_http_client.py", line 119, in request
    resp.raise_for_status()
  File "/tmp/cdbg-venv/lib/python3.10/site-packages/requests/models.py", line 1021, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 404 Client Error: Not Found for url: https://my-project-cdbg.firebaseio.com/cdbg/debuggees/d-93910f74/registrationTimeUnixMsec.json
 
During handling of the above exception, another exception occurred:
 
Traceback (most recent call last):
  File "/tmp/cdbg-venv/lib/python3.10/site-packages/googleclouddebugger/firebase_client.py", line 394, in _CheckDebuggeePresence
    snapshot = firebase_admin.db.reference(path).get()
  File "/tmp/cdbg-venv/lib/python3.10/site-packages/firebase_admin/db.py", line 221, in get
    return self._client.body('get', self._add_suffix(), params=params)
  File "/tmp/cdbg-venv/lib/python3.10/site-packages/firebase_admin/_http_client.py", line 131, in body
    resp = self.request(method, url, **kwargs)
  File "/tmp/cdbg-venv/lib/python3.10/site-packages/firebase_admin/db.py", line 931, in request
    raise _Client.handle_rtdb_error(error)
firebase_admin.exceptions.NotFoundError: 404 Not Found
I0221 19:37:52.268412 80451 firebase_client.py:373] registering at https://my-project-cdbg.firebaseio.com, path: cdbg/debuggees/d-93910f74
I0221 19:37:52.299484 80451 firebase_client.py:388] Failed to register debuggee: Traceback (most recent call last):
  File "/tmp/cdbg-venv/lib/python3.10/site-packages/firebase_admin/db.py", line 929, in request
    return super(_Client, self).request(method, url, **kwargs)
  File "/tmp/cdbg-venv/lib/python3.10/site-packages/firebase_admin/_http_client.py", line 119, in request
    resp.raise_for_status()
  File "/tmp/cdbg-venv/lib/python3.10/site-packages/requests/models.py", line 1021, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 404 Client Error: Not Found for url: https://my-project-cdbg.firebaseio.com/cdbg/debuggees/d-93910f74.json?print=silent
 
During handling of the above exception, another exception occurred:
 
Traceback (most recent call last):
  File "/tmp/cdbg-venv/lib/python3.10/site-packages/googleclouddebugger/firebase_client.py", line 378, in _RegisterDebuggee
    firebase_admin.db.reference(debuggee_path).set(debuggee_data)
  File "/tmp/cdbg-venv/lib/python3.10/site-packages/firebase_admin/db.py", line 264, in set
    self._client.request('put', self._add_suffix(), json=value, params='print=silent')
  File "/tmp/cdbg-venv/lib/python3.10/site-packages/firebase_admin/db.py", line 931, in request
    raise _Client.handle_rtdb_error(error)
firebase_admin.exceptions.NotFoundError: 404 Not Found

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions