headmelted / codebuilds

Community builds of Visual Studio Code for Chromebooks and Raspberry Pi
https://code.headmelted.com
MIT License
1.03k stars 56 forks source link

can't get code-oss to launch raspberry pi 3b #67

Closed Aailea closed 4 years ago

Aailea commented 5 years ago

launch from the console:

code-oss --verbose

get this output after some seconds:

[main 2019-02-19T15:28:35.507Z] [storage state.vscdb] open(/home/pi/.config/Code - OSS (headmelted)/User/globalStorage/state.vscdb, retryOnBusy: true) [main 2019-02-19T15:28:35.524Z] [storage state.vscdb] open(): Unable to open DB due to [object Object] [main 2019-02-19T15:28:35.527Z] [storage state.vscdb] open(): Unable to use backup due to Error: ENOENT: no such file or directory, unlink '/home/pi/.config/Code - OSS (headmelted)/User/globalStorage/state.vscdb' ATTENTION: default value of option force_s3tc_enable overridden by environment. [1140:0219/152836.977430:ERROR:sandbox_linux.cc(379)] InitializeSandbox() called with multiple threads in process gpu-process.

if I try to launch again:

[main 2019-02-19T15:29:30.423Z] Sending env to running instance... ATTENTION: default value of option force_s3tc_enable overridden by environment. [1209:0219/152931.765136:ERROR:sandbox_linux.cc(379)] InitializeSandbox() called with multiple threads in process gpu-process. Gtk-Message: GtkDialog mapped without a transient parent. This is discouraged.

& get a window: "Another instance of code-oss (headmelted) is running but not responding. please close all other instances and try again.

Anything I can do? almost given up...

Aailea commented 5 years ago

Sorry. almost forgot

code-oss --version 1.32.0 ce88f65a8818317410b6f0a697ddcec0174f36ca arm

TotalBro commented 5 years ago

Getting this message as well as of yesterday around noon; I'm configuring a Pi for work and was repeatedly reformatting and freshly installing various styles of Raspbian through NOOBS for other reasons when I encountered this issue. Output contains roughly the same errors as yours, and trying to get around the electron issues with --disable-gpu doesn't seem to help as it has on other platforms in the past. Installing the gpg keys manually also doesn't appear to help; it's worth noting that, during the install, I'm getting a gpg: no valid openPGP data found, though I'm not sure if this is normal since I unfortunately didn't think to save logs from the working builds.

Aailea commented 5 years ago

Also had tried with --disable-gpu, No result.

Also got the "gpg: no valid OpenPGP data found" message during the various installations I tried, but did not consider it to be a problem... researching I had found someone stating the solution to this was to download the gpgkey in advance with sudo wget -qO - https://packagecloud.io/headmelted/codebuilds/gpgkey | sudo apt-key add -;

TotalBro commented 5 years ago

I've tried installing both ways, but even manually installing the key and verifying that it's there with apt-key list but that doesn't seem to actually fix this issue unfortunately.

TotalBro commented 5 years ago

This does appear to be an issue with a more recent version. I grabbed an old release (specifically, code-oss_1.29.0-1539683192_armhf.deb, commit 590c416, from 16 October,) and installed it manually with sudo dpkg -i /home/pi/Download/code-oss_1.29.0-1539683192_armhf.deb or wherever you happen to put the package.
This worked for me, after about 30 seconds of grey screen while it spun up, it launched with no errors and haven't encountered any problems yet. Hope this works for you while someone smarter than me figures out a better way.

aliclubb commented 5 years ago

I HAD the same issue, but upgraded all software on my Pi today, including code-oss, and now get this output when launching from console.

