Weinre target none on Android emulator 4.1.2 on Windows 10

232 views
Skip to first unread message

Nikos Papanikolaou

unread,
Aug 12, 2015, 7:11:15 PM8/12/15
to weinre
hi, 

i ve spent the last two days trying to connect to weinre to debug an app that is running on Android nexus emulator 4,1.2 on a windows 10 x64 machine.

So far i ve tried

global installation of weinre on my pc with following options (according to various stackoverflow threads)

- script tag with address localhost / pc ip 192.168.1.xx  on port 8080
- placing script tag on various places according to stackoverflow threads, suggestions head, end before/after cordova.js etc..
- access origin on config both with "*" as well with specific local ip 
- run weinre server both with boundHost all as well with boundHost specifiic local ip
- run emulator normal moe and debug mode
- enable / disable usb debugging on emulator
- windows defender on / off

no matter what targt remained none..

today i tried with weinre public server and puublic server's url on script tag, still 
target none..

i know what else to try..

i spotted a while ago a thread mentioning that android emulator listens to localhost 5554
could this be the problem? perhaps telnet redirection from 5554 to 8080 or is this irrelevant?
also in case of public server, would it be necessary to apply port forwarding over the router?

te preferable solution is to make weinre run on my pc..

thanks in advance..

Patrick Mueller

unread,
Aug 12, 2015, 8:04:48 PM8/12/15
to weinre
A couple things come to mind:

1) networking issues, from the emulator
2) your JS is exiting early, and the weinre script in the page being debugged isn't running

for 1), if you can browse to the http://weinre.mybluemix.net/ site in your phone's browser, then you don't have a networking issue.  If you can't browse to that site, then you do have a networking issue.  I don't know you would fix it.

for 2), try debugging your page WITH the weinre script it from a desktop browser, and see if there's some error preventing weinre from running

You can also also try debugging the demo app on your phone.

- on your phone, go to: http://weinre.mybluemix.net/
- on your laptop/desktop, go the same site
- on your phone, click the "the non-minified demo" under "Target Demos"
- on your laptop/desktop, click the link beside "debug client user interface" under "Access Points"

You should be able to debug the page on your phone from your laptop/desktop.
Message has been deleted

Nikos Papanikolaou

unread,
Aug 15, 2015, 1:52:03 PM8/15/15
to weinre
my mistake, i didn't make it work, i had refreshed the page as html document from the browser, and weinre had spotted the browser to be debugged..so i still think that it can't make a connection.

Nikos Papanikolaou

unread,
Aug 15, 2015, 2:38:21 PM8/15/15
to weinre
1) networking issues, from the emulator

i can view web page from the emulator, but still no connection

2) your JS is exiting early, and the weinre script in the page being debugged isn't running

no error seem to be occuring when loading weinre script from desktop browser.. even weinre captures the page that time for debugging, but not the app




Τη Πέμπτη, 13 Αυγούστου 2015 - 2:11:15 π.μ. UTC+3, ο χρήστης Nikos Papanikolaou έγραψε:

Patrick Mueller

unread,
Aug 15, 2015, 5:38:14 PM8/15/15
to weinre
On Saturday, August 15, 2015 at 2:38:21 PM UTC-4, Nikos Papanikolaou wrote:
1) networking issues, from the emulator

i can view web page from the emulator, but still no connection

That makes it sound like your emulator isn't allowing XHRs out to the weinre server.  I have no idea what that problem might be.
 
2) your JS is exiting early, and the weinre script in the page being debugged isn't running

no error seem to be occuring when loading weinre script from desktop browser.. even weinre captures the page that time for debugging, but not the app

What does "not the app" mean?

Did you try "debugging the demo app on your phone" steps from a previous message in this thread?
Reply all
Reply to author
Forward
0 new messages