Skip to content
This repository was archived by the owner on Jul 31, 2023. It is now read-only.
This repository was archived by the owner on Jul 31, 2023. It is now read-only.

No prebuilt binaries found (target=undefined ...) #486

Closed

Description

@LMolr

After installing the plugin on a fresh Code installation, I cannot start the language server due to missing prebuilt binaries.

Your environment

  • vscode-ruby version: 0.22.3
  • Ruby version: 2.6.0p0
  • Ruby version manager (if any): rbenv 1.1.2
  • VS Code version: 1.35.0
    (Electron 4.1.4 Chrome 69.0.3497.128 Node.js 10.11.0 V8: 6.9.427.30-electron.0)
  • Operating System: Arch Linux Linux 5.1.7-arch1-1-ARCH
  • Using language server? Yes

Expected behavior

Language server should start.

Actual behavior

In Output Window, the Ruby Language Server context shows the following error message:

[Info  - 12:23:12 PM] Initializing Ruby language server...
[Info  - 12:23:12 PM] Rebuilding tree-sitter for local Electron version
[Error - 12:23:13 PM] Server initialization failed.
  Message: Request initialize failed with message: No prebuilt binaries found (target=undefined runtime=undefined arch=undefined libc=undefined platform=undefined)
  Code: -32603

NOTE: I don't know if the undefined values are an hint about the origin of the problem.

