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

Sync stopped working #5

Closed
marcusramberg opened this issue Jan 12, 2022 · 22 comments
Closed

Sync stopped working #5

marcusramberg opened this issue Jan 12, 2022 · 22 comments
Labels
bug Something isn't working

Comments

@marcusramberg
Copy link

[2022-01-12 23:22:05] Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'nl.carosi.remarkablepocket.RemarkableService': Invocation of init method failed; nested exception is java.lang.NullPointerException: Cannot invoke "java.util.List.stream()" because the return value of "es.jlarriba.jrmapi.Jrmapi.listDocs()" is null

@nov1n nov1n added the bug Something isn't working label Jan 13, 2022
@nov1n
Copy link
Owner

nov1n commented Jan 13, 2022

I have not encountered this before. Can you try to remove the ~/.remarkable-pocket config file and perform authorization again?

It may also be related to the new sync protocol that is gradually being rolled out (see juruen/rmapi#187). I am currently still on the old version, so this is difficult for me to test.

@marcusramberg
Copy link
Author

Reauth didn't work. It's probably related to new sync as you say.

@jsainzvela
Copy link

Same problem here... :(

Tried the reauthentication, but getting the same error

@andypillip
Copy link

I got this today, but the message is preceeded by

[2022-04-07 06:26:18] deleted device

[2022-04-07 06:26:18] Serving request failed, Msg: invalid token: token contains an invalid number of segments: invalid token, Origin: invalid token: token contains an invalid number of segments: invalid token, HTTPCode: 401

@andypillip
Copy link

I tried starting remarkable-pocket with --reset-credentials. Right after, it’s providing the same error. ):

Also, it seems that --verbose does not activate debugging within rmapi, otherwise it would output get’s result. I do not know how to debug further.

@nov1n nov1n pinned this issue Apr 13, 2022
@nov1n
Copy link
Owner

nov1n commented Apr 13, 2022

To enable debug logging for the rmapi client you can add --env LOGGING_LEVEL_ES_JLARRIBA_JRMAPI=DEBUG to the docker run command.

I'm still on the old sync protocol so it's working fine for me.

If you could paste the result of the GET request that would help confirm it is indeed the new sync protocol causing this issue.

@nov1n nov1n mentioned this issue May 29, 2022
@testingtony
Copy link

@nov1n I'm getting this on a new build / install. Would debugging output still be useful to you?

@andypillip
Copy link

I’m getting a 401 Unauthorized.

…
[2022-07-11 17:54:57] https://document-storage-production-dot-remarkable-production.appspot.com/document-storage/json/2/docs
[2022-07-11 17:54:57] [java.net.http.HttpHeaders@4866f30b { {Authorization=[Bearer eyJhbGciOiJIUzI1NiIsImtpZCI6IjEiLCJ0eXAiOiJKV1QifQ.e…], Content-Type=[application/json]} }]
[2022-07-11 17:54:58] 401
[2022-07-11 17:54:58] 
[2022-07-11 17:54:58] null
[2022-07-11 17:54:58] Exception encountered during context initialization - cancelling refresh
…

Does this help? (:

@nov1n
Copy link
Owner

nov1n commented Jul 16, 2022

I suspect this is indeed the new sync protocol. Adding support is still on my list, but it will be much easier to test once I also get the new version (not sure why that's not happening...).

@fairlygood
Copy link

Same issue here. I definitely am on the new sync protocol - so that would explain it. Hope they roll it out to you soon!

@nov1n
Copy link
Owner

nov1n commented Aug 31, 2022

So I finally got upgraded to the new sync protocol and found some time to add support.

I used rmapi to connect to Remarkable Cloud, and their readme states that support for the new protocol is not yet tested through so it is recommended to keep a backup handy. That said I've been running it for about a week without any problems.

The code is currently on a branch, and I will create a release once it keeps working for a few more weeks without problems.

If you want to help me test it the command is:

touch ~/.remarkable-pocket ~/.rmapi && mkdir -p ~/.rmapi-cache && docker run -it --env TZ=Europe/Amsterdam -p 65112:65112 -v ~/.remarkable-pocket:/root/.remarkable-pocket -v ~/.rmapi:/root/.rmapi -v ~/.rmapi-cache:/root/.cache/rmapi ghcr.io/nov1n/remarkable-pocket:0.1.0

Please let me know if you encounter any problems.

@testingtony
Copy link

Thanks for getting this working @nov1n . I don't use docker but have compiled it on a raspberry pi and it's worked well so far. I did see one strange occurrance which is an article I'd just read was marked as read, deleted the re-uploaded. The article remains in my lists whereas the other one that was read is moved to the archive

[2022-09-02 20:28:32] Starting sync...
[2022-09-02 20:28:49] Found 2 read article(s) on Remarkable.
[2022-09-02 20:28:49] (1/2) Marking 'Why Sarah Tulip is on a mission to increase diversity in the Leeds tech sector' as read on Pocket...
[2022-09-02 20:28:51] (1/2) Deleting 'Why Sarah Tulip is on a mission to increase diversity in the Leeds tech sector' from Remarkable...
[2022-09-02 20:28:52] (2/2) Marking 'The Neuroscience of Breaking Out of Negative Thinking (and How to Do It in Under 30 Seconds)' as read on Pocket...
[2022-09-02 20:28:52] (2/2) Deleting 'The Neuroscience of Breaking Out of Negative Thinking (and How to Do It in Under 30 Seconds)' from Remarkable...
[2022-09-02 20:28:55] Found 8 unread article(s) on Remarkable. Downloading 2 more from Pocket.
[2022-09-02 20:28:55] (1/2) Downloading: 'A Stranger Looked Like My Twin. That Was Just the Beginning.'.
[2022-09-02 20:29:01] Downloaded article is invalid. See https://github.com/nov1n/RemarkablePocket#limitations for possible causes.
[2022-09-02 20:29:01] (2/2) Downloading: 'The Neuroscience of Breaking Out of Negative Thinking (and How to Do It in Under 30 Seconds)'.
[2022-09-02 20:29:08] (3/2) Downloading: 'Nadiya Hussain Caramel Soda Bread Tear and Share Recipe'.
[2022-09-02 20:29:13] Downloaded article is invalid. See https://github.com/nov1n/RemarkablePocket#limitations for possible causes.
[2022-09-02 20:29:13] (4/2) Downloading: 'Douglas Coupland on Generation X at 30 - 'Generational trashing is eternal''.
[2022-09-02 20:29:19] Uploading 2 article(s) to Remarkable.
[2022-09-02 20:29:19] (1/2) Uploading: 'The Neuroscience of Breaking Out of Negative Thinking (and How to Do It in Under 30 Seconds).epub'.
[2022-09-02 20:29:21] (2/2) Uploading: 'Douglas Coupland on Generation X at 30 - 'Generational trashing is eternal'.epub'.
[2022-09-02 20:29:23] Completed sync in 51s.
[2022-09-02 20:29:23] Next sync in 10m.

[2022-09-02 20:39:23] Starting sync...
[2022-09-02 20:39:40] Found 1 read article(s) on Remarkable.
[2022-09-02 20:39:40] (1/1) Marking 'The Neuroscience of Breaking Out of Negative Thinking (and How to Do It in Under 30 Seconds)' as read on Pocket...
[2022-09-02 20:39:40] (1/1) Deleting 'The Neuroscience of Breaking Out of Negative Thinking (and How to Do It in Under 30 Seconds)' from Remarkable...
[2022-09-02 20:39:43] Found 9 unread article(s) on Remarkable. Downloading 1 more from Pocket.
[2022-09-02 20:39:43] (1/1) Downloading: 'A Stranger Looked Like My Twin. That Was Just the Beginning.'.
[2022-09-02 20:39:43] (2/1) Downloading: 'The Neuroscience of Breaking Out of Negative Thinking (and How to Do It in Under 30 Seconds)'.
[2022-09-02 20:39:49] Uploading 1 article(s) to Remarkable.
[2022-09-02 20:39:49] (1/1) Uploading: 'The Neuroscience of Breaking Out of Negative Thinking (and How to Do It in Under 30 Seconds).epub'.
[2022-09-02 20:39:51] Completed sync in 27s.
[2022-09-02 20:39:51] Next sync in 10m.

@fairlygood
Copy link

Confirmed working here also. Much better than the solution that I had cobbled together myself!

@kristiankyvik
Copy link

Confirmed it works here as well! Thanks so much for sharing the fix!

@nov1n
Copy link
Owner

nov1n commented Sep 4, 2022

@testingtony can you check whether the article was actually archived on Pocket?

@testingtony
Copy link

testingtony commented Sep 4, 2022 via email

@nov1n
Copy link
Owner

nov1n commented Sep 4, 2022

That is very strange indeed. I cannot reproduce this but will add a check that prevents previously read articles from being reuploaded, regardless of their archive status on Pocket.

@testingtony
Copy link

testingtony commented Sep 4, 2022 via email

@nov1n
Copy link
Owner

nov1n commented Sep 4, 2022

Can you try touch ~/.remarkable-pocket ~/.rmapi && mkdir -p ~/.rmapi-cache && docker run -it --env TZ=Europe/Amsterdam -p 65112:65112 -v ~/.remarkable-pocket:/root/.remarkable-pocket -v ~/.rmapi:/root/.rmapi -v ~/.rmapi-cache:/root/.cache/rmapi ghcr.io/nov1n/remarkable-pocket:0.2.0 -v ?

@nov1n
Copy link
Owner

nov1n commented Sep 5, 2022

Closed in #7

@testingtony
Copy link

testingtony commented Oct 11, 2022 via email

@nov1n
Copy link
Owner

nov1n commented Oct 11, 2022

There are currently a number of problems because Remarkable changed their API again, see #11.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

7 participants