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

Rmfuse starting multiple workers while there is no tasks waiting. #29

Closed
Zhaith-Izaliel opened this issue Sep 9, 2021 · 3 comments
Closed

Comments

@Zhaith-Izaliel
Copy link

Hello,

I have a problem using rmfuse. When I try to run it it dies after a short time with an exit code 1. I'm not sure if the problem is from rmfuse, I think it might be my mistake however, I don't know where to ask this, so does someone have a clue why it doesn't work ? Here is the debug output:

DEBUG:pyfuse3:Initializing pyfuse3
DEBUG:pyfuse3:Calling fuse_session_new
DEBUG:pyfuse3:Calling fuse_session_mount
DEBUG:rmfuse.fuse:Mounting on /home/zhaith/reMarkable
DEBUG:pyfuse3:pyfuse-02: No tasks waiting, starting another worker (now 2 total).
DEBUG:rmcl.api:Renewing user token
DEBUG:pyfuse3:pyfuse-03: No tasks waiting, starting another worker (now 3 total).
DEBUG:pyfuse3:pyfuse-04: No tasks waiting, starting another worker (now 4 total).
DEBUG:pyfuse3:pyfuse-05: No tasks waiting, starting another worker (now 5 total).
DEBUG:pyfuse3:pyfuse-06: No tasks waiting, starting another worker (now 6 total).
DEBUG:rmcl.api:Renewing user token
DEBUG:pyfuse3:Calling fuse_session_unmount
DEBUG:pyfuse3:Calling fuse_session_destroy

Also, I'm running it on NixOS using this Nix Expression.

Thank you for reading, and taking the time to help me on this ^^

Have a nice day.

@kwshi
Copy link

kwshi commented Sep 19, 2021

I'm facing a similar (probably the same) issue with the following log:

❯ rmfuse -v ~/remarkable/
DEBUG:pyfuse3:Initializing pyfuse3
DEBUG:pyfuse3:Calling fuse_session_new
DEBUG:pyfuse3:Calling fuse_session_mount
DEBUG:rmfuse.fuse:Mounting on /home/kshi/remarkable/
DEBUG:pyfuse3:pyfuse-02: No tasks waiting, starting another worker (now 2 total).

DEBUG:rmcl.api:Renewing user token
DEBUG:pyfuse3:Calling fuse_session_unmount
DEBUG:pyfuse3:Calling fuse_session_destroy

One possibly relevant observation: the file ~/.config/rmcl/config.json, which to my belief is supposed to store the access token to the RM cloud API, instead contains a bunch of HTML tags as the devicetoken:

{
  "devicetoken": "<!doctype html><html><head><meta charset=\"utf-8\"/><meta name=\"viewport\" content=\"width=device-width,initial-scale=1,user-scalable=no,minimum-scale=1,maximum-scale=1\"/><title>reMarkable &bull; Device Activation</title><link rel=\"shortcut icon\" href=\"/assets/favicon.ico\"><link rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/assets/favicon-16x16.png\"><link rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/assets/favicon-32x32.png\"><link rel=\"icon\" type=\"image/png\" sizes=\"48x48\" href=\"/assets/favicon-48x48.png\"><link rel=\"manifest\" href=\"/assets/manifest.json\"><meta name=\"mobile-web-app-capable\" content=\"yes\"><meta name=\"theme-color\" content=\"#fff\"><meta name=\"application-name\" content=\"cloud-webapp-frontend\"><link rel=\"apple-touch-icon\" sizes=\"57x57\" href=\"/assets/apple-touch-icon-57x57.png\"><link rel=\"apple-touch-icon\" sizes=\"60x60\" href=\"/assets/apple-touch-icon-60x60.png\"><link rel=\"apple-touch-icon\" sizes=\"72x72\" href=\"/assets/apple-touch-icon-72x72.png\"><link rel=\"apple-touch-icon\" sizes=\"76x76\" href=\"/assets/apple-touch-icon-76x76.png\"><link rel=\"apple-touch-icon\" sizes=\"114x114\" href=\"/assets/apple-touch-icon-114x114.png\"><link rel=\"apple-touch-icon\" sizes=\"120x120\" href=\"/assets/apple-touch-icon-120x120.png\"><link rel=\"apple-touch-icon\" sizes=\"144x144\" href=\"/assets/apple-touch-icon-144x144.png\"><link rel=\"apple-touch-icon\" sizes=\"152x152\" href=\"/assets/apple-touch-icon-152x152.png\"><link rel=\"apple-touch-icon\" sizes=\"167x167\" href=\"/assets/apple-touch-icon-167x167.png\"><link rel=\"apple-touch-icon\" sizes=\"180x180\" href=\"/assets/apple-touch-icon-180x180.png\"><link rel=\"apple-touch-icon\" sizes=\"1024x1024\" href=\"/assets/apple-touch-icon-1024x1024.png\"><meta name=\"apple-mobile-web-app-capable\" content=\"yes\"><meta name=\"apple-mobile-web-app-status-bar-style\" content=\"black-translucent\"><meta name=\"apple-mobile-web-app-title\" content=\"cloud-webapp-frontend\"><meta name=\"msapplication-TileColor\" content=\"#fff\"><meta name=\"msapplication-TileImage\" content=\"/assets/mstile-144x144.png\"><meta name=\"msapplication-config\" content=\"/assets/browserconfig.xml\"><script defer=\"defer\" src=\"/app-2399790d339e583b90eb.js\"></script><link href=\"/app-379d6bb3118c41d161a9.css\" rel=\"stylesheet\"></head><body><div id=\"header\"></div><div id=\"root\"></div></body></html>"
}

Perhaps this is an indication that the underlying rmcl API calls are accessing now-deprecated/dysfunctional endpoints and mistakenly treating an error HTML page as the "device token".

FWIW, I'm having this issue on rmfuse 0.2.1; has this been fixed as of 0.2.3? (I haven't checked and am not that sure how to. I am also on NixOS.)

Also, this issue seems related to (same as?) #9, which seems to have been closed without a fix.

@kwshi
Copy link

kwshi commented Sep 19, 2021

I just downloaded the 0.2.3 (latest as of writing) source release from GitHub, cleared the rmcl cache, and tested this again. Good news: the issue seems to have been fixed for me! rmfuse mounted normally & I was able to list contents, access PDF exports of notebooks (very slow but successful), and upload custom PDF ebooks.

Here are the steps I took to test 0.2.3 (probably not the most pure-NixOS way to do it, but whatever):

# download 0.2.3 source archive
cd /tmp
curl -LO 'https://github.com/rschroll/rmfuse/archive/refs/tags/v0.2.3.tar.gz' | tar -xzv

# install rmfuse dependencies/set up temporary environment
cd rmfuse-0.2.3
nix-shell -p python38Packages.pyfuse3 python38Packages.poetry
poetry install

# run rmfuse 0.2.3 from source
poetry run rmfuse -v ~/remarkable

@Zhaith-Izaliel let me know if this works for you-- if so, we can probably close this issue here & work on updating the version of rmfuse in the NixOS repos.

@Zhaith-Izaliel
Copy link
Author

Hello @kwshi,
Sorry for the wait, I wasn't on github for the past couple days !
I tried your solution and it worked ! I will close this issue then. I'm now working on a pull request for nixpkgs to change the package ASAP since I already did it to further test it and my update works ! :)

Thanks again for your help, have a nice day ! :)

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