atom-community / autocomplete-paths

Autocomplete Paths for Atom
MIT License
151 stars 62 forks source link

failed to enable package in atom on Ubuntu 20.04 #241

Closed seifer9almasy closed 3 years ago

seifer9almasy commented 3 years ago

Description

[The package can't enabled because of missing library]

Steps to Reproduce

  1. [install atom with snap]
  2. [install autocomplete-paths]
  3. [activate it]

Expected behavior: [Package enabled]

Actual behavior: [Error]

Reproduces how often: [100%]

Versions

Atom: 1.53.0 x64 Electron: 6.1.12 OS: Ubuntu 20.04.1 Thrown From: autocomplete-paths package 2.12.13

Snap Version:

snap 2.48.1 snapd 2.48.1 series 16 ubuntu 20.04 kernel 5.4.0-56-generic

Snap list:

Name Version Rev Tracking Publisher Notes atom 1.53.0 265 latest/stable snapcrafters classic chromium 87.0.4280.88 1424 latest/stable canonical✓ - chromium-ffmpeg 0.1 17 latest/stable canonical✓ - core 16-2.48 10444 latest/stable canonical✓ core core18 20200929 1932 latest/stable canonical✓ base core20 20201027 875 latest/stable canonical✓ base

Stack Trace

Failed to load the autocomplete-paths package

At /snap/core/current/usr/lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.22' not found (required by /home/cool/.atom/packages/autocomplete-paths/node_modules/fuzzaldrin-plus-fast/build/Release/fuzzaldrinplusfast.node)

Error: /snap/core/current/usr/lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.22' not found (required by /home/cool/.atom/packages/autocomplete-paths/node_modules/fuzzaldrin-plus-fast/build/Release/fuzzaldrinplusfast.node)
    at process.func (electron/js2c/asar.js:138:31)
    at process.func [as dlopen] (electron/js2c/asar.js:138:31)
    at Object.Module._extensions..node (internal/modules/cjs/loader.js:828:18)
    at Object.func (electron/js2c/asar.js:138:31)
    at Object.func [as .node] (electron/js2c/asar.js:138:31)
    at Module.load (internal/modules/cjs/loader.js:645:32)
    at Function.Module._load (internal/modules/cjs/loader.js:560:12)
    at Module.require (/app.asar/static/index.js:72:46)
    at require (/snap/atom/265/usr/share/atom/resources/app/static/<embedded>:11:146814)
    at /packages/autocomplete-paths/node_modules/fuzzaldrin-plus-fast/fuzzaldrin-dist.js:1:1650)
    at /packages/autocomplete-paths/node_modules/fuzzaldrin-plus-fast/fuzzaldrin-dist.js:1:3551)
    at /packages/autocomplete-paths/node_modules/fuzzaldrin-plus-fast/fuzzaldrin-dist.js:4:3)
    at Module.get_Module._compile (/snap/atom/265/usr/share/atom/resources/app/static/<embedded>:11:147498)
    at Object.value [as .js] (/snap/atom/265/usr/share/atom/resources/app/static/<embedded>:11:151046)
    at Module.load (internal/modules/cjs/loader.js:645:32)
    at Function.Module._load (internal/modules/cjs/loader.js:560:12)
    at Module.require (/app.asar/static/index.js:72:46)
    at require (/snap/atom/265/usr/share/atom/resources/app/static/<embedded>:11:146814)
    at /packages/autocomplete-paths/dist/autocomplete-paths.js:1:162)
    at /packages/autocomplete-paths/dist/autocomplete-paths.js:4:3)
    at Module.get_Module._compile (/snap/atom/265/usr/share/atom/resources/app/static/<embedded>:11:147498)
    at Object.value [as .js] (/snap/atom/265/usr/share/atom/resources/app/static/<embedded>:11:151046)
    at Module.load (internal/modules/cjs/loader.js:645:32)
    at Function.Module._load (internal/modules/cjs/loader.js:560:12)
    at Module.require (/app.asar/static/index.js:72:46)
    at require (internal/modules/cjs/helpers.js:16:16)
    at customRequire (/snap/atom/265/usr/share/atom/resources/app/static/<embedded>:1:696928)
    at Package.requireMainModule (/snap/atom/265/usr/share/atom/resources/app/static/<embedded>:11:3578827)
    at /snap/atom/265/usr/share/atom/resources/app/static/<embedded>:11:3565367
    at Package.measure (/snap/atom/265/usr/share/atom/resources/app/static/<embedded>:11:3564167)

Additional Information

probable fix suggested:

set and integrate base snap in autocomplete-paths to core18 in future release:

https://snapcraft.io/docs/base-snaps

because the library is included in core18

Any help will be cool :-)

aminya commented 3 years ago

This seems strange. Why libstdc++ is not installed on your system?

I am not much familiar with snaps, but I built and tested the library for the oldest Ubuntu available on GitHub (Ubuntu 16) to the newest (Ubuntu 20).

Shouldn't we update the Atom snaps instead? This seems to be related to snaps instead.

aminya commented 3 years ago

@seifer9almasy Could you check if this is resolved in the last version?

seifer9almasy commented 3 years ago

Problem solved, thanks a lot !!!

seifer9almasy commented 3 years ago

Sorry, I can activate the package but autocomplete don't function and I don't have any errors returned

aminya commented 3 years ago

@seifer9almasy could you open the dev tools and see if any errors show up there? The command for opening dev tools is something like: Windows: open dev window

UziTech commented 3 years ago

It's Window: Toggle Dev Tools

seifer9almasy commented 3 years ago

I have installed atom on my native os intead of snap because lots of atom packages crashed multiple time

In my new install autocomplete paths don't works

I have this error on my atom debuger:

Uncaught (in promise) RangeError /home/cool/.atom/packages/autocomplete-paths/dist/autocomplete-paths.js

[ERR_CHILD_PROCESS_STDIO_MAXBUFFER] [ERR_CHILD_PROCESS_STDIO_MAXBUFFER]: stdout maxBuffer length exceeded at Socket.onChildStdout (child_process.js:363) at Socket.emit (events.js:200) at addChunk (_stream_readable.js:294) at readableAddChunk (_stream_readable.js:271) at Socket.Readable.push (_stream_readable.js:210) at Pipe.onStreamRead (internal/stream_base_commons.js:166)

seifer9almasy commented 3 years ago

Maybe using spawn instead of exec can solve the problem:

Spawn VS Exec

UziTech commented 3 years ago

or maybe increase maxBuffer?

https://github.com/atom-community/autocomplete-paths/blob/b36d41b84b7b6dc5577e3b49feff90fb3b6651b3/lib/paths-cache.js#L411-L413

@seifer9almasy do you have a lot of files in your project or why do you think it is overflowing the buffer?

UziTech commented 3 years ago

243 should fix this error

seifer9almasy commented 3 years ago

@UziTech I have a lots of files but the update you made fixed all.

Thanks a lot, autocomplete works again.

aminya commented 3 years ago

@seifer9almasy

I opened an issue in the snap repo to address the missing library. If you are familiar with snaps you may check my PR to see if it solves the issue.

https://github.com/snapcrafters/atom/issues/65