I am trying to use the description from https://github.com/google/ios-webkit-debug-proxy to debug my website on iPhone (Running iOS 7.1.2).
I compiled ios_webkit_debug_proxy, and is running it with
ios_webkit_debug_proxy -d
I then start google-chrome and point it to localhost:9222/ which shows my iPhone, and the website it is currently visiting. I then copy/paste the link address(chrome-devtools://devtools/bundled/devtools.html?host=localhost:9222&page=1) into a new chrome tab, and then I get a debug window which shows
Elements,Network,Sources,Timeline,Profiles,Resources,Audits,Console.
But none of theese buttons shows any real content. There is no dom. No javascript. No output in the console view. No activity in the network. Its like debugging a empty view.
My ios_webkit_debug_proxy -d console, shows a new message, each time my iPhone
visits a new website. But it shows no other activity. THe messages start with something like
ss.remove_fd(7)
ss.recv fd=13 len=0
ss.remove_fd(13)
ss.recv fd=12 len=221
wi.recv[221]:
And they do just as far as I can see, contain the website url, but not any real content from the website.
The console I started chrome from, shows the message:
"Uncaught TypeError: Cannot read property 'frame' of undefined", source: chrome-devtools:/
I am using Fedora 20.
Does anyone have any clue why this does not work ?
Thanks
It isn't clear to me if you switch the browser to localhost:9222/ after you get a pair of lines like:
Listing devices on :9221
Connected :9222 to Will's iPhone (8a48ac86edd4f299xxxxxxxxxxxxxxx)
if you don't see the second line, then it means that probably you have issues with usbmuxd or libimobiledevice.
I've had some issues myself with the proxy, but then i was able to use it with satisfaction. In my experience, there are few things that make the life easier:
1) Run the usbmuxd as root and possibly with options -fv so that it doesn't detach from the tty and you see what happens. In my Debian installation it is run wit a system user in background;
2) In order to avoid the crash of the proxy when an unhandled exception happens don't use the debugger release of your chrome/chromium but instead use a pretty older one https://chrome-devtools-frontend.appspot.com/static/18.0.1025.99/devtools.html (see https://github.com/google/ios-webkit-debug-proxy/issues/63)
Related
I'm in the process of learning Javascript. I installed the Live Server extension on VS Code, as well as typing "live-server" into the terminal, to see Chrome's console update upon save. Whenever I have a live server up, I keep getting this message in red in the console:
VM4057 content_script.js:1 Uncaught SyntaxError: Identifier 'WBSAutoFillFormTypeUndetermined' has already been declared (at VM4057 content_script.js:1:1)
The only thing I have at 1:1 is 'use strict';, but even if I remove that I still get the message. All code works otherwise. Is there something I can change to make it stop? And just to be clear, I use either the extension or type live-server. Never both at the same time.
The error comes from the Apple's chrome plugin "iCloud Passwords". Deactivate or remove it and the error will disappear.
I have next code
function navigate(_hash){
alert('before');
//try#1
window.location.hash = _hash;
//try#2
// window.location.href=window.location.href.split("#")[0]+"#" +url;
alert('after');
}
navigate('someurl')
the issue is that after changing url hash (both variants) app just hangs. And interesting thing that second alert is not firing. so app just... crashes after some time.
Nothing in js console.
Debug log says
The thread 0x*** has exited with code 259 (0x103).
google found nothing on that. Seems like this is acommon error code.
More details:
i'm using ChaplinJs so just can't get away from hash navigation.
second thought was that chaplin overloads system and we caanot get anywhere, but(!) putting logs and alerts in source of lib in window.on('hashchange',....) also didn't make any effort because we do not get there also.
WP 8.0
tried both Cordova 4.* and 5.*
also tried to modify xhrXelper.cs but it is not related tonavigation itself.
PS: I know that jquery mobile suggests to disable hashchanges onmobile navigation. But i can't :(
PPS: also tried todisable chaplin haschanges
new App({routes: routes, controllerSuffix: '-controller', pushState: false,hashChange:true})
but this also didn't make any good results because it's placing hash to href to check it in interval and app hanged again. So i assume that is a webview problem
More additional info:
continious re-run of app makes it work sometimes (1 run of 10 can make it work). That's very strange.
Emulator and device behave in the same way.
Update: Read somewhere that it's critical to restrict navigting before "deviceready" event.
But this is also not a case.
Update2: create cordova proj from scratch. Added hash change indeviceready cb and it hangs
Update3: same code on 8.1 works perfect
The main idea is to run a random page on Internet Explorer and get javascript errors and logs.
Is there a way to recover javascript console logs and execution error
from a random web page without accessing the F12 tool on Internet
Explorer?
I found that with Chrome based browser, you can get it on your AppData file log by adding --enable-logging --v=1 args when launching.
Any solution with any language are welcome.
Thank you for your answer.
NOTE :
random page on Internet Explorer means that I do not have the access on the source code.
Basic solution to this would be:
1. Use Exception Handling to catch the errors.
2. Log errors in a Global Array
3. Log the errors in a file using Blob and URL.createObjectURL. All recent browsers support this.
Have you considered using a Bookmarklet that:
Overrides window.console.log and window.console.error (to intercept messages)
Logs incoming messages somewhere using createObjectURL?
Or you could use something like firebuglite and auto-enable it like this:
<script type="text/javascript" src="https://getfirebug.com/firebug-lite.js">
{
overrideConsole: false,
startInNewWindow: true,
startOpened: true,
enableTrace: true
}
</script>
More instructions are here: http://getfirebug.com/firebuglite
If the F12 tool is not of your interest, then what about the Event Viewer? Open Event Viewer from Control Panel -> System and Security -> Administrative Tools -> Event Viewer. Then select the log Applications and Services Logs\Internet Explorer.
By default no events are being logged for Internet Explorer, to enable them create a new DWORD registry value named Feature_Enable_Compat_Logging under the following registry key:
HKCU\SOFTWARE\Microsoft\Windows\Internet Explorer\Main \FeatureControl
and set the registry value to 1.
Check the logs you get to see if it's what you're looking for.
One idea would be to write a browser extension which listens for window.onerror and writes to a file. Definitely not as elegant as the Chrome solution, but it would work fairly well.
Using local proxy might be a good one-time solution.
Charles web debugging proxy app has nice UI and it allows to replace any response with local resource.
So basically you'll need:
Download one any of the js files used on target page
add any code you wish to saved version
set up Charles to serve you your local version instead of remote one
You might try Fiddler. It's got its own logging and has amazing inspection power. It won't capture IE specific errors, since it's at a different layer, but it will definitely get you any code that's coming over the wire.
MS CRM 2011 on premise.
No problems if accessed via internal address: crm:5555
Go to crm.ourcompany.co.uk:5555 in IE and load account page and the ribbon is totally grey. (Not disabled - every pixel is the colour grey.)
In Chrome and Firefox the ribbon is loaded fine.
Browser console in IE, Chrome and FF all say access errors.
I can see they are trying to access crm:5555.
IE says:
SCRIPT5: Access is denied.
PageLoader.js, line 1 character 1226
The second line above is presented as a link. Clicking it shows me this: http://pastebin.com/bBadk9HS
The full path is http://crm.ourcompany.co.uk:5555/_static/_common/scripts/PageLoader.js?ver=-1056260279
P.S. IE is "Browser Mode: IE10 Document Mode: IE9 standards".
After Long investigation I have found out the reason for same issue like this.
We had previous rollup activity feed solution.
After importing the new version of Activity feeds this hectic issue was sorted out.
Activity feed new solution is available with rollup up package.it can be found by exacting the rollup package. Previously this was available in Microsoft Dynamic market place.
It turns out that the problem is an address lookup plugin on the Account form.
This is trying to access http://crm:1999, which is a 404, and http://crm:5555, which isn't allowed.
Solutions are to fix the server on http://crm:1999 and set up proper managed internal and external URLs so it'll know whether http://crm:5555 or http://crm.ourcompany.co.uk:5555 or remove the plugin.
I'm going through firefox extension writing bootcamp and somewhere along the way the video's author is speaking about switching browser.dom.window.dump.enabled in about:config to true. This option is no longer present in firefox 5.0. From what I read during my google searches, in ff 4.0 you had to create this preference yourself, and it seems like in firefox 5.0 it doesn't work anymore - I can't seem to dump information to firefox error console any more (regardless of whether console2 is enabled or not).
Relevant code:
Here's how I'm launching the browser:
/usr/bin/iceweasel -profile /some/path -no-remote -jsconsole
And here's the code that only shows the alert, without writing anything to the error console:
onCommand: function(event) {
toJavaScriptConsole("toJavaScriptConsole: hello world");
dump("Hello world!\n");
alert("Hello world!\n");
}
Any idea what I can do to have working dump() called from the ff extension I'm working on in firefox 5.0?
You confused the error console with plain linux console - if you run firefox from terminal you should see the dumps right there.
in-depth explanation
This preference was never present by default - you always had to create it and set to true. Also, the output doesn't go to Error Console, it is rather visible in the terminal you start Firefox from. If you happen to test on Windows you should specify -console command line flag to open a terminal window for the output, on Linux simply starting Firefox from a terminal window will do.