david-dick / firefox-marionette

This is a client module to automate the Mozilla Firefox browser via the Marionette protocol
https://metacpan.org/dist/Firefox-Marionette
Other
12 stars 3 forks source link

cpanm Firefox::Marionette #33

Closed Pelasgus123 closed 8 months ago

Pelasgus123 commented 8 months ago

On Debian 11, standard installation. Firefox::Marionette installation fails, but /usr/bin/firefox exists.

cpanm (App::cpanminus) 1.7044 on perl 5.032001 built for x86_64-linux-gnu-thread-multi Work directory is /root/.cpanm/work/1703291658.32257 You have make /bin/make You have LWP 6.52 You have /bin/tar: tar (GNU tar) 1.34 Copyright (C) 2021 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later https://gnu.org/licenses/gpl.html. This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.

Written by John Gilmore and Jay Fenlason. You have /bin/unzip Searching Firefox::Marionette () on cpanmetadb ... --> Working on Firefox::Marionette Fetching http://www.cpan.org/authors/id/D/DD/DDICK/Firefox-Marionette-1.49.tar.gz -> OK Unpacking Firefox-Marionette-1.49.tar.gz Entering Firefox-Marionette-1.49 Checking configure dependencies from META.json Checking if you have ExtUtils::MakeMaker 6.58 ... Yes (7.44) Configuring Firefox-Marionette-1.49 Running Makefile.PL Running as root. Deleting the XAUTHORITY environment variable /usr/share/applications/firefox-esr.desktop:[Desktop Entry] /usr/share/applications/firefox-esr.desktop:Exec=/usr/lib/firefox-esr/firefox-esr %u Mozilla Firefox cannot be discovered in /sbin:/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin -> N/A -> FAIL Configure failed for Firefox-Marionette-1.49. See /root/.cpanm/work/1703291658.32257/build.log for details.

david-dick commented 8 months ago

Odd. I've just installed debian 11 and the install went very smoothly.

cpanm (App::cpanminus) 1.7044 on perl 5.032001 built for x86_64-linux-gnu-thread-multi
Work directory is /root/.cpanm/work/1703300051.9108
You have make /usr/bin/make
You have LWP 6.52
You have /usr/bin/tar: tar (GNU tar) 1.34
Copyright (C) 2021 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Written by John Gilmore and Jay Fenlason.
Searching Firefox::Marionette () on cpanmetadb ...
--> Working on Firefox::Marionette
Fetching http://www.cpan.org/authors/id/D/DD/DDICK/Firefox-Marionette-1.49.tar.gz
-> OK
Unpacking Firefox-Marionette-1.49.tar.gz
Entering Firefox-Marionette-1.49
Checking configure dependencies from META.json
Checking if you have ExtUtils::MakeMaker 6.58 ... Yes (7.44)
Configuring Firefox-Marionette-1.49
Running Makefile.PL
Mozilla Firefox 115.6.0esr
grep -r Mem /proc/meminfo
MemTotal:        2018140 kB
MemFree:          752404 kB
MemAvailable:    1711620 kB

what happens when you run "/usr/bin/firefox" -version ?

i get the following

root@debian11:~# "/usr/bin/firefox" -version
Mozilla Firefox 115.6.0esr

also, since the XAUTHORITY environment variable was present, what sort of graphical environment are you in? I just sshed in my new machine. Maybe other environment variables need to be deleted? Could you give me a list of environment variables present when the installation fails?

Pelasgus123 commented 8 months ago

Hello David

Thanks for the reply. Information as requested.

Cheers

@.***:~$ /usr/bin/firefox -version Mozilla Firefox 115.6.0esr