Activity

  1. wingrunr21 commented on Jun 11, 2019

    @wingrunr21
    Collaborator

    Can you try v0.23.0? I upgraded prebuild-install there and that may have also fixed a bug with detection.

  2. LMolr commented on Jun 11, 2019

    @LMolr
    Author

    Hello, I also tried 0.23.0 and all the listed versions from 0.20.0 on, but I always get the same error.
    Is there something I can do to get more details?

    Thank you

  3. wingrunr21 commented on Jun 11, 2019

    @wingrunr21
    Collaborator

    The undefineds are the issue as you suspected. It means prebuilt-install can’t figure out what arch it is running on.

    If you open a console does the process global have arch and such defined?

    I’m also pretty sure someone else on Arch had issues before too.

  4. LMolr commented on Jun 11, 2019

    @LMolr
    Author

    In dev console look defined

    process.platform

    -> "linux"

    process.arch

    -> "x64"

    process.versions.modules

    -> "69"

  5. LMolr commented on Jun 11, 2019

    @LMolr
    Author

    I tried to debug the extension but unfortunately the Launch Extension run configuration times out with a popup over the electron window saying "Cannot debug extension (timeout)." :( .

  6. wingrunr21 commented on Jun 11, 2019

    @wingrunr21
    Collaborator
  7. BrandonShega commented on Jun 12, 2019

    @BrandonShega

    FWIW, I'm also experiencing this on a Mac, fresh Code Insiders install.

  8. maletor commented on Jun 12, 2019

    @maletor

    I have the same issue:

    [Info  - 10:05:21 AM] Initializing Ruby language server...
    [Info  - 10:05:21 AM] Rebuilding tree-sitter for local Electron version
    [Error - 10:05:22 AM] Server initialization failed.
      Message: Request initialize failed with message: No prebuilt binaries found (target=undefined runtime=undefined arch=undefined libc=undefined platform=undefined)
      Code: -32603 
    
    > process.platform
    'linux'
    > process.arch
    'x64'
    > process.versions.modules
    '67'
    > process.version
    'v11.15.0'
    
  9. maletor commented on Jun 12, 2019

    @maletor

    Right, so I am ABI 67 and @LMolr is 69. That's the issue since tree-sitter-ruby is living in the dark ages on 64.

  10. maletor commented on Jun 12, 2019

    @maletor

    I downgraded to nodejs-lts-dubnium on Arch. IDK what @LMolr is doing. That ABI is non-existent.

    Either way, Message: Request initialize failed with message: No prebuilt binaries found is still found with

    > process.versions.modules
    '64'
    
  11. wingrunr21 commented on Jun 12, 2019

    @wingrunr21
    Collaborator

    ABI 64 is Electron 4 and 69 is Electron 4.0.4. 64 isn't exactly ancient :-P

    I'll push a PR to tree-sitter-ruby and bump the version here. I am looking at moving over to the WASM version of tree-sitter to avoid this in the future. It wasn't available when I initially did this implementation.

  12. wingrunr21 commented on Jun 12, 2019

    @wingrunr21
    Collaborator

    @BrandonShega what ABI is insiders running right now?

  13. maletor commented on Jun 12, 2019

    @maletor

    @wingrunr21 the issue might go beyond the ABI version, given I downgraded to Node LTS (ABI 64) and still have these issues, don't you think?

    How would arch=undefined be output when process.arch is x64?

  14. wingrunr21 commented on Jun 12, 2019

    @wingrunr21
    Collaborator

    The ABI is based on electron (since the server runs within the VSCode instance) not the system installed node versions.

    I have no idea why all that stuff is coming back undefined. I think that's probably a prebuild-install bug of some kind.

  15. maletor commented on Jun 12, 2019

    @maletor

    Ah, makes sense. This is the Electron REPL.

    > process.arch
    'x64'
    > process.versions
    { http_parser: '2.9.0',
      node: '10.11.0',
      v8: '6.9.427.30-electron.0',
      uv: '1.23.0',
      zlib: '1.2.11',
      ares: '1.15.0',
      modules: '69',
    
  16. 13 remaining items

  17. wingrunr21 commented on Jul 15, 2019

    @wingrunr21
    Collaborator

    I started work on moving over to the WASM version this weekend. Almost done but need to test a few things as it isn't a direct swap-out and VSCode doesn't officially support WASM in extensions.

  18. pinned this issue on Jul 15, 2019
  19. wingrunr21 commented on Jul 15, 2019

    @wingrunr21
    Collaborator

    #506 is the tracking issue for the WASM move. I'll use this issue to represent the general problem (eg I'll close this after shipping the WASM support and people verify it is working).

  20. jessicabrady16 commented on Jul 16, 2019

    @jessicabrady16

    I am having the EXACT. SAME. PROBLEM. I have spent 2 hours looking at building the binary workaround and still doesn't work. Looks like they just released a version that no one can use now (I even went and changed back to a python 2 extension). I guess we will just have to not have formatting/etc. until they release a fix... please let me know if any other work around has worked (to continue the path of using the npx prebuild -t 4.0.4 -r electron --strip build I would not have to mess with gyp and yea--time to code ugly...)

  21. minkir014 commented on Jul 17, 2019

    @minkir014

    @jessicabrady16 , @wingrunr21 said that he is converting prebuilt binaries to WASM. So, we are waiting until he finishes working.

  22. wingrunr21 commented on Jul 17, 2019

    @wingrunr21
    Collaborator

    Hi all,

    I pushed a few PRs to tree-sitter tonight. The WASM build is not yet at feature parity with the node build so working to get it there. I also need to make sure the WASM implementation provides a good level of performance. I continue to think this is the right long-term solve though.

    I also dug into this specific problem more and identified a couple of things I can do to fix:

    • node-tree-sitter used to build against all ABIs but was switched at some point. It doesn't have a binary for ABI 69 which is needed for the latest VSCode. PR is up to correct that
    • I will be putting improved log output into place here to make it clearer when something in this process does not work.
    • I am looking into a fallback binary search location so that in the event upstream is missing a binary I can upload the correct build and keep people moving
  23. willian commented on Jul 17, 2019

    @willian

    For a workaround (note you'll need build tooling installed on your machine):

    cd ~/.vscode/extensions/rebornix.ruby-0.24.0/server/node_modules/tree-sitter-ruby
    npm install # this should trigger prebuild-install to build a binary but it will be for node.js not electron
    npx prebuild -t 4.0.4 -r electron --strip

    This should get a binary built on your machine

    Same error even with this workaround. I am on v0.24.1

    This only works if you use Python 2.x, fails with Python 3.x

  24. solnic commented on Jul 19, 2019

    @solnic

    The workaround does not work for me either. I tried 0.24.0 and 0.24.1. Using python 2.7.10 and node 10.15.3.

  25. LMolr commented on Jul 25, 2019

    @LMolr
    Author

    It's working with 0.24.2 👍

    [Info  - 9:55:27 AM] Initializing Ruby language server...
    [Info  - 9:55:27 AM] Rebuilding tree-sitter for local Electron version
    [Info  - 9:55:27 AM] Rebuild succeeded!
    
  26. added this to the v0.25.0 milestone on Aug 26, 2019
  27. self-assigned this
    on Aug 26, 2019
  28. wingrunr21 commented on Sep 2, 2019

    @wingrunr21
    Collaborator

    The move to the WASM distribution of tree-sitter was shipped in v0.25.0. There was an issue with publishing that version to the Marketplace so v0.25.1 is the first version with the WASM switch.

  29. unpinned this issue on Sep 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions