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

ssh-auth-cmd-marionette refused command for xpi install in case of remote connection + profile #48

Closed prozorecJP closed 2 months ago

prozorecJP commented 2 months ago

Hi.

I set up firefox like this.

my $firefox = Firefox::Marionette->new (
  'profile_name' => 'default',
  'host' => '192.168.3.2',
  'user' => 'foxy',
  'port' => 22,
  'debug' => 0,
);

And then tried installing extension

my $id = $firefox->install ($my_local_xpi, 1);

but the server side refused the command like this.

Jun 27 07:35:37 foxy ssh-auth-cmd-marionette[6879]: Unrecognisable command "mkdir -m 700 /tmp/firefox_marionette_local_nOK2LkJ4LHL/addons" with a quoted TMPDIR of "\/tmp" and a root directory regex of "(?^msx:(?^msx:(?:/var)?/tmp)/firefox_marionette_remote\w+)"

It looks that ssh-auth-cmd-marionette doesn't contain regex patter like firefox_marionette_local but contains firefox_marionette_remote.

Strange thing is that if I remove profile option, it works. Somehow Firefox::Marionette doesn't submit mkdir command.

Jun 27 08:40:53 foxy ssh-auth-cmd-marionette[8682]: Unrecognisable command "echo TMPDIR=\"$TMPDIR\"" with a quoted TMPDIR of "\/tmp" and a root directory regex of "(?^msx:(?^msx:(?:/var)?/tmp)/firefox_marionette_remote\w+)"
Jun 27 08:40:53 foxy ssh-auth-cmd-marionette[8684]: Unrecognisable command "echo TMP=\"$TMP\"" with a quoted TMPDIR of "\/tmp" and a root directory regex of "(?^msx:(?^msx:(?:/var)?/tmp)/firefox_marionette_remote\w+)"
Jun 27 08:40:54 foxy ssh-auth-cmd-marionette[8686]: Unrecognisable command "echo TMPDIR=\"$TMPDIR\"" with a quoted TMPDIR of "\/tmp" and a root directory regex of "(?^msx:(?^msx:(?:/var)?/tmp)/firefox_marionette_remote\w+)"
david-dick commented 2 months ago

Replicated. Good catch. Patch should be out shortly. I'm planning on a new release for this weekend.

david-dick commented 2 months ago

Patched. Thanks.