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

interface {} is nil, not string #1

Closed
mdingemanse opened this issue Sep 23, 2024 · 3 comments
Closed

interface {} is nil, not string #1

mdingemanse opened this issue Sep 23, 2024 · 3 comments

Comments

@mdingemanse
Copy link

Thanks for this tool! USB web interface is enabled on my tablet and I'm on version 3.14.1.9.

Running rmweb list I get:

panic: interface conversion: interface {} is nil, not string

goroutine 1 [running]:
main.read_files()
        /Users/jms1/git/kg4zow/rmweb/read_files.go:114 +0xc6a
main.do_list({0x1c08188, 0x0, 0x0})
        /Users/jms1/git/kg4zow/rmweb/do_list.go:21 +0x26
main.main()
        /Users/jms1/git/kg4zow/rmweb/main.go:205 +0x3ba

Is that a hardcoded user string?

@kg4zow
Copy link
Owner

kg4zow commented Sep 24, 2024

The path in the filenames is where the source code was on my laptop when I compiled the program.

The read_files.go:114 is the filename and line number in the source code, which is this line.

It looks like maybe when it downloaded the list of files in that directory, one of the files didn't have a sizeInBytes entry. What software version is running on your tablet? Maybe reMarkable changed something after the 3.10 version I'm using.

@kg4zow
Copy link
Owner

kg4zow commented Sep 24, 2024

I upgraded one of my experimenting tablets to 3.14 a few days ago, to test an issue with the rmbackup script. I just tried rmweb with that tablet, and got the same error message you did.

I added a debug message which shows the full JSON outputs when retrieving the list of files from the tablet. It looks like reMarkable changed the format of the JSON returned by the directory list request between 3.10 and 3.14, so it no longer contains the file size and page count. The built-in web interface doesn't show this information, so I guess they figure there's no need to include it.

I've updated the program so it checks whether these items are present. If not, it won't try to read them (which is what was causing the error message you found). In addition, the output of rmweb list won't include values in those columns. I thought about removing those two columns entirely (if the values weren't there) but I decided to leave them, to remind myself that this is a case where reMarkable removed functionality that other programs were relying on. Unofficial third-party programs to be sure, but it's still a step in the wrong direction IMHO.

Please try the new version and let me know what happens.

https://github.com/kg4zow/rmweb/releases/tag/v0.8

@mdingemanse
Copy link
Author

I agree with you! Don't have my tablet to try right now but this seems a good fix — can be closed as far as I'm concerned

@kg4zow kg4zow closed this as completed Oct 5, 2024
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

2 participants