I am trying to debug a web page inside my Android app's WebView.
I've setup and started weinre following these and these instructions, modified my web page adding
<script src="http://my-local-ip:8080/target/target-script-min.js"></script>
Now, as I understand, I should open http://localhost:8080/client/#anonymous in Chrome and find my debug target there. However the targets list is empty.
What have I missed or done wrong?
Had to use IP address both in Debug Target and Debug Client, i.e.
http://my-local-ip:8080/client/#anonymous
I had the same issue. The issue is gone after changed "127.0.0.1" to real ip like "192.168.0.42".
Related
I have a react-native app with ios and android versions. Both versions use a webview to access a web site. The ios version works when pointed to either the production web site or local development version. The web site uses ruby on rails and the development server is pow.
When I run the android app, it loads but when it tries to access a local version of the web site, it returns the following error:
console.error: "Encountered an error loading page", {"canGoForward":false,"code":-2,"canGoBack":false,"description":"net::ERR_ICANN_NAME_COLLISION","loading":false,"title":"","url":"http://my_app.dev/,"target":69}
The same happens if I use localhost rather than the my_app.dev. It does however work when pointed to the external production url i.e my_app.com.
I have tried using a different android device, and the error changes to ERR_CONNECTION_REFUSED. The first device used the android browser whereas the second looks like it uses chrome. So it does appear to be a browser specific problem. Reading this link, I used nslookup my_app.dev to work out the ip address as 127.0.53.53 and entered
127.0.53.53 my_app.dev
into the /private/etc/hosts file. However this still gives same error. How do I fix this?
A work around for this problem is to find out the ip address of the development machine, say 192.168.0.33, configure the server to allow external access at my_app.192.168.0.33.xip.io, and then in the react app, configure the host url as http://my_app.192.168.0.33.xip.io. However this means running the server in special mode, so it would be better to find a direct answer to this question.
I develop web/phone app that uses Google Endpoints.
App properly works from localhost and when deployed to GAE.
App also properly works in Intel XDK emulator and when debugged in Intel XDK App Preview on device.
App doesn't works when run on Android device as .apk. Looks like it cannot make call to Google Endpoints.
It also doesn't works when running in browser from file system. In this case I see the exception:
Failed to execute 'postMessage' on 'DOMWindow': The target origin
provided ('file://') does not match the recipient window's origin
('null').
Some answers (Google API in Javascript) provide information that issue can be solved by changing configuration on Google Console, but I cannot found anything in Google Console that related to origin.
I am new to mobile development, so I can had miss something obvious.
Any help will be very appreciated.
As it was supposed by konqi problem had solved by domain whitelistening
In Intel XDK it can be done by following next steps:
Open Projects Tab
Expand Build Settings
Enter "*" (without quotes) to Domain List field.
I'm using Weinre to Debug my PhoneGap App locally. I've enabled Debug on Adobe Build, and when I run the App, I am able to connect and debug using the Weinre interface:
Everything works great until I navigate to a new page in my app. Then, I am disconnected, and can no longer debug:
Can anyone offer any guidance, or suggestions?
Well, that's just the way it works. weinre runs in "user land" - that is, as a live thing inside your page. So, when you replace the page with a different page, weinre won't be running on that new page, unless you've also instrumented that page to use weinre.
Please see the latest weinre docs for tips about using other debuggers, which might work out better for you.
Please help me in installing and debugging my mobile htmls from my machine using weinre.Lot of guys telling me how useful weinre is, but i am unable to find the way how to install it, please help me how to install weinre and debug using it.Thanks in advance.
If you still need to use Weinre locally, here is the global process after install:
Weinre does not find any target
More precisely here: https://stackoverflow.com/a/16761649/79445
When i try to search for the answer, i found one interesting link http://debug.phonegap.com/, there you have the weinre installed in that website.
What you need to do is:
open the link http://debug.phonegap.com/
Create your guid in the text box there.
then you see the script tag generated for your guid below.
copy paste that script tag in your mobile page where you want to test
open the page you want to test in the mobile browser
then come to the http://debug.phonegap.com/#yourguid.there you see the web inspector
debug it, simple.
I'm building a Phonegap application. I've already made the html application, and tested it in my Windows Google Chrome browser, with no errors. I've cheked it in the navigator of my Android Phone and it is working. However, after Phonegap, I see some things are not working.
Which browser is Phonegap using? Is it not the same as the Android navigator? Can I somehow debug it?
On my Eclipse console I only see errors about Vertext shaders.
Thanks
PhoneGap instantiates an Android WebView component with is not equal to the Android Browser. If your code has console.log statements you should be able to see them in LogCat tab in Eclipse.
If you want better debugging you should add WeInRe to your project for remote debugging.
You can add console.log statements, which can be seen with adb logcat in the Terminal, or with DDMS.
And how about this? What do you think?
https://chrome.google.com/webstore/detail/ripple-emulator-beta/geelfhphabnejjhdalkjhgipohgpdnoc?hl=en