Coder Social home page Coder Social logo

Fresh install crash about remarkablepocket HOT 9 CLOSED

sinux-l5d avatar sinux-l5d commented on August 18, 2024
Fresh install crash

from remarkablepocket.

Comments (9)

nov1n avatar nov1n commented on August 18, 2024

Hi, I suspect this is due to a problem with the mounted config files. Please make sure the files ./data/remarkable-pocket and the two others exist on the host before running docker compose.

I added a section to the readme to clarify this.

from remarkablepocket.

sinux-l5d avatar sinux-l5d commented on August 18, 2024

Hi, thanks for the tip. I figured out that I was missing an importent point: remarkable-pocket and rmapi are files, whereas rmapi-cache is a directory (I thought it was all dir).
That said, I have another issue that make it crash right avec authorization:

Exception encountered during context initialization - cancelling refresh attempt: 
org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'nl.carosi.remarkablepocket.MetadataProvider': 
Unsatisfied dependency expressed through constructor parameter 0; 
nested exception is org.springframework.beans.factory.BeanCreationException: 
Error creating bean with name 'pocket' defined in nl.carosi.remarkablepocket.SyncApplication: 
Bean instantiation via factory method failed; 
nested exception is org.springframework.beans.BeanInstantiationException: 
Failed to instantiate [pl.codeset.pocket.Pocket]: 
Factory method 'pocket' threw exception; 
nested exception is java.lang.NullPointerException: 
Cannot invoke "java.io.InputStream.read(byte[], int, int)" because "is" is null

from remarkablepocket.

nov1n avatar nov1n commented on August 18, 2024

I will need a bit more info to help you. Can you rerun with verbose enabled and paste the output?

from remarkablepocket.

sinux-l5d avatar sinux-l5d commented on August 18, 2024

Sorry for the delay. I just get this error with verbose on, a lot of times per seconds:

[2022-11-05 00:45:18] Created temporary storage directory: /tmp/16381811871600645528.
[2022-11-05 00:45:18] Created temporary working directory: /tmp/6750401861237256101.
[2022-11-05 00:45:18] ERROR
[2022-11-05 00:45:18] 2022/11/05 00:45:18 auth.go:73
[2022-11-05 00:45:18] Code has the wrong length, it should be 8
[2022-11-05 00:45:18] Enter one-time code (go to https://my.remarkable.com/device/desktop/connect)

The remarkable-pocket file looks kind of like this:

pocket.access.token=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxx

from remarkablepocket.

sinux-l5d avatar sinux-l5d commented on August 18, 2024

I have found the problem: the program waits to stdin, which docker compose doesn't set up by default. It works with docker CLI because in your example, you use the -it options

Because you use a webserver to handle the pocket connection, would it be possible to do the same for the reMarkable one-time password?

from remarkablepocket.

nov1n avatar nov1n commented on August 18, 2024

Thanks for debugging this one. I didn't consider the auth flow for docker-compose.

It seems something like dc up -d && docker attach $(docker-compose ps -q remarkable-pocket) if you set stdin_open: true in the docker-compose.yml could work, but when exiting the process with Ctrl-C the container will actually stop so that's not ideal.

Wrt to your suggestion: the Pocket auth flow uses oath, making a browser a necessity. I'd rather not change the Remarkable auth flow to accommodate the docker-compose usecase.

I think the easiest solution is to use the docker run command the first time in order to complete authentication. As this only needs to happen once, it shouldn't be too much effort, and I can explain this in the readme. Would that work for you?

from remarkablepocket.

sinux-l5d avatar sinux-l5d commented on August 18, 2024

Your solution should work for docker compose.

However, the constraint of having to copy and paste the code is breaking every tentative to automate the start-up.

If not with the webserver, maybe provide an alternative way with a environment variable? If it's set, no need to ask it via stdin :)

from remarkablepocket.

nov1n avatar nov1n commented on August 18, 2024

It's not possible to automate the Pocket oauth flow, regardless of how the Remarkable cloud code is provided. I don't see how providing the code through an env var would solve this.

What would you like to automate? The way I see it you authenticate once manually to create the config files, and then you can automate the start-up any way you like.

from remarkablepocket.

nov1n avatar nov1n commented on August 18, 2024

I'll close this as a solution now exists.

from remarkablepocket.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.