pi@raspberrypi:~ $ code-oss --verbose
[main 2019-02-20T17:04:45.389Z] Starting VS Code
[main 2019-02-20T17:04:45.398Z] from: /usr/share/code-oss/resources/app
[main 2019-02-20T17:04:45.399Z] args: { _: [],
  diff: false,
  add: false,
  goto: false,
  'new-window': false,
  'reuse-window': false,
  wait: false,
  version: false,
  help: false,
  'list-extensions': false,
  'show-versions': false,
  verbose: true,
  status: false,
  'prof-modules': false,
  'prof-startup': false,
  'disable-extensions': false,
  'disable-gpu': false,
  logExtensionHostCommunication: false,
  'skip-getting-started': false,
  'skip-release-notes': false,
  'sticky-quickopen': false,
  'disable-restore-windows': false,
  'disable-telemetry': false,
  'disable-updates': false,
  'disable-crash-reporter': false,
  'skip-add-to-recently-opened': false,
  'unity-launch': false,
  'open-url': false,
  nolazy: false,
  issue: false,
  'file-write': false,
  'file-chmod': false,
  'driver-verbose': false,
  force: false,
  'prof-code-loading': false }
[main 2019-02-20T17:04:45.413Z] Resolving machine identifier...
[main 2019-02-20T17:04:45.415Z] Resolved machine identifier: 787e6c0bb0a8a6447a23cc8dfa943e1c474a72d910fff6eb81a33794479a3c3f
[main 2019-02-20T17:04:45.499Z] update#ctor - updates are disabled as there is no update URL
[main 2019-02-20T17:04:45.525Z] windowsManager#open
ATTENTION: default value of option force_s3tc_enable overridden by environment.
[24684:0220/170445.677589:ERROR:sandbox_linux.cc(379)] InitializeSandbox() called with multiple threads in process gpu-process.
[24648:0220/170446.196921:ERROR:gpu_process_transport_factory.cc(1017)] Lost UI shared context.
[main 2019-02-20T17:04:46.211Z] [storage state.vscdb] open(/home/pi/.config/Code - OSS (headmelted)/User/globalStorage/state.vscdb, retryOnBusy: true)
[main 2019-02-20T17:04:46.269Z] [storage state.vscdb] open(): Unable to open DB due to [object Object]
[main 2019-02-20T17:04:46.284Z] [storage state.vscdb] open(): Unable to use backup due to Error: ENOENT: no such file or directory, unlink '/home/pi/.config/Code - OSS (headmelted)/User/globalStorage/state.vscdb'
[24701:0220/170446.453302:ERROR:command_buffer_proxy_impl.cc(114)] ContextResult::kFatalFailure: Shared memory handle is not valid
[24684:0220/170446.488034:WARNING:ipc_message_attachment_set.cc(49)] MessageAttachmentSet destroyed with unconsumed attachments: 0/1
[24648:0220/170450.500442:INFO:CONSOLE(1400)] "%cTRACE", source: file:///usr/share/code-oss/resources/app/out/vs/workbench/workbench.main.js (1400)
[24648:0220/170450.527243:INFO:CONSOLE(1400)] "%c  ERR", source: file:///usr/share/code-oss/resources/app/out/vs/workbench/workbench.main.js (1400)
[24648:0220/170450.551844:INFO:CONSOLE(1400)] "%c  ERR", source: file:///usr/share/code-oss/resources/app/out/vs/workbench/workbench.main.js (1400)

I get a window appear, but nothing else happens beyond this. When closing the window, the console shows:

[main 2019-02-20T17:08:17.180Z] Lifecycle#window.on('close') - window ID 1
[main 2019-02-20T17:08:17.182Z] Lifecycle#onBeforeWindowClose.fire() - window ID 1
[main 2019-02-20T17:08:17.194Z] Lifecycle#window.on('closed') - window ID 1
[main 2019-02-20T17:08:17.196Z] Lifecycle#onWillShutdown.fire()
[main 2019-02-20T17:08:17.217Z] Lifecycle#app.on(window-all-closed)
[main 2019-02-20T17:08:17.219Z] Lifecycle#app.on(before-quit)
[main 2019-02-20T17:08:17.220Z] Lifecycle#onBeforeShutdown.fire()
[main 2019-02-20T17:08:17.239Z] Lifecycle#app.on(will-quit)
[main 2019-02-20T17:08:17.244Z] [storage state.vscdb] close()

