error with http request: 99
what is it?
thx
Comments (14)
-
-
reporter seems something bad in network
-
reporter ok, maybe... but I have question about this snippet
--- qjsonrpchttpclient.cpp ---
void networkReplyFinished() { Q_D(QJsonRpcHttpReply); QNetworkReply *reply = qobject_cast<QNetworkReply*>(sender()); if (!reply) { qJsonRpcDebug() << Q_FUNC_INFO << "invalid reply"; return; } if (reply->error() != QNetworkReply::NoError) { // this should be handled by the networkReplyError slot } else { QByteArray data = reply->readAll(); QJsonDocument doc = QJsonDocument::fromJson(data); if (doc.isEmpty() || doc.isNull() || !doc.isObject()) { d->response = d->request.createErrorResponse(QJsonRpc::ParseError, "unable to process incoming JSON data", QString::fromUtf8(data)); } else { qJsonRpcDebug() << "received: " << doc.toJson(); QJsonRpcMessage response = QJsonRpcMessage::fromObject(doc.object()); Q_EMIT messageReceived(response); // <-------------------- here we emit event without test request.id == response.id if (d->request.type() == QJsonRpcMessage::Request && d->request.id() != response.id()) { d->response = d->request.createErrorResponse(QJsonRpc::InternalError, // <------------------ called if inside messageResponse() somebody change response.id, am i right? "invalid response id", //<---------------------- maybe me need do it before Q_EMIT ? QString::fromUtf8(data)); } else { d->response = response; } } } Q_EMIT finished(); }
-
@vinnitu as you can see here, if there is an error it defers it to the networkReplyError. That's where you are getting the error from.
Can you please try to give an explanation of what you are experiencing. If its indeed a bug I would be interested in helping fix it, but as far as I can tell right now this is a problem with QNetworkAccessManager (maybe the url you are specifying is malformed?). Post some code!
-
@vinnitu for instance, you can see here that the reply's errorString is also passed to the error that comes back, can you give me that information?
-
reporter can't because app doesn't work on remote pc, but works perfectly on my now I think about debug code to send tester
-
@vinnitu if the user is able to send you this message "error with http request: 99", then that is the "message" member of the error object. "code" will be "InternalError"(-32603), and then there is a final member called "data" will which contain the QNetworkReply error that will give you probably everything you need to debug the issue
-
reporter I use invokeRemoteMethodBlocking() and receive QJSonRpcMessage as result, what do you interesting to see in this case? message->toString() ?
-
QJsonRpcMessage response = client->invokeRemoteMethodBlocking(....); if (response.type() == QJsonRpcMessage::Error) { qDebug() << "received error:" << endl << "\tcode: " << response.errorCode() << endl << "\tmessage: " << response.errorMessage() << endl << "\tdata: " << response.errorData(); // OR qDebug() << response.toObject().value("error"); }
-
reporter code: -32603 message: "error with http request: 99" data: "Unknown error"
-
@vinnitu can you really not provide me with the code sample to recreate this problem? At this point I'm just going to show you to the locations in Qt's source code where this occurs, this is definitely not a qjsonrpc problem:
-
http://code.woboq.org/qt5/qtbase/src/network/access/qspdyprotocolhandler.cpp.html#712
-
http://code.woboq.org/qt5/qtbase/src/network/access/qspdyprotocolhandler.cpp.html#724
-
(maybe you're using mac? you never mentioned your platform) http://code.woboq.org/qt5/qtbase/src/network/access/qnetworkreplynsurlconnectionimpl.mm.html#239
-
http://code.woboq.org/qt5/qtbase/src/network/access/qnetworkaccessdebugpipebackend.cpp.html#246
-
http://code.woboq.org/qt5/qtbase/src/network/access/qhttpnetworkconnectionchannel.cpp.html#764
Most likely:
-
http://code.woboq.org/qt5/qtbase/src/network/access/qhttpprotocolhandler.cpp.html#365
-
http://code.woboq.org/qt5/qtbase/src/network/access/qhttpprotocolhandler.cpp.html#374
Until you give me more information, this is all I can do to help
-
-
reporter seems it was network trouble after admin hack (I don't known what - something like 'exception in transparent proxy for destination host') it works properly
BTW, thank You very much for your help
-
@vinnitu glad you solved it!
-
- changed status to resolved
- Log in to comment
@vinnitu well, you haven't given me much to go on here, but I'm guessing it's one of these, and specifically
QNetworkReply::UnknownNetworkError