bordaigorl / rmview

A live viewer for reMarkable written in PyQt5
GNU General Public License v3.0
742 stars 61 forks source link

Fix screenshare in Remarkable 3.11 #159

Closed rafael-genes closed 1 month ago

rafael-genes commented 2 months ago

Hello folks, my Remarkable just got updated and the Screenshare got in a failing loop with the followign error:

[INFO] received timestamp challenge 1714161646899
Unhandled Error
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/dist-packages/twisted/python/log.py", line 80, in callWithContext
    return context.call({ILogContext: newCtx}, func, *args, **kw)
  File "/usr/local/lib/python3.10/dist-packages/twisted/python/context.py", line 117, in callWithContext
    return self.currentContext().callWithContext(ctx, func, *args, **kw)
  File "/usr/local/lib/python3.10/dist-packages/twisted/python/context.py", line 82, in callWithContext
    return func(*args, **kw)
  File "/usr/local/lib/python3.10/dist-packages/twisted/internet/posixbase.py", line 482, in _doReadOrWrite
    why = selectable.doRead()
--- <exception caught here> ---
  File "/usr/local/lib/python3.10/dist-packages/twisted/internet/udp.py", line 254, in doRead
    self.protocol.datagramReceived(data, addr)
  File "/usr/local/lib/python3.10/dist-packages/rmview/screenstream/screenshare.py", line 46, in datagramReceived
    if not self.callback(timestamp):
  File "/usr/local/lib/python3.10/dist-packages/rmview/screenstream/screenshare.py", line 120, in runVnc
    userId = self.get_userid()
  File "/usr/local/lib/python3.10/dist-packages/rmview/screenstream/screenshare.py", line 101, in get_userid
    with sftp.file('/etc/remarkable.conf') as f:
  File "/usr/lib/python3/dist-packages/paramiko/sftp_client.py", line 372, in open
    t, msg = self._request(CMD_OPEN, filename, imode, attrblock)
  File "/usr/lib/python3/dist-packages/paramiko/sftp_client.py", line 822, in _request
    return self._read_response(num)
  File "/usr/lib/python3/dist-packages/paramiko/sftp_client.py", line 874, in _read_response
    self._convert_status(msg)
  File "/usr/lib/python3/dist-packages/paramiko/sftp_client.py", line 903, in _convert_status
    raise IOError(errno.ENOENT, text)
builtins.FileNotFoundError: [Errno 2] No such file

Seems like the /etc/remarkable.conf file is moved to /home/root/.config/remarkable/xochitl.conf in version 3.11.

leoluk commented 2 months ago

Works :+1:

You'd have to check both locations for backwards compatibility, though

rafael-genes commented 1 month ago

Good point @leoluk. I just updated to have an array of possible locations. Tested with 3.10 and 3.11 versions

bbolker commented 1 month ago

FWIW this didn't work for me (I didn't try too hard, though), solved by ssh'ing in and setting up a symbolic link (in case that helps anyone else).

CullenShane commented 1 month ago

I was able to test this branch and it worked as expected with 3.11.2.5.

boussou commented 1 month ago

Hi all, this shall be ready for merge?