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

Connection failed #19

Closed
siraben opened this issue Oct 9, 2020 · 10 comments
Closed

Connection failed #19

siraben opened this issue Oct 9, 2020 · 10 comments

Comments

@siraben
Copy link

siraben commented Oct 9, 2020

While packaging up rmview using Nix, I encountered the following error when I run it. The IP is live and SSH works. What could be the cause?

Please check your reMarkable is properly configured, see the documentation for instructions.

Connection failed: [Failure instance: Traceback (failure with no frames): <class 'twisted.internet.error.ConnectionRefusedError'>: Connection was refused by other side: 61: Connection refused.
]
@siraben
Copy link
Author

siraben commented Oct 10, 2020

I should note that this only happens when trying to build using Nix at rev e3a0384edf0fb05b9572be6813601d9bc8774de4
config.json

{
  "ssh": {
    "address": "10.11.99.1",
    "username": "root",
    "key": "~/.ssh/id_rsa",
    "timeout": 1
  },
  "orientation": "portrait",
  "pen_size": 10,
  "pen_color": "red",
  "background_color": "white"
}

@siraben
Copy link
Author

siraben commented Oct 10, 2020

Found the cause of the issue, the rM-vnc-server mxc_epdc_fb_damage.ko binaries on the rM had to be overwritten.

@siraben siraben closed this as completed Oct 10, 2020
@anka-213
Copy link

Did you succeed at packaging this?

@siraben
Copy link
Author

siraben commented Dec 11, 2020

Yes, I did.

default.nix
{ pkgs ? import <nixpkgs> { } }:
with pkgs;

libsForQt5.callPackage ./rmview.nix { }
rmview.nix
{ stdenv, fetchFromGitHub, mkDerivationWith, python3Packages }:

mkDerivationWith python3Packages.buildPythonApplication rec {
  pname = "rmview";
  version = "1.0";

  src = fetchFromGitHub {
    owner = "bordaigorl";
    repo = "rmview";
    rev = "v${version}";
    sha256 = "1d90cdvwxhdx5m9pv7wdnkrywnxsjs73z2w3xgrcafviwlpyy857";
  };

  patchPhase = "substituteInPlace src/rmview/rmview.py --replace 'from . import resources' ''";

  preFixup = ''
    makeWrapperArgs+=("''${qtWrapperArgs[@]}")
  '';

  propagatedBuildInputs = with python3Packages; [
    pyqt5
    paramiko
    twisted
  ];

  meta = with stdenv.lib; {
    homepage = "https://github.com/bordaigorl/rmview";
    description = "Library to get the currently playing song and artist from Spotify";
    license = licenses.mit;
    maintainers = with maintainers; [ siraben ];
    platforms = platforms.unix;
  };
}

@anka-213
Copy link

Thanks!

@anka-213
Copy link

Hmm, I get a segfault:

  copying src/rmview/viewer.py -> build/lib/rmview
  copying src/rmview/rmparams.py -> build/lib/rmview
  copying src/rmview/__init__.py -> build/lib/rmview
  copying src/rmview/connection.py -> build/lib/rmview
  copying src/rmview/rfb.py -> build/lib/rmview
  copying src/rmview/workers.py -> build/lib/rmview
  copying src/rmview/__main__.py -> build/lib/rmview
  installing to build/bdist.macosx-10.6-x86_64/wheel
  running install
  /nix/store/31g9w6f5nmbcqjllx6cflazaxh7f3008-setuptools-setup-hook/nix-support/setup-hook: line 17:  2730 Segmentation fault: 11  /nix/store/65gmh01007csxmd6bbkvas8zkhlw0k7n-python3-3.8.6/bin/python3.8 nix_run_setup bdist_wheel

Do you have any clue why?

@siraben
Copy link
Author

siraben commented Dec 11, 2020

Interesting. What platform are you on?

@anka-213
Copy link

Darwin

@siraben
Copy link
Author

siraben commented Dec 11, 2020

Is your channel up to date? The only inconsistency between our machines then must be the channel since I put <nixpkgs> as the default value for pkgs.

Edit: I just ran nix-build --check and it still builds as before.

@siraben
Copy link
Author

siraben commented Dec 20, 2020

For anyone reading this, the issue @anka-213 encountered was fixed by disabling sandboxing in nix.conf since it is problematic on macOS.

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