Sorry for the newbie question, but I spent the whole day trying to figure out why the target list remains empty.
This is what I've done so far:
Launched the Weinre host, bounded to my desktop ip adress
(192.168.0.38)
Checked it on Chrome : the host is bounded to
192.68.0.38:8080
Checked that the device is able to access to 192.168.0.38:8080/target/target-script-min.js#anonymous
White-listed both 192.168.0.38:8080 and 192.168.0.38 in config.xml
Added the script call in the index.html
Still the target list remains empty when I launch the app on the device from ADT...
What should I do next?
Thanks!
___ EDIT
I tried the demo, and it's working!
So what makes the difference between calling the script from a demo file, or from the application?
Turns out for me, the problem was that the mobile device silently switched over to another Wi-Fi network (than the one my computer was on), thus rendering the Weinre JS Script unreachable from within the app.
It's different than the issue described above (since, for Yako, the example scripts were working fine), but thought it could help somebody someday.
My issue was that I kept trying to access a page anchor. Apparently that doesn't work too well so I have to load the page first with no anchor, then add the anchor separately.
Finally, it's working!
It seems I only had to wait a little bit after app initalization!??
For all of you who still have to use weinre and have the same problem, I just want to share my mistake:
I did not whitelist my IP-address in the config.xml
maybe some of you have the same mistake.
Related
When I run the following command meteor run android-device I app loads on the device, but I cannot login or perform any action, and I get the following error message :
I20160125-16:26:04.688(2) (android:http://meteor.local/:0) XMLHttpRequest cannot load http://192.168.20.41:3000/sockjs/info?cb=pp4d6iodxu. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://meteor.local' is therefore not allowed access. The response had HTTP status code 403.
My phone is in developer mode, and I'm debugging (or attempting to) via USB.
As I already mentioned, the app is loading, but I'm dead from there.
Try to add App.accessRule("*"); to /mobile-config.js
After trying a number of things, including setting up another demo app, multiple restarts, setting up browser policies and tons of access Rules etc, it finally began to work. The things I tried:
plenty of accessRules in the mobile config
Browser Policy Package with standard rules
temporarily setting environmental variables for root url etc.
So in order to figure out what specifically caused the issue I began to work backwards removing things, until I removed ALL OF IT. and then it still worked.
I have tried for two weeks to replicate the issue now, and everything is working smoothly. Putting this down to a random bug, in my system, there are definitely more than a few people that have hit it.
The only thing I think I could have missed is a package update, that patched some package in the dependency tree that caused the whole thing to bomb on mobile.
I really need some help here...
I have developed a simple app using cordova and I wish to debug the app using weinre for further improvement.
The problem is when i host weinre client and access with browser to http://192.168.0.111:8080/client/#anonymous
the app does not show as a target in the client..
I have insert this script import line at the last part of my index.html
<script src="http://192.168.0.111:8080/target/target-script-min.js#anonymous"></script>
In config.xml, i put <access origin="*" />
and in AndroidManifest.xml, i put <uses-permission android:name="android.permission.INTERNET" />
I have also try to open my index.html with the browser of computer which hosting weinre and it's been indicate as a target. Which mean the code should be working fine.
I have also try to access http://192.168.0.111:8080 and the weinre info page is showing up. which mean the ip is correct and accessible from my handphone.
but I wonder why when i run the app, weinre dint show my app as a target. Do I miss out some important step to allow my app to be accessible?
Please help.
After all I still cannot identified the issue, it might be configuration issue and it might not... any suggestion or answer will be welcome.
and to provide solution for those who have similar situation as me, you can try this https://developer.chrome.com/devtools/docs/remote-debugging.
It's working fine for my case. Besides, it's much easier to setup and more familiar interface. You can even step through your js line by line just like what you can do with your pages.
for the moments, this is the best solution i can get.
Bluestacks stuck up on loading channel with a circle in the middle...
so far I had uninstalled and re-installed bluestacks several times but ended with the same issue.
I am using fastest internet connection in my pc using LAN / Wifi.
i found the solution , it seems that blue stacks trying to connect to some kind of store and he couldn't, i fix it up by running an app called psiphone 3 , its a free vpn app , after u run it u will notice that nothing change and the loading page still appear just wait for 5 minutes and the store list will appear after this try to download any launcher u want , and then ur problem will be solved
sorry bad english.
I've got the same issue and it looked like that the application 'com.bluestacks.gamepophome' is missing or corrupt. You can check the log file 'C:\ProgramData\Bluestacks\GameManager.log'.
The solution I applied is to use a different Launcher. I used ADW Launcher as an replacement. The benefit is that I can use more of the default Android apps as well.
If you are facing constant issues while running Bluestacks i.e Bluestacks Loading Screen problem then there's no need to worry anymore you can easily fix the issue by trying the following steps :
1 - Install Latest Bluestacks App player and install all additional software's required by bluestacks for proper operation
2 - Give Users Account Full Control Access
For more details and step by step guide visit here :
http://www.rushinformation.com/bluestacks-loading-problem-screen-fix/
It was stuck and blinking for me. I resolved it by:
Go to Settings > Apps > All Apps
Select GamePopMain
Force Stop and Clear Data
And voila - it started working again
I had the same issue and what I figured is the GamePopMain is a launcher for BlueStacks. It has some issue in the Mac version for sure and on windows may have them as well. Install any other launcher and you will stop getting crashes and will be able to use it with out problems.
I think I may be missing something, but I have installed the .apk on my android tablet with the script
<script src="http://localhost:8080/target/target-script-min.js#anonymous"></script>
in the header.
I decided to try running it locally following http://forums.adobe.com/docs/DOC-2623. I went to "localhost:8080" and weinre is installed, but I still get the same thing "target not found".
I think I am missing a step, or I am not completely understanding how it connects to my app?
I have also tried building it via build.phonegap.com enabling debug mode, then installing the apk then clicking debug, gosh the steps are nice and easy but I can't get it to work.
I have to be missing something, so I hope someone can help me understand what I am missing.
Solved: Thanks to #Christian Kuetbach following his answer helped, let me add a few things just in case someone else has this issue.
I made sure the script weinre gives you to add is loaded last, I put it at the very bottom, because I figured it should load after everything. Just did this to make sure.
Make sure to connect to weinre properly, #Christian Kuetbach says it --boundHost -all- but I had to enter it like this weinre --boundHost -all- maybe adding the weinre is an obvious thing, but it could cause confusion, so make sure to do that I am running on win8 if that makes a difference.
How did you start the weinre server part at the android device?
I think you'll nee to use the IP of you server (You Dev-Computer) in the HTML.
In case of Windows 8: https://kb.wisc.edu/page.php?id=27309
In that example above the IP is 144.92.124.118
<script src="http://144.92.124.118:8080/target/target-script-min.js#anonymous"></script>
update
This will only work, if the device is online and in the same network as your PC and the firewall is configured to allow connections and weinre server is started with the parameter --boundHost -all-
i am developing phone-gap app in android. In app I am calling a servlet returning JSON. Under app code I am calling following method through javascript in index.html
JQuery.getJSON(servleturl,function(data){alert(data)});
When running in emulator the alert is getting displayed, but data is always null. However if i launch the index.html (main application file in phonegap) from browser, I am able to get Json.
same thing happens even if I use $ajax.
please help me and let me know what I am doing wrong.
A little bit later, but I had the same problem today, and I've solved it, so if you didn't sort this problem this would help.
So, the problem is not in JSON or in the phonegap, but it's in the AndroidManifest.xml file.
You should have a tag like this:
<uses-permission android:name="android.permission.INTERNET" />
this should allow your application to work with Internet. Without this connection to Internet from your application is forbidden. That tag need to be placed right after the start tag.
Check Phonegap sample manifest for full list of possible permissions.
hope this will help to someone.
I fixed up (read made the changes to get working under a newer version of node.js) a little tool called ibug that John Boxall wrote that I found useful for debugging on the phone (since there is no real way to do it except debug.log and looking at XCodes console window. Its basically a stripped down firebug lite, and its hosted on github as ibug. Hopefully it will help you figure out why things aren't working.