theironrobin / siglo

GTK app to sync InfiniTime watch with PinePhone
Mozilla Public License 2.0
153 stars 23 forks source link

Updating firmware silently fails #95

Closed WhyNotHugo closed 2 years ago

WhyNotHugo commented 2 years ago

Trying to update firmware on a new device. It gets stuck at 0%. I ran this via a terminal and the output is:

Traceback (most recent call last):
  File "/app/share/siglo/siglo/window.py", line 209, in on_watches_listbox_row_activated
    subprocess.Popen(["systemctl", "--user", "start", "siglo"])
  File "/usr/lib/python3.9/subprocess.py", line 951, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "/usr/lib/python3.9/subprocess.py", line 1821, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'systemctl'
[e0:e0:1e:c3:cd:05] Connection failed: Device does not exist, check adapter name and MAC address.
Downloading https://github.com/InfiniTimeOrg/InfiniTime/releases/download/1.7.0/pinetime-mcuboot-app-dfu-1.7.0.zip
[INFO ] GNOME power settings not found, you're on your own for system sleep
preparing pinetime-mcuboot-app-image-1.7.0.bin for e0:e0:1e:c3:cd:05
Binary image size: 365720
Binary CRC32: 2106408772
[e0:e0:1e:c3:cd:05] Connection failed: Device does not exist, check adapter name and MAC address.
theironrobin commented 2 years ago

are you using flatpak?

WhyNotHugo commented 2 years ago

On Sat, 13 Nov 2021, at 19:12, Alex R wrote:

are you using flatpak?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/alexr4535/siglo/issues/95#issuecomment-968111394, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAFSNOY6ZUUAVB4I37COL63UL2TBZANCNFSM5H6ZGG5Q. Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

I am. Do I need some additional portal?

-- Hugo Osvaldo Barrera

InFerYes commented 2 years ago

This might be a coincidence, but I just happened to read this report. My PineTime also fails to update, but I've been using GadgetBridge. It might be an InfiniTime issue. I will be opening an issue on their tracker in a bit.

edit: My first attempt using Siglo (I have redacted my BT MAC)

Found 00:00:00:00:00:00
[00:00:00:00:00:00] Connected
self.mac 00:00:00:00:00:00
[00:00:00:00:00:00] Disconnected
Downloading https://github.com/InfiniTimeOrg/InfiniTime/releases/download/1.7.0/pinetime-mcuboot-app-dfu-1.7.0.zip
Traceback (most recent call last):
  File "/usr/lib/python3.9/urllib/request.py", line 1346, in do_open
    h.request(req.get_method(), req.selector, req.data, headers,
  File "/usr/lib/python3.9/http/client.py", line 1279, in request
    self._send_request(method, url, body, headers, encode_chunked)
  File "/usr/lib/python3.9/http/client.py", line 1325, in _send_request
    self.endheaders(body, encode_chunked=encode_chunked)
  File "/usr/lib/python3.9/http/client.py", line 1274, in endheaders
    self._send_output(message_body, encode_chunked=encode_chunked)
  File "/usr/lib/python3.9/http/client.py", line 1034, in _send_output
    self.send(msg)
  File "/usr/lib/python3.9/http/client.py", line 974, in send
    self.connect()
  File "/usr/lib/python3.9/http/client.py", line 1441, in connect
    super().connect()
  File "/usr/lib/python3.9/http/client.py", line 945, in connect
    self.sock = self._create_connection(
  File "/usr/lib/python3.9/socket.py", line 823, in create_connection
    for res in getaddrinfo(host, port, 0, SOCK_STREAM):
  File "/usr/lib/python3.9/socket.py", line 954, 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/share/siglo/siglo/window.py", line 288, in on_firmware_run_clicked
    local_filename, headers = urllib.request.urlretrieve(
  File "/usr/lib/python3.9/urllib/request.py", line 239, in urlretrieve
    with contextlib.closing(urlopen(url, data)) as fp:
  File "/usr/lib/python3.9/urllib/request.py", line 214, in urlopen
    return opener.open(url, data, timeout)
  File "/usr/lib/python3.9/urllib/request.py", line 517, in open
    response = self._open(req, data)
  File "/usr/lib/python3.9/urllib/request.py", line 534, in _open
    result = self._call_chain(self.handle_open, protocol, protocol +
  File "/usr/lib/python3.9/urllib/request.py", line 494, in _call_chain
    result = func(*args)
  File "/usr/lib/python3.9/urllib/request.py", line 1389, in https_open
    return self.do_open(http.client.HTTPSConnection, req,
  File "/usr/lib/python3.9/urllib/request.py", line 1349, in do_open
    raise URLError(err)
urllib.error.URLError: <urlopen error [Errno -3] Temporary failure in name resolution>

Second attempt:

[00:00:00:00:00:00] Connected
self.mac 00:00:00:00:00:00
Downloading https://github.com/InfiniTimeOrg/InfiniTime/releases/download/1.7.0/pinetime-mcuboot-app-dfu-1.7.0.zip
preparing pinetime-mcuboot-app-image-1.7.0.bin for 00:00:00:00:00:00
Binary image size: 365720
Binary CRC32: 2106408772
[00:00:00:00:00:00] Resolved services
[INFO ] Waiting for Image Size notification
[INFO ] Waiting for INIT DFU notification
Begin DFU
[INFO ] Disabling GNOME idle timeout
[INFO ] Disabling GNOME inactivity sleeping
[INFO ] Sending Validate command
Downloading https://github.com/InfiniTimeOrg/InfiniTime/releases/download/1.7.0/pinetime-mcuboot-app-dfu-1.7.0.zip
preparing pinetime-mcuboot-app-image-1.7.0.bin for 00:00:00:00:00:00
Binary image size: 365720
Binary CRC32: 2106408772
[00:00:00:00:00:00] Resolved services
[INFO ] Waiting for Image Size notification

The PineTime does indeed fail to update, but I believe InfiniTime 1.7.0 to be at fault as I got the same problem with GadgetBridge. It will not pass 0%, after a short while the PineTime simply says "Error".

https://i.imgur.com/SijiYW9.png

theironrobin commented 2 years ago

sorry you are having so many issues @InFerYes ! i was able to update my firmware with no issues yesterday.

InFerYes commented 2 years ago

I have opened an issue on the InfiniTime tracker: https://github.com/InfiniTimeOrg/InfiniTime/issues/831

theironrobin commented 2 years ago

closing at it appears to be an upstream issue.