Skip to content

add some more logging information to help diagnose the 'method not found' errors #4125

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

Merged
merged 1 commit into from
Nov 19, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions src/io/flutter/inspector/EvalOnDartLibrary.java
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ public <T extends Obj> CompletableFuture<T> getObjHelper(ObjRef instance, Inspec
getIsolateId(), instance.getId(), new GetObjectConsumer() {
@Override
public void onError(RPCError error) {
future.completeExceptionally(new RuntimeException(error.toString()));
future.completeExceptionally(new RuntimeException("RPCError calling getObject: " + error.toString()));
}

@Override
Expand All @@ -193,7 +193,7 @@ public void received(Obj response) {

@Override
public void received(Sentinel response) {
future.completeExceptionally(new RuntimeException(response.toString()));
future.completeExceptionally(new RuntimeException("Sentinel calling getObject: " + response.toString()));
}
}
);
Expand Down Expand Up @@ -254,13 +254,13 @@ public void received(Isolate response) {
}

@Override
public void received(Sentinel response) {
libraryRef.completeExceptionally(new RuntimeException(response.toString()));
public void onError(RPCError error) {
libraryRef.completeExceptionally(new RuntimeException("RPCError calling getIsolate:" + error.toString()));
}

@Override
public void onError(RPCError error) {
libraryRef.completeExceptionally(new RuntimeException(error.toString()));
public void received(Sentinel response) {
libraryRef.completeExceptionally(new RuntimeException("Sentinel calling getIsolate:" + response.toString()));
}
});
}
Expand Down
11 changes: 5 additions & 6 deletions src/io/flutter/inspector/InspectorService.java
Original file line number Diff line number Diff line change
Expand Up @@ -379,12 +379,6 @@ private CompletableFuture<JsonElement> invokeServiceExtensionHelper(String metho
vmService.callServiceExtension(
getInspectorLibrary().getIsolateId(), ServiceExtensions.inspectorPrefix + methodName, params,
new ServiceExtensionConsumer() {

@Override
public void onError(RPCError error) {
ret.completeExceptionally(new RuntimeException(error.getMessage()));
}

@Override
public void received(JsonObject object) {
if (object == null) {
Expand All @@ -394,6 +388,11 @@ public void received(JsonObject object) {
ret.complete(object.get("result"));
}
}

@Override
public void onError(RPCError error) {
ret.completeExceptionally(new RuntimeException("RPCError calling " + methodName + ": " + error.getMessage()));
}
}
);
return ret;
Expand Down