frazap has asked for the wisdom of the Perl Monks concerning the following question:

Background: I packaged a script that use WWW::Mechanize::Firefox on my W10 pc and the exe works on my pc.

When I run that exe from another pc, after having install MozRepl on my colleague's Firefox I receive

No result yet from repl at MozRepl/RemoteObject.pm line 836, <DATA> li +ne 1
As a test, I tried to
telnet localhost 4242
Which works on my pc. I had to install telnet on the other pc (from msys2) to be able to have the same connection working too.

But the exe keeps returning the message above.

Thanks for any help on this

F.

Replies are listed 'Best First'.
Re: Running a packaged script using MozRepl
by marto (Cardinal) on Jul 14, 2017 at 15:31 UTC

    My experience of Windows 10 is fairly limited, consider checking the built in firewall, IIRC even the Microsoft one can block ports on a per executable basis. What works for telnet (did you get a firewall prompt when connecting? Or run it as Administrator?) may not work for something else.

Re: Running a packaged script using MozRepl
by Marshall (Canon) on Jul 15, 2017 at 00:09 UTC
    I have gotten WWW::Mechanize::Firefox to work before with Active State Perl, but years ago and haven't done it on my current PC. I am was on XP at the time.

    You won't like this answer because it is not easy. But you probably had to do something to your PC in order to make the Perl script work from the .pl file which you have now forgotten about.

    Since you are talking about a colleague instead some unknown guy on the internet, I would install Perl on his machine and see what it takes to get the un-packaged (non .exe) source code to run on his machine. That my remind you of some debugging steps that you did on your machine. Then I would make an .exe on his machine and see if it runs on your machine.

    There are many ways to go wrong with pp. When I was doing this with AS, I had a license to their .exe builder (PerlApp). I started with this thing in the '90's, when their dev kit was pretty "cheap". I think the AS price is "outa sight" nowadays. Anyway get source to run on your colleague's machine. Follow the trail from there.

      I followed Marshall's advice and install strawberry perl on my colleague's pc.

      I couldn't pass the test with MozRepl::RemoteObject and at the end, I saw that the Firefox version of my colleague was 55 and mine is 54.

      We install Firefox 54 on his pc and the packaged program using WWW::Mechanize::Firefox works.

      So the mozrepl Addon does not work in FF 55.

      I tried WWW::Mechanize::Chrome, which works as a script, but that I couldn't pack. Always hitting the error

      Can't call method "new" without a package or object reference at Futur +e/HTTP.pm line 67.
      with the exe.

      At the end, I have install this module and it's dependencies and use the script.

      F.

        Future::HTTP dynamically loads the appropriate backends, so you need to include these when packaging your script too.

        Hi, Just so everyone is aware, it looks like WWW:Mechanize:FF will stop working with firefox 57:

        > MozRepl will no longer work as of FF55 due to their shift to web extensions

        Apparently and sadly yes, see https://github.com/bard/mozrepl

        Important Notice

        Key technologies upon which MozRepl depends will be retired from the Mozilla platform in November 2017. If you are relying on MozRepl, please investigate migration paths. The last known compatible version is Firefox 54.

        This is indeed of interest for some of us, at least for maintainers and users of WWW::Mechanize::Firefox, which depends on MozRepl::RemoteObject

        more comments: Re: mozrepl end of life

        2017-10-08 Athanasius fixed links and added blockquote and paragraph tags

        "which works as a script, but that I couldn't pack. Always hitting the error"

        Can you show your pp line for the failed package?

        Give ppsimple.pl a try, if it doesn't work post the last part of the log which is the call to pp/invocation of pp, and the output of pp