Open danielhodder opened 4 years ago
FYI, I have also come across this error on my mobile device. Using Userland on LXDL Desktop, on a Pixel 3a device.
seth@localhost:~$ code-oss internal/modules/cjs/loader.js:720 throw err; ^
Error: Cannot find module './bootstrap' Require stack:
Yup that's the same issue. Unfortunately, there's been no movement on either of the issues in UserLAnd. For now you can compile a customer version of UserLAnd with the proot fix and that seems to work.
Will test when I can. Lots to do this week yet.
Pardon my ignorance, how do I merge the proot changes into userland for use with a distro?
Incidentally, I'm currently stuck just getting proot to compile.
This doesn't seem to be well documented and I can't find my exact notes anymore. You use https://github.com/CypherpunkArmory/UserLAnd-Assets-Support but I think I modified some of the scripts slightly. You need to not pull proot from github but instead copy the version from this branch in.
That will will build a proot binary, which you can then rename to proot.so
and put it into https://github.com/CypherpunkArmory/UserLAnd. It needs to be renamed because Android doesn't allow shipping binary executables, but they do allow shared libraries for some reason.
Once you've done that I side-loaded the APK from Android Studio using developer mode on my phone/tablet. Hope that helps some.
Oh for clarity I cloned the repo and started it like this:
$ docker run --rm -it --volume $PWD/UserLAnd-Assets-Support:/build termux/package-builder
Sorry, but I'm a beginner, so is there anyway you could provide a more step-by-step guide to fixing the error?
I'm going to leave out some finer details, but this is what I did:
android studio up to date clone https://github.com/CypherpunkArmory/UserLAnd and import workspace into android studio get virtualbox installed, and get a debian vm running on debian vm install git clone https://github.com/CypherpunkArmory/UserLAnd-Assets-Support inside that directory run: sed -e 's/CypherpunkArmory/danielhodder/' -i scripts/buildArch.sh on vm install docker following this process: https://docs.docker.com/install/linux/docker-ce/debian/ run docker command from home directory docker run --rm -it --volume $PWD/UserLAnd-Assets-Support:/build termux/package-builder (I hard coded PWD to the directory the asset-support folder was cloned into) once container is up and running, and you're interactive navigate to /build/scripts run ./buildArch.sh arm64 (or whatever your target arch is) after it's done, delete output directory navigate to build/proot directory and run git checkout remotes/origin/bugfix/UserLAnd_97_fix_seccomp_handling_for_unknown_system_calls navigate back to script directory re run your buildArch.sh arm64 figure out how to get the output directory back to your main machine
navigate to your Userland base directory, and then to: app/src/main/jniLibs/the arch you chose rename the files in your output directory to match what's in the jnilibs folder proot -> lib_proot.so...etc. kick your build job kick your apk build get the apk to your device install it run it test it
oh, almost forgot, in userland when attempting to launch code-oss from vnc session, it still fails run this:
sed -i 's/BIG-REQUESTS/_IG-REQUESTS/' /usr/lib/your_arch_here-linux-gnu/libxcb.so.1
Thanks for providing the instructions. I hope that helps.
On Android, using the UserLand linux container, when launching the
code-oss
binary a relative load path error is encoutered.This is very similar to an issue which is present with npm in node 10, and later, in userland. CypherpunkArmory/UserLAnd#938
I reproduced this on the ubuntu flavor of userland with the xfce desktop environment.