@.**:~$ printenv SHELL=/bin/bash SESSION_MANAGER=local/noname:@/tmp/.ICE-unix/1150,unix/noname:/tmp/.ICE-unix/1150 WINDOWID=77594631 QT_ACCESSIBILITY=1 QT_SCREEN_SCALE_FACTORS=VGA-1=1;HDMI-1=1;DP-1=1; COLORTERM=truecolor XDG_SESSION_PATH=/org/freedesktop/DisplayManager/Session0 LANGUAGE=en_NZ:en SSH_AUTH_SOCK=/tmp/ssh-aJaPw3HZDbsM/agent.1015 SHELL_SESSION_ID=f87d1b88fc2042b39d544dbde83abe7d DESKTOP_SESSION=plasma SSH_AGENT_PID=1070 GTK_RC_FILES=/etc/gtk/gtkrc:/home/johndoe/.gtkrc:/home/johndoe/.config/gtkrc XCURSOR_SIZE=24 GTK_MODULES=gail:atk-bridge XDG_SEAT=seat0 PWD=/home/johndoe XDG_SESSION_DESKTOP=KDE LOGNAME=johndoe XDG_SESSION_TYPE=x11 GPG_AGENT_INFO=/run/user/1000/gnupg/S.gpg-agent:0:1 XAUTHORITY=/home/johndoe/.Xauthority GTK2_RC_FILES=/etc/gtk-2.0/gtkrc:/home/johndoe/.gtkrc-2.0:/home/johndoe/.config/gtkrc-2.0 HOME=/home/johndoe LANG=en_NZ.UTF-8 LS_COLORS=rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=00:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:.tar=01;31:.tgz=01;31:.arc=01;31:.arj=01;31:.taz=01;31:.lha=01;31:.lz4=01;31:.lzh=01;31:.lzma=01;31:.tlz=01;31:.txz=01;31:.tzo=01;31:.t7z=01;31:.zip=01;31:.z=01;31:.dz=01;31:.gz=01;31:.lrz=01;31:.lz=01;31:.lzo=01;31:.xz=01;31:.zst=01;31:.tzst=01;31:.bz2=01;31:.bz=01;31:.tbz=01;31:.tbz2=01;31:.tz=01;31:.deb=01;31:.rpm=01;31:.jar=01;31:.war=01;31:.ear=01;31:.sar=01;31:.rar=01;31:.alz=01;31:.ace=01;31:.zoo=01;31:.cpio=01;31:.7z=01;31:.rz=01;31:.cab=01;31:.wim=01;31:.swm=01;31:.dwm=01;31:.esd=01;31:.jpg=01;35:.jpeg=01;35:.mjpg=01;35:.mjpeg=01;35:.gif=01;35:.bmp=01;35:.pbm=01;35:.pgm=01;35:.ppm=01;35:.tga=01;35:.xbm=01;35:.xpm=01;35:.tif=01;35:.tiff=01;35:.png=01;35:.svg=01;35:.svgz=01;35:.mng=01;35:.pcx=01;35:.mov=01;35:.mpg=01;35:.mpeg=01;35:.m2v=01;3 5:.mkv=01;35:.webm=01;35:.webp=01;35:.ogm=01;35:.mp4=01;35:.m4v=01;35:.mp4v=01;35:.vob=01;35:.qt=01;35:.nuv=01;35:.wmv=01;35:.asf=01;35:.rm=01;35:.rmvb=01;35:.flc=01;35:.avi=01;35:.fli=01;35:.flv=01;35:.gl=01;35:.dl=01;35:.xcf=01;35:.xwd=01;35:.yuv=01;35:.cgm=01;35:.emf=01;35:.ogv=01;35:.ogx=01;35:.aac=00;36:.au=00;36:.flac=00;36:.m4a=00;36:.mid=00;36:.midi=00;36:.mka=00;36:.mp3=00;36:.mpc=00;36:.ogg=00;36:.ra=00;36:.wav=00;36:.oga=00;36:.opus=00;36:.spx=00;36:*.xspf=00;36: XDG_CURRENT_DESKTOP=KDE KONSOLE_DBUS_SERVICE=:1.81 KONSOLE_DBUS_SESSION=/Sessions/1 PROFILEHOME= XDG_SEAT_PATH=/org/freedesktop/DisplayManager/Seat0 KONSOLE_VERSION=201203 KDE_SESSION_UID=1000 XDG_SESSION_CLASS=user TERM=xterm-256color USER=johndoe COLORFGBG=15;0 KDE_SESSION_VERSION=5 DISPLAY=:0 SHLVL=1 XDG_VTNR=7 XDG_SESSION_ID=1 XDG_RUNTIME_DIR=/run/user/1000 QT_AUTO_SCREEN_SCALE_FACTOR=0 XCURSOR_THEME=breeze_cursors XDG_DATA_DIRS=/usr/local/share:/usr/share:/var/lib/snapd/desktop KDE_FULL_SESSION=true PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games:/snap/bin DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus KDE_APPLICATIONS_AS_SCOPE=1 KONSOLE_DBUSWINDOW=/Windows/1 =/usr/bin/printenv OLDPWD=/home/johndoe

