Code Monkey home page Code Monkey logo

Comments (23)

tristanbes avatar tristanbes commented on May 19, 2024 1

no, the team stopped using Panthere because of this issue. It was a nightmare to debug/work with. Other executables are fine (doctrine, symfony console etc...) it seems that it's related only with panthere.

We used Cypress for E2E tests.

from panther.

supertanuki avatar supertanuki commented on May 19, 2024 1

@dunglas thanks, installing unzip solved the problem for me too.

Then I had another problem:

chromedriver_linux64: error while loading shared libraries: libX11.so.6: cannot open shared object file: No such file or directory

I installed libxi6 and libgconf-2-4 too to fix the problem.
Hope this will help someone.

Edit: I was using chromium instead of chromedriver

from panther.

dunglas avatar dunglas commented on May 19, 2024

Is the project in a shared folder? The shared fs driver you use most likely not preserve permissions.

from panther.

Kocal avatar Kocal commented on May 19, 2024

Hey, me and @XavierVallot are working together and I just encountered the same issue.
So yes, we are on a shared FS (Vagrant), but I think it's more a composer issue than something else.

When running composer:
selection_779

When manually cloning the repo:
selection_780

Inside the VM, we are using php 7.2.7 and composer 1.6.5.

from panther.

Kocal avatar Kocal commented on May 19, 2024

@dunglas you are right, this problem only happens when we require a dependency inside this shared folder. I tried with non-shared folder /srv/app2 and it works.

I tried to update our Vagrantfile with this but it does not work:

config.vm.synced_folder '.', '/srv/app',
  type: 'nfs',
-  mount_options: ['nolock', 'actimeo=1', 'fsc']
+  mount_options: ['nolock', 'actimeo=1', 'fsc', 'exec']

Do you have an idea @tristanbes? 🤔

from panther.

tristanbes avatar tristanbes commented on May 19, 2024

maybe @nervo could enlight us on this (seems to happens only on Linux since on my OSX host, I can't reproduce)

I just can't figure why it's doing this only with this library since you don't have any problem with executable files (bin/console, bin/*, etc...)

from panther.

Kocal avatar Kocal commented on May 19, 2024

Maybe it is related to composer too?

from panther.

supertanuki avatar supertanuki commented on May 19, 2024

@XavierVallot @Kocal @tristanbes have you fixed the problem? same here with vagrant and shared FS

from panther.

supertanuki avatar supertanuki commented on May 19, 2024

thanks @tristanbes

from panther.

dunglas avatar dunglas commented on May 19, 2024

@tristanbes you can always use your own binary using PANTHER_CHROME_DRIVER_BINARY if there is no other choice.
If someone can provide a repository with a reproducer, I can try to debug this.

from panther.

tristanbes avatar tristanbes commented on May 19, 2024

from panther.

dunglas avatar dunglas commented on May 19, 2024

I agree, but as I never faced this problem (and it is likely due to NFS, a volume or something like that), it's hard to debug without reproducer.

from panther.

Kocal avatar Kocal commented on May 19, 2024

If I remember well, I think it was a composer issue at the final... 😞
This is what I faced:

command context binary is executable ?
git clone outside VM yes
git clone inside VM, in shared path (NFS) yes
git clone inside VM, in non-shared path yes
composer req outside VM yes
composer req inside VM, in shared path (NFS) no
composer req inside VM, in non-shared path no

capture d ecran de 2018-10-08 22-15-02

I made a reproduction repository here: https://github.com/Kocal/symfony-panther-missing-executable-bit-nfs

Thanks for your time!

from panther.

Kocal avatar Kocal commented on May 19, 2024

and it is likely due to NFS, a volume or something like that

Yes, but not in this case.

I tried to install doctrine/orm because it's a package that has binary executables, and the file vendor/doctrine/orm/bin/doctrine is executable.

By looking at its composer.json, there is a special field bin which is specified, and I think it's the key because it's missing in Panther.

What happens if you add "bin": ["chromedriver-bin/chromedriver_linux64"] in composer.json?

from panther.

dunglas avatar dunglas commented on May 19, 2024

Ok, I think I get what the problem is. As the Composer warning highlights, unzip is not installed. Unfortunately, it looks like the php ZIP extension is not able to preserve the executable bit of binaries.
Can you try if installing unzip fixes the problem? If it's the case, we should update the documentation to explain than having unzip installed is mandatory.

from panther.

dunglas avatar dunglas commented on May 19, 2024

@Kocal, it's probably just a side effect, the bin entry allows packages to expose command line tools (https://getcomposer.org/doc/articles/vendor-binaries.md).
Maybe composer re-add the +x bit when copying the script in this repository, but the underlying issue is more likely that unzip is missing.

I don't think that copying Chromedriver in vendor/bin is a good idea, as it's not a tool designed to be used directly by the end user.

from panther.

Kocal avatar Kocal commented on May 19, 2024

As the Composer warning highlights, unzip is not installed.

Good catch, that was the problem!

from panther.

dunglas avatar dunglas commented on May 19, 2024

Ok, I'm glad we sorted this out! The next step is to make it bold in the documentation that unzip must be installed to not have this issue.

from panther.

tristanbes avatar tristanbes commented on May 19, 2024

from panther.

mickaelandrieu avatar mickaelandrieu commented on May 19, 2024

Need to check this, this could unlock some important topics for me 👍

from panther.

stof avatar stof commented on May 19, 2024

Maybe composer re-add the +x bit when copying the script in this repository

yeah, composer indeed makes the file executable when creating it in vendor/bin (which makes the original file executable in case a symlink was used, which is the case on *nix systems)

from panther.

dunglas avatar dunglas commented on May 19, 2024

@supertanuki: Chrome and Chromedriver binaries require some libraries that are not installed by default with Alpine.
Here it complains about the ones provided by Xorg, but there are probably some other missing.

from panther.

Surf-N-Code avatar Surf-N-Code commented on May 19, 2024

Sorry to comment an old issue, but I think it may be interesting for others landing here from google.

I kept getting this error:
RuntimeException: Could not start chrome (or it crashed) after 30 seconds.

Which was also due to the fact that I had run composer install before installing unzip.

from panther.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.