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

t3t1 emulator-apply-settings auto_lock_delay_ms #280

Closed
mroz22 opened this issue Dec 17, 2024 · 3 comments
Closed

t3t1 emulator-apply-settings auto_lock_delay_ms #280

mroz22 opened this issue Dec 17, 2024 · 3 comments
Assignees

Comments

@mroz22
Copy link
Contributor

mroz22 commented Dec 17, 2024

I send

{"id":5,"type":"emulator-apply-settings","auto_lock_delay_ms":10000}

emu hangs in this state

image

@marekrjpolak
Copy link

Still an issue. Stack trace:

2025-01-07 11:55:14:299118 - CONTROLLER: ERROR response: {
'success': False,
'id': 6,
'error': 'BridgeException - trezord: debug/read/debug6 failed with code 400: device disconnected during action',
'traceback': 'Traceback (most recent call last):  File "/trezor-user-env/src/controller.py", line 98, in get_response
    command_response = self.run_command_and_get_its_response()
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/trezor-user-env/src/controller.py", line 133, in run_command_and_get_its_response
    return self.run_emulator_command()
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/trezor-user-env/src/controller.py", line 316, in run_emulator_command
    emulator.apply_settings(**settings_fields)
  File "/trezor-user-env/src/emulator.py", line 908, in apply_settings
    device.apply_settings(
  File "/root/.cache/pypoetry/virtualenvs/trezor-user-env-IBnwuPmL-py3.11/lib/python3.11/site-packages/trezorlib/tools.py", line 274, in wrapped_f
    ret = f(*args, **kwargs)init aut
          ^^^^^^^^^^^^^^^^^^
  File "/root/.cache/pypoetry/virtualenvs/trezor-user-env-IBnwuPmL-py3.11/lib/python3.11/site-packages/trezorlib/tools.py", line 297, in wrapped_f
    return f(client, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/root/.cache/pypoetry/virtualenvs/trezor-user-env-IBnwuPmL-py3.11/lib/python3.11/site-packages/trezorlib/device.py", line 70, in apply_settings
    out = client.call(settings)
          ^^^^^^^^^^^^^^^^^^^^^
  File "/root/.cache/pypoetry/virtualenvs/trezor-user-env-IBnwuPmL-py3.11/lib/python3.11/site-packages/trezorlib/tools.py", line 297, in wrapped_f
    return f(client, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/root/.cache/pypoetry/virtualenvs/trezor-user-env-IBnwuPmL-py3.11/lib/python3.11/site-packages/trezorlib/client.py", line 264, in call
    resp = self._callback_button(resp)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/root/.cache/pypoetry/virtualenvs/trezor-user-env-IBnwuPmL-py3.11/lib/python3.11/site-packages/trezorlib/client.py", line 251, in _callback_button
    self.ui.button_request(msg)
  File "/root/.cache/pypoetry/virtualenvs/trezor-user-env-IBnwuPmL-py3.11/lib/python3.11/site-packages/trezorlib/debuglink.py", line 871, in button_request
    self._default_input_flow(br)
  File "/root/.cache/pypoetry/virtualenvs/trezor-user-env-IBnwuPmL-py3.11/lib/python3.11/site-packages/trezorlib/debuglink.py", line 849, in _default_input_flow
    self.debuglink.swipe_up(wait=True)
  File "/root/.cache/pypoetry/virtualenvs/trezor-user-env-IBnwuPmL-py3.11/lib/python3.11/site-packages/trezorlib/debuglink.py", line 639, in swipe_up
    return self.input(swipe=messages.DebugSwipeDirection.UP, wait=wait)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/root/.cache/pypoetry/virtualenvs/trezor-user-env-IBnwuPmL-py3.11/lib/python3.11/site-packages/trezorlib/debuglink.py", line 569, in input
    ret = self._call(decision, nowait=not wait)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/root/.cache/pypoetry/virtualenvs/trezor-user-env-IBnwuPmL-py3.11/lib/python3.11/site-packages/trezorlib/debuglink.py", line 456, in _call
    ret_type, ret_bytes = self.transport.read()
                          ^^^^^^^^^^^^^^^^^^^^^
  File "/root/.cache/pypoetry/virtualenvs/trezor-user-env-IBnwuPmL-py3.11/lib/python3.11/site-packages/trezorlib/transport/bridge.py", line 177, in read
    data = self.handle.read_buf()
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/root/.cache/pypoetry/virtualenvs/trezor-user-env-IBnwuPmL-py3.11/lib/python3.11/site-packages/trezorlib/transport/bridge.py", line 79, in read_buf
    data = self.transport._call("read")
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/root/.cache/pypoetry/virtualenvs/trezor-user-env-IBnwuPmL-py3.11/lib/python3.11/site-packages/trezorlib/transport/bridge.py", line 143, in _call
    return call_bridge(uri, data=data)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/root/.cache/pypoetry/virtualenvs/trezor-user-env-IBnwuPmL-py3.11/lib/python3.11/site-packages/trezorlib/transport/bridge.py", line 52, in call_bridge
    raise BridgeException(path, r.status_code, r.json()["error"])\ntrezorlib.transport.bridge.BridgeException: trezord: debug/read/debug6 failed with code 400: device disconnected during action
'}

@grdddj
Copy link
Contributor

grdddj commented Jan 13, 2025

I could not replicate this issue on my local Ubuntu machine, both T3T1 and T3W1 work fine with this input from user dashboard:

{"id":5,"type":"emulator-apply-settings","auto_lock_delay_ms":10000}

In both cases, it does the setting quickly without any problem.

I have downloaded the latest main emulators for all branches - as the issue could theoretically be emulator-related, with some issues in specific firmware revisions

@grdddj
Copy link
Contributor

grdddj commented Jan 14, 2025

Fixed in #282

@grdddj grdddj closed this as completed Jan 14, 2025
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

3 participants