itsgoingd / clockwork-chrome

Clockwork - php dev tools integrated to your browser - Chrome extension
https://underground.works/clockwork
411 stars 25 forks source link

Clockwork works but extension doesn't display anything, just empty... #4

Closed eugene-manuilov closed 10 years ago

eugene-manuilov commented 10 years ago

Hi there!

First of all thanks for doing this great stuff!

I have installed extension in developer mode and it seems working in dev tools. But when I enable server side part, I don't see any results in the Clockwork tab. I have opened background page console and see all ajax requests created by Clockwork, all of them receive proper JSON generated by server side library.

Looks like $scope.setActive(requestId); doesn't work as expected....

Is there any particular instructions how can I troubleshoot it?

itsgoingd commented 10 years ago

Hey, what Chrome version and platform are you using? Can you send me a sample of the json data that is not displaying properly? Don't forget to remove any private data first, you can send me an email at itsgoingd@luzer.sk. Thanks!

eugene-manuilov commented 10 years ago

I am using Chrome 30.x and Ubuntu 13.10. Here is my json data:

{
    "id": "1384088499.5848.1510192090",
    "time": "1384088499.529",
    "method": "GET",
    "uri": "\/account\/",
    "headers": {
        "Accept": ["text\/html,application\/xhtml+xml,application\/xml;q=0.9,image\/webp,*\/*;q=0.8"],
        "Accept-Encoding": ["gzip,deflate,sdch"],
        "Accept-Language": ["en,en-US;q=0.8,uk;q=0.6,ru;q=0.4"],
        "Cache-Control": ["no-cache"],
        "Connection": ["keep-alive"],
        "Cookie": ["wp-settings-time-1=1383845866"],
        "Dnt": ["1"],
        "Host": ["localhost"],
        "Pragma": ["no-cache"],
        "Referer": ["http:\/\/localhost\/welcome\/"],
        "User-Agent": ["Mozilla\/5.0 (X11; Linux i686) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/30.0.1599.114 Safari\/537.36"]
    },
    "controller": null,
    "getData": [],
    "postData": [],
    "sessionData": null,
    "cookies": {
        "wp-settings-time-1": "1383845866"
    },
    "responseTime": 1384088499.69,
    "responseStatus": 200,
    "responseDuration": 161.00001335144,
    "databaseQueries": [],
    "databaseDuration": 0,
    "timelineData": [],
    "log": [],
    "routes": [],
    "userData": null
}
itsgoingd commented 10 years ago

Hey, just out of curiosity, are you working on a custom server-side implementation? The problem was sending null as sessionData, which the extension code expected to be an array, I've added additional check to fix this.

eugene-manuilov commented 10 years ago

Thanks for the fix, everything works good right now.

Currently I am using your server-side implementation, but going to implement my own implementation because it gonna be WordPress plugin, which has to work on PHP 5.2.x servers.