Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw

Re^3: Problem with WWW::Mechanize::Chrome

by Corion (Pope)
on Nov 10, 2017 at 11:23 UTC ( #1203117=note: print w/replies, xml ) Need Help??

in reply to Re^2: Problem with WWW::Mechanize::Chrome
in thread Problem with WWW::Mechanize::Chrome

[1110/] GetMimeType d +oesn't know mime type for: page/882884f3-27b2-42f3-81b1-a80cad81d727 +text/plain will be returned

I've never seen this error message from Chrome, but it seems that something really weird is happening with your setup and/or your machine.

Note that you can only access the devtools from one location, either from Perl or from within Chrome. It does not allow access from two things at once. If you open the devtools in Chrome after launching Perl, Perl will lose the access to the devtools.

Replies are listed 'Best First'.
Re^4: Problem with WWW::Mechanize::Chrome
by ivartr (Novice) on Nov 13, 2017 at 11:10 UTC
    I noticed, that there is almost always an error message:
    2017/11/13 13:01:47 Too many arguments for subroutine at /usr/local/share/perl/5.22.1/AnyEvent/WebSocket/ line 192 
    This was pointing to me that there might be some issues with Anyevent, therefore I added a line: use Mojolicious; before loading WWW::Mechanize::Chrome. It was quite success, included examples mostly work with some error messages:
    Use of uninitialized value $chunk in concatenation (.) or string at /usr/local/share/perl/5.22.1/Mojo/Asset/ line 15.
    Mojo::Transaction::WebSocket=HASH(0x5042538) at /usr/local/share/perl/5.22.1/Chrome/DevToolsProtocol/Transport/ line 57.

      Thank you for pursuing this and keeping at this!

      The error message reminds me of a bugfix where the (number of) parameters given to a callback changed with some version of AnyEvent::WebSocket, which I think I fixed already, but it seems I haven't even published the change on Github yet. Update: Now the change has been pushed.

      In any case this sounds like a bug in my codebase to me, so I'll have to find out what callback is called at that place and whether my latest changes fix that. Having internal errors vanish silently is infuriating to me, and my codebase certainly shouldn't gobble up such errors.

      I've seen those other warnings, but I'm not familiar enough with Websockets to know what an empty message should be, and whether undef would be allowed there.

        Thank you! I downloaded latest version and it mostly works. However some probably minor errors on running testsuite:
        t/50-mech-forms.t ................ 7/14 # Failed test 'We found five forms' # at t/50-mech-forms.t line 61. # got: '6' # expected: '5' .. Many tests issue this warning: AnyEvent::Future=HASH(0x2ee1000) AnyEvent::Future=HASH(0x2ee1000) los +t a sequence Future at /home/ivar/WWW-Mechanize-Chrome-master/blib/li +b/Chrome/ line 305. .. Test Summary Report ------------------- t/50-mech-forms.t (Wstat: 256 Tests: 14 Failed: 1) Failed test: 8 Non-zero exit status: 1 Files=32, Tests=227, 200 wallclock secs ( 0.13 usr 0.04 sys + 12.29 c +usr 3.20 csys = 15.66 CPU) Result: FAIL Failed 1/32 test programs. 1/227 subtests failed. Makefile:930: recipe for target 'test_dynamic' failed make: *** [test_dynamic] Error 255
        Thank you for your support! Despite of some glitches, I'm probably able to use the module and go forward with my task.. Anyway - I'm happy to support you in further testing if needed. Kind regards, Ivar

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1203117]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (5)
As of 2018-08-16 19:23 GMT
Find Nodes?
    Voting Booth?
    Asked to put a square peg in a round hole, I would:

    Results (171 votes). Check out past polls.