But I have to Control-C it to actually quit, it never terminates on its own.

pi@raspberrypi:~ $ code-oss --version
1.32.0
aeaef41d51201e555735f5e8d2f38a9d0ddb9026
arm
pi@raspberrypi:~ $ 
Aailea commented 5 years ago

TotalBro, thanks :D, I´ll wait to see if this issue is fixed for now. It´s good to know I can go back to a working version if time presses.

I have installed the latest version released yesterday (1.32.0-1550644722) & get the exact same behaviour as reported by aliclubb.

note the last line reported in the console is [main 2019-02-21T11:02:31.792Z] [storage state.vscdb] close()

(same file reported as missing during launch)

mvklingeren commented 5 years ago

Same here; the current release clearly isn't working on RPi.

HansH2807 commented 5 years ago

Same here! I went back to any 1.29 version and it worked fie, including all extensions. After nightly upgrading to the latest 1.32 version code-oss hung up again as described above. Can anyone tell me how to exclude code-oss from upgrading?

corbinbs commented 5 years ago

Hi,

If you've installed 1.29 like:

apt-get install code-oss=1.29.0-1539702286

you can then mark it on hold by running:

apt-mark hold code-oss

then runs of apt-get upgrade won't try to bump it up until you've run

apt-mark unhold code-oss

to allow it to upgrade once again.

Thanks for the work on the code-oss builds for Raspberry Pi. I've been using it for a while now on a pi in a pi-top laptop. :+1:

Brian :tractor: :computer:

HansH2807 commented 5 years ago

Hi,

thank you for this information. Yes I installed it by

apt-get install code-oss=1.29.0-1539702286

Your hint helps me to exclude it from upgrading, as code-oss-1.32.*** definitely does not work!! Hopefully I can unmark it soon! Many Thanks and best regards Hans Hopf

Von: Brian S. Corbin notifications@github.com Gesendet: Freitag, 22. Februar 2019 03:59 An: headmelted/codebuilds codebuilds@noreply.github.com Cc: Hopf, Hans Hans.Hopf@sekas.de; Comment comment@noreply.github.com Betreff: Re: [headmelted/codebuilds] can't get code-oss to launch raspberry pi 3b (#67)

Hi,

If you've installed 1.29 like:

apt-get install code-oss=1.29.0-1539702286

you can then mark it on hold by running:

apt-mark hold code-oss

then runs of apt-get upgrade won't try to bump it up until you've run

apt-mark unhold code-oss

to allow it to upgrade once again.

Thanks for the work on the code-oss builds for Raspberry Pi. I've been using it for a while now on a pi in a pi-top laptop. 👍

— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://github.com/headmelted/codebuilds/issues/67#issuecomment-466255567, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AGeuEhl-t8A9PWzFryJIve34Bi7rXJpeks5vP1zjgaJpZM4bDO3K.

aliclubb commented 5 years ago

As a point of interest, a grep for state.vscdb in the two workspace.main.js files, shows no references to state.vscdb in 1.29, but does in 1.32.

aliclubb commented 5 years ago

If you manually place a file called state.vscdb into the correct place, code-oss deletes it upon startup, whilst complaining it can't open the file...

hitman-codehq commented 5 years ago

Thanks for the tips everyone - falling back to 1.29 does indeed work! :-)

ertoorule commented 5 years ago

it worked!

ghost commented 5 years ago

Same - 1.29 working fine, all versions after are black screened. Looking forward to a fixed version as this is definitely my favourite editor for the pi.

HansH2807 commented 5 years ago

FYI: I am running raspian stretch (desktop version) in a VirtualBox 5.26.x VM under Win10 Pro. In this configuration code-oss version 1.32.0 runs as expected (see screenshot) grafik

ghost commented 5 years ago

Hmmm - hardware specific? I've checked again and upgraded to 1.32.0 and still get the black screen problem on a Raspberry Pi 3b. Downgrading to 1.29 is fine.