david-dick commented 8 months ago

Okay, i think i've duplicated your experience. I'm guessing that you ran "/usr/bin/firefox" -version from your normal user's session and not from the same root session where you executed cpanm Firefox::Marionette?

Can you try running "/usr/bin/firefox" -version from the same root session?

I duplicated the result by installing KDE on debian 11 and then su'ing to root and then running cpanm Firefox::Marionette.

I suspect I need to delete the XDG_RUNTIME_DIR environment variable as well. Could you confirm that as well?

Pelasgus123 commented 8 months ago

Hello David

That worked. Thanks very much.

Cheers

@.***:/home/johndoe/shares# /usr/bin/firefox -version Running Firefox as root in a regular user's session is not supported.
($XDG_RUNTIME_DIR is /run/user/1000 which is owned by johndoe.)

@.***:/home/johndoe/shares# unset XDG_RUNTIME_DIR

@.***:/home/johndoe/shares# cpanm Firefox::Marionette --> Working on Firefox::Marionette Fetching http://www.cpan.org/authors/id/D/DD/DDICK/Firefox-Marionette-1.49.tar.gz ... OK Configuring Firefox-Marionette-1.49 ... OK ==> Found dependencies: Config::INI::Reader, Test::CheckManifest, PDF::API2 --> Working on Config::INI::Reader Fetching http://www.cpan.org/authors/id/R/RJ/RJBS/Config-INI-0.029.tar.gz ... OK Configuring Config-INI-0.029 ... OK ==> Found dependencies: Mixin::Linewise::Writers, Mixin::Linewise::Readers --> Working on Mixin::Linewise::Writers Fetching http://www.cpan.org/authors/id/R/RJ/RJBS/Mixin-Linewise-0.111.tar.gz ... OK Configuring Mixin-Linewise-0.111 ... OK Building and testing Mixin-Linewise-0.111 ... OK Successfully installed Mixin-Linewise-0.111 Building and testing Config-INI-0.029 ... OK Successfully installed Config-INI-0.029 --> Working on Test::CheckManifest Fetching http://www.cpan.org/authors/id/R/RE/RENEEB/Test-CheckManifest-1.43.tar.gz ... OK Configuring Test-CheckManifest-1.43 ... OK ==> Found dependencies: Pod::Coverage::TrustPod --> Working on Pod::Coverage::TrustPod Fetching http://www.cpan.org/authors/id/R/RJ/RJBS/Pod-Coverage-TrustPod-0.100006.tar.gz ... OK Configuring Pod-Coverage-TrustPod-0.100006 ... OK ==> Found dependencies: Pod::Eventual::Simple --> Working on Pod::Eventual::Simple Fetching http://www.cpan.org/authors/id/R/RJ/RJBS/Pod-Eventual-0.094003.tar.gz ... OK Configuring Pod-Eventual-0.094003 ... OK Building and testing Pod-Eventual-0.094003 ... OK Successfully installed Pod-Eventual-0.094003 Building and testing Pod-Coverage-TrustPod-0.100006 ... OK Successfully installed Pod-Coverage-TrustPod-0.100006 Building and testing Test-CheckManifest-1.43 ... OK Successfully installed Test-CheckManifest-1.43 --> Working on PDF::API2 Fetching http://www.cpan.org/authors/id/S/SS/SSIMMS/PDF-API2-2.045.tar.gz ... OK Configuring PDF-API2-2.045 ... OK ==> Found dependencies: Test::Memory::Cycle --> Working on Test::Memory::Cycle Fetching http://www.cpan.org/authors/id/P/PE/PETDANCE/Test-Memory-Cycle-1.06.tar.gz ... OK Configuring Test-Memory-Cycle-1.06 ... OK Building and testing Test-Memory-Cycle-1.06 ... OK Successfully installed Test-Memory-Cycle-1.06 Building and testing PDF-API2-2.045 ... OK Successfully installed PDF-API2-2.045 Building and testing Firefox-Marionette-1.49 ... OK Successfully installed Firefox-Marionette-1.49 8 distributions installed

david-dick commented 8 months ago

Fix pushed. Thanks for the bug report and help in diagnostics.