You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Notifications are not confirmable by definition, since they do not have a Response object to be returned. As such, the Client would not be aware of any errors (like e.g. "Invalid params","Internal error").
Sample communication:
{"jsonrpc":"2.0","method":"SetWindowLocked","params":[false]}
{"jsonrpc":"2.0","error":{"code":-32601,"message":"Method not found. The method does not exist / is not available.","data":"SetWindowLocked"}}
{"jsonrpc":"2.0","method":"SetClickthrough","params":[false]}
{"jsonrpc":"2.0","error":{"code":-32601,"message":"Method not found. The method does not exist / is not available.","data":"SetClickthrough"}}
{"jsonrpc":"2.0","method":"SetVisible","params":[false]}
{"jsonrpc":"2.0","error":{"code":-32601,"message":"Method not found. The method does not exist / is not available.","data":"SetVisible"}}
Proposed solution:
In handleRemoteRequest method, change else block into
else if (request.hasOwnProperty('id')) {
return _Promise.resolve({
"jsonrpc": "2.0",
"id": request.id,
"error": setError(ERRORS.METHOD_NOT_FOUND, {
message: request.method
})
});
}
else {
// Don't return method not found for notifications
console.warn("Received notification for non-existent method:", request.method);
return _Promise.resolve();
}
The text was updated successfully, but these errors were encountered:
According to JSON RPC 2.0 Section 4.1
Sample communication:
Proposed solution:
In
handleRemoteRequest
method, changeelse
block intoThe text was updated successfully, but these errors were encountered: