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

RM FW 3.14.1.9 -- FileNotFoundError #169

Closed
siccegge opened this issue Sep 19, 2024 · 3 comments
Closed

RM FW 3.14.1.9 -- FileNotFoundError #169

siccegge opened this issue Sep 19, 2024 · 3 comments

Comments

@siccegge
Copy link

Hi!

rmview doesn't start any more and fails with an FileNotFoundError at with sftp.file('/etc/remarkable.conf') as f: -- I can confirm this file indeed does not seem to exist on the remarkable's file system

config:

{
  "ssh": {"password": "XXXXXXXX"},
  "backend": "screenshare",
  "orientation": "auto",
  "pen_size": 15,
  "pen_color": "red",
  "pen_trail": 200,
  "background_color": "white",
  "hide_pen_on_press": true
}

Log output

% python3 -m rmview example.json
2024-09-19 10:27:38+0200 [-] Log opened.
[INFO] STARTING: Thu Sep 19 10:27:38 2024
[INFO] Searching configuration in example.json, rmview.json, /home/christoph/.config/rmview.json
[INFO] Fetching configuration from example.json
[WARNING] Config file "example.json" is readable by others (permissions=644). If your config file contains secrets (e.g. password) you are strongly encouraged to make sure it's not readable by other users (chmod 600 example.json)
qt.qpa.xcb: QXcbConnection: XCB error: 3 (BadWindow), sequence: 702, resource id: 14929275, major code: 40 (TranslateCoords), minor code: 0
[INFO] Using known hosts file: /home/christoph/.config/rmview_known_hosts
[INFO] Loaded known hosts from /home/christoph/.config/rmview_known_hosts
[INFO] Connecting...
[INFO] Connected to 10.11.99.1
[INFO] Detected SW version: 3.14.1.9
[INFO] Detected device: reMarkable 2.0
[INFO] Using backend 'screenshare'
[INFO] Connecting to ScreenShare, make sure you enable it
[WARNING] Authenticating, please wait...
2024-09-19 10:27:40+0200 [-] ChallengeReaderProtocol starting on 5901
2024-09-19 10:27:40+0200 [-] Starting protocol <rmview.screenstream.screenshare.ChallengeReaderProtocol object at 0x7fe7e5098cd0>
[INFO] received timestamp challenge 1726734319395
2024-09-19 10:27:42+0200 [ChallengeReaderProtocol (UDP)] Unhandled Error
	Traceback (most recent call last):
	  File "/usr/lib/python3/dist-packages/twisted/python/log.py", line 80, in callWithContext
	    return context.call({ILogContext: newCtx}, func, *args, **kw)
	  File "/usr/lib/python3/dist-packages/twisted/python/context.py", line 117, in callWithContext
	    return self.currentContext().callWithContext(ctx, func, *args, **kw)
	  File "/usr/lib/python3/dist-packages/twisted/python/context.py", line 82, in callWithContext
	    return func(*args, **kw)
	  File "/usr/lib/python3/dist-packages/twisted/internet/posixbase.py", line 683, in _doReadOrWrite
	    why = selectable.doRead()
	--- <exception caught here> ---
	  File "/usr/lib/python3/dist-packages/twisted/internet/udp.py", line 254, in doRead
	    self.protocol.datagramReceived(data, addr)
	  File "/home/christoph/Projects/Software/rmview/src/rmview/screenstream/screenshare.py", line 46, in datagramReceived
	    if not self.callback(timestamp):
	  File "/home/christoph/Projects/Software/rmview/src/rmview/screenstream/screenshare.py", line 119, in runVnc
	    userId = self.get_userid()
	  File "/home/christoph/Projects/Software/rmview/src/rmview/screenstream/screenshare.py", line 100, 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
@siccegge
Copy link
Author

The following fixes it for me though

--- a/src/rmview/screenstream/screenshare.py
+++ b/src/rmview/screenstream/screenshare.py
@@ -97,7 +97,7 @@ class ScreenShareStream(QRunnable):
   """
   def get_userid(self):
     with self.ssh.open_sftp() as sftp:
-      with sftp.file('/etc/remarkable.conf') as f:
+      with sftp.file('/home/root/.config/remarkable/xochitl.conf') as f:
         file_content = f.read().decode()
 
     cfg = configparser.ConfigParser(strict=False)

@siccegge
Copy link
Author

Note: #165 has this also somewhere in the second commit

@siccegge
Copy link
Author

hm and somehow I tried to update before filing this issue but somehow failed? sorry for the noise (cf #159 )

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

1 participant