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-
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've been struggling for a while trying to run something on iis-express (service for example) and trying to use it from another device, for example, trying to debug Andoroid\IOS\Win-Phone (or Xamarin) application with WebApi\WCF service.
I have encountered many problems while trying to do this, I've found lots of recommendations about what to do, but non of them worked for me and were to complicated if you don't have a static IP.
After a while, I've found this very simple node.js open source iis-express,
So I wanted save everybody lots of time
This app just opens a simple temp proxy to a specific port on iis-express, it works great and it is very simple.
Just install it with npm:
npm install -g iisexpress-proxy
And then run
iisexpress-proxy localPort to proxyPort
Just don't forget to install node.js and make sure ports are not blocked by firewall
Hope it helps
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.
Someone could help me, I made a game in Corona and works perfectly on the simulator, but when I install the Android does not work, the functions are not called. Follow the project https://github.com/AndreRavagnani/SamuraiTheRevenge
Thanks
Make sure you aren't requiring anything in your main.lua file. Also what I would recommend doing is using ADB logcat to see what error is happening on the device. Most likely it's a syntax error that only occurs on build. Plug your android device into your computer and run logcat to see what happens.
If it works on the simulator but not working on your device, then these could be the few possible errors.
Check the file names are proper, because corona is case sensitive, simulator wont care about the spellings but device will throw error.
Check whether you are giving the proper scene name, this also case sensitive.
Check whether you are giving the proper file path .
I hope if you check these things it will give you some solution.
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.