2019-05-14-171813_1920x1080_scrot

Silerra commented 5 years ago

I think the arch type from cpu makes the difference. In your VirtualBox runs the virtualized Intel Core. But the Raspbian on Raspberry 3b (or 3b+ in my case) runs with the arch type ARM 32bit (ARMv7). ARMv7 is no longer supported from Microsoft for years. For a few month, the builds for the ARMv7 from the community (here from headmelted) also seem to stop working

In some post, I see that some users have also got under ARM 64 bit (with aarch64) also more recent versions from Code-OSS to run. (I hope my sentence structure is correct.) The Raspberry PI 3 series have a CPU architecture ARMv8. But the unmodified version of Raspbian runs with ARMv7 (you can see it with command 'uname -m' or 'file $(which ls)'). We can try to run code-oss on 64 bit OS on Raspberry PI or normal 32 bit Raspbian with 64 bit debian guest OS (via nspawn). In any case, I'm still exploring for more alternatives.

yuchdev commented 5 years ago

Same issue, after downgrade to 1.29 works fine apt-get install code-oss=1.29.0-1539702286

fifn2 commented 5 years ago

What's the status on fixing this? I really want the newest version of code.

SuperJMN commented 5 years ago

Still unresolved?

gruijter commented 5 years ago

Any news on this? I'm now running on 1.29, but would really like to be able to update/upgrade code-oss to the present version.

dachristenson commented 5 years ago

I still have the same issue using Raspbian "Buster" (32-bit) on my Raspberry Pi 4.
Install completes normally, program "starts", but it gets no further than drawing a blank window. Downgrading to 1.29 works.

ProDigit commented 5 years ago

Still same today on my pi zero (yes the zero). seems like a buster issue.

/usr/bin/code-oss: line 35: 14561 Illegal Instruction ELECTRON_RUN_AS_NODE=1 "$ELECTRON" "$CLI" "$@"

Doing Sudo code-oss is not recommended.

I downloaded the latest of the older 1.29 version (1.29.0-1539702286), and this version did get the Buster images instead of the stretch images. It seemed to install just fine, but still gets me the same error code when trying to start.

EDIT: It seems that the packages only work from a Pi 2, 3 or possibly up. Not the Zero or 1

gruijter commented 5 years ago

@headmelted is this something that can be fixed? Im now forced to run on the old 1.29 version and cannot upgrade on my pi 😔

metawops commented 5 years ago

Same problem here. :(

adminy commented 5 years ago

2019-09-25-104153_1680x1050_scrot Works on 1.29 on Pi, still no fix for later versions?

samuela commented 4 years ago

Just got hit with this. Can we please get a fix for the newer versions?

pradyumnac commented 4 years ago

Any Updates or leads on this? Anyone working on this fix?

IF not, Let me look under the hood

Silerra commented 4 years ago

Some people trying on this. But I could not find a working result yet. Here are the repositories I watch: https://github.com/Luxray5474/codebuilds https://github.com/akimasa/vscode

And here the discussion about this: https://github.com/microsoft/vscode/issues/6442

Also, I intend to develop a solution variant. Whereby I will focus on the kernel "aarch64". It will be used on RPi 3B + and higher.

headmelted commented 4 years ago

I’m sorry I haven’t had a chance to check in for a while on this (family matters). I hope to get time over the Christmas break to get this up and running again.

I know people are waiting for this and will do my best to get up-to-date builds out ASAP.

As a side note, I was working on a Visual Studio subscription gifted from Microsoft that has not been extended, so I'm trying to get my setup back up-and-running another way currently.

jantielens commented 4 years ago

Thanks for the update @headmelted !

For everyone else who is looking for a way/temp solution to continue development on/with a Raspberry Pi & VS Code: the VS Code Remote Development capabilities are nowadays working with a Raspberry Pi as well. The idea is that you run VS Code on your (non Pi) dev box and it uses SSH to remote into your Pi (behind the scenes). So you write code on your (non Pi) dev box, it's saved directly on the Pi, and you can even do debugging, building ... directly on the Pi.

headmelted commented 4 years ago

Pipeline fixed!

New build at:

ARM64 https://packagecloud.io/headmelted/codebuilds/packages/debian/stretch/code-oss_1.42.0-1575910147_arm64.deb

ARMHF https://packagecloud.io/headmelted/codebuilds/packages/debian/stretch/code-oss_1.42.0-1575910203_armhf.deb

Haven't had a chance to test it yet so not sure if it'll work first time or panic out. Any feedback most welcome!

gruijter commented 4 years ago

Version: 1.42.0 (user setup) Commit: eab8ca79dc31d09af243350bed3f2ef42ec64e11 Date: 2019-12-09T16:49:30.930Z Electron: 6.1.5 Chrome: 76.0.3809.146 Node.js: 12.4.0 V8: 7.6.303.31-electron.0 OS: Linux arm 4.19.66-v7+

IT RUNS ON MY RPI3 AGAIN!!!!

SUPER WORK 🥇🎉

headmelted commented 4 years ago

Great!

Not sure why the version jumped to 1.42 - my guess is that’a the next release upstream is targeting 🙂

On Mon, 9 Dec 2019 at 22:20, gruijter notifications@github.com wrote:

Version: 1.42.0 (user setup) Commit: eab8ca79dc31d09af243350bed3f2ef42ec64e11 Date: 2019-12-09T16:49:30.930Z Electron: 6.1.5 Chrome: 76.0.3809.146 Node.js: 12.4.0 V8: 7.6.303.31-electron.0 OS: Linux arm 4.19.66-v7+

IT RUNS ON MY RPI3 AGAIN!!!!

SUPER WORK 🥇🎉

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/headmelted/codebuilds/issues/67?email_source=notifications&email_token=ACTBLIA4M4S7XBTDNSIBI7DQX3ABXA5CNFSM4GYM5XFKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEGK5DXQ#issuecomment-563466718, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACTBLIHIHJK5PYEGVGJA6JTQX3ABXANCNFSM4GYM5XFA .

Silerra commented 4 years ago

It looks good. Thank you @headmelted !

Anyway, the GUI works in this version again and the window doesn't remain empty:

Bildschirmfoto_2019-12-09_22-46-40

My settings: RPi 3B+ dtoverlay=vc4-fkms-v3d (it needed for some projects) forced 64bit mode Raspbian Lite version buster with Xfce

Left side in the picture is 32bit userland (armhf) and right side is 64-bit nspawn container with Debian version buster (arm64).

At first code-oss didn't want to start in 64bit container. Somehow, code-oss additionally requires the packages libxtst6 and libasound2.

headmelted commented 4 years ago

Glad to hear it!

Let me know if you experience any issues with it!

dimkr commented 4 years ago

https://github.com/VSCodium/vscodium/pull/303 provides ARMv7 and 64-bit ARMv8 builds, all cross-compiled from x86_64 on Travis CI. @headmelted, maybe you can adopt the same method - I find it more reliable than native builds which hang or exhaust all available RAM (tried Travis arm64 machines, they're still in alpha for many good reasons). Also, pretty much all CI services offer only x86 machines, so you'll be able to use any service and spend less time on getting builds to work.

headmelted commented 4 years ago

The builds are all cross-compiled using Archie, but with container emulation for native dependencies as a chunk of the extensions implicitly expect to be running on the architecture they’re being built with.

You may not remember but you CC’d me some time back in a conversation about lifting this method to get your builds up-and-running. I’m hoping it was useful; you really don’t need to cross-post in a support ticket on github to get more eyeballs on it. I’ve no doubt if people find your work useful they’ll use it, and having more builds elsewhere makes for good redundancy.

Closing the thread as the underlying issue is now resolved, but please re-open if there’s still a problem here and I’ll get right on it.

gillza commented 4 years ago

Trying to install on raspberry pi Zero W. Installed the 1.45 version abut when executing it returns "Illegal Instruction"