Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HAR files of remote debugging don't work #64

Open
IcyT opened this issue Oct 30, 2014 · 2 comments
Open

HAR files of remote debugging don't work #64

IcyT opened this issue Oct 30, 2014 · 2 comments

Comments

@IcyT
Copy link

IcyT commented Oct 30, 2014

When I debug an android device remotely the HAR file is not working in your viewer. In the console, I can see the following error:

TypeError: Cannot read property 'startedDateTime' of undefined
    at Object.<anonymous> (http://ericduran.github.io/chromeHAR/js/controllers.js:99:73)
    at Function.x.extend.each (http://ajax.googleapis.com/ajax/libs/jquery/2.0.3/jquery.min.js:4:4575)
    at Object.$scope.updateHar (http://ericduran.github.io/chromeHAR/js/controllers.js:97:9)
    at http://ericduran.github.io/chromeHAR/js/controllers.js:271:20
    at Object.g.$eval (http://ajax.googleapis.com/ajax/libs/angularjs/1.2.0rc1/angular.min.js:104:502)
    at Object.g.$apply (http://ajax.googleapis.com/ajax/libs/angularjs/1.2.0rc1/angular.min.js:105:102)
    at FileReader.reader.onload (http://ericduran.github.io/chromeHAR/js/controllers.js:270:18) 

So I had a look into the code in line 99 of controllers.js and it is calling:

pages[0].startedDateTime

I had a look into the HAR file then and I've seen that the pages are an empty array:

"pages": [],

I could reproduce it on some different devices. Maybe it's not empty for all devices, but it was for the devices I tested.

@ericduran
Copy link
Owner

hmm, I thought startedDateTime was part of the spec, but maybe the HAR is not a full page request which is probably why it's missing.

@IcyT
Copy link
Author

IcyT commented Oct 31, 2014

Yes, I think it wasn't a full page request. I cleared the network tab in Chrome and recorded some AJAX calls that were made after some time. This is useful to examine specific calls. I'm not aware of the spec but nevertheless it would be useful if your tool allows to view the files anyway.
I could get it ro run locally with a quick workaround by faking a pages entry if it is an empty array. But I think this is not a clean solution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants