square / PonyDebugger

Remote network and data debugging for your native iOS app using Chrome Developer Tools
Other
5.87k stars 595 forks source link

Request with id = X failed. unknown domain [Debugger, Profiler, Timeline, Page, Inspector ...] #128

Open gfarrell opened 9 years ago

gfarrell commented 9 years ago

PonyDebugger is connected in my app, and shows up on the list of devices (it's running in the simulator). When I click on it, the dev tools are completely blank (as in, the interface shows up, but no data at all, not even the attempts I made at logging).

If I open the web inspector, and have a look at the console, I see these errors.

Request with id = 1 failed. unknown domain Debugger

and so on, all referencing InspectorBackend.js:237, which is in the reportProtocolError() method.

I'm initialising the debugger as follows in my AppDelegate:

// Setup PonyDebugger
PDDebugger *myMagicPony = [PDDebugger defaultInstance];
// [myMagicPony autoConnect];
[myMagicPony connectToURL:[NSURL URLWithString:@"ws://localhost:9000/device"]];
[myMagicPony enableNetworkTrafficDebugging];
[myMagicPony forwardAllNetworkTraffic];
[myMagicPony enableRemoteLogging];

PDLog(@"Hello World");

As I said, in the XCode console I can see that it has connected, and in the pony gateway I can see the device listed, I just am not getting any data, and I have a feeling that the errors I posted a screenshot of above have something to do with it.

bawn commented 9 years ago

same problem

Joachricar commented 9 years ago

I am getting these errors as well.

Update: I finally got some data from the PonyDebugger. The "unknown domain XXX" errors are responses from the iOS app and lists requestes Domains which are not activated on the app yet(or so it seems). When disabling and enabling networkDebugging, CoreDataDebugging, remoteLogging etc. the list of errors expands/shrinks.

        let debugger = PDDebugger.defaultInstance()
        debugger.enableCoreDataDebugging()
        debugger.addManagedObjectContext(RKObjectManager.sharedManager().managedObjectStore.mainQueueManagedObjectContext)
        debugger.enableNetworkTrafficDebugging()
        debugger.forwardAllNetworkTraffic()
        debugger.enableViewHierarchyDebugging()
        debugger.enableRemoteLogging()
        debugger.connectToURL(NSURL(string: "ws://myLAN-IP:9000/device"))

By using the above code i can now browse CoreData, but i still get no data on the networkDebugger and the viewHierarchyDebugger.