mirror of
https://github.com/monero-project/monero-gui.git
synced 2024-12-23 12:09:57 +00:00
DaemonManager: check monerod binary, error details on start failure
This commit is contained in:
parent
6de8547047
commit
0629f06156
3 changed files with 11 additions and 5 deletions
4
main.qml
4
main.qml
|
@ -708,14 +708,14 @@ ApplicationWindow {
|
||||||
currentWallet.connected(true);
|
currentWallet.connected(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
function onDaemonStartFailure(){
|
function onDaemonStartFailure(error) {
|
||||||
console.log("daemon start failed");
|
console.log("daemon start failed");
|
||||||
hideProcessingSplash();
|
hideProcessingSplash();
|
||||||
// resume refresh
|
// resume refresh
|
||||||
currentWallet.startRefresh();
|
currentWallet.startRefresh();
|
||||||
daemonRunning = false;
|
daemonRunning = false;
|
||||||
informationPopup.title = qsTr("Daemon failed to start") + translationManager.emptyString;
|
informationPopup.title = qsTr("Daemon failed to start") + translationManager.emptyString;
|
||||||
informationPopup.text = qsTr("Please check your wallet and daemon log for errors. You can also try to start %1 manually.").arg((isWindows)? "monerod.exe" : "monerod")
|
informationPopup.text = error + ".\n\n" + qsTr("Please check your wallet and daemon log for errors. You can also try to start %1 manually.").arg((isWindows)? "monerod.exe" : "monerod")
|
||||||
informationPopup.icon = StandardIcon.Critical
|
informationPopup.icon = StandardIcon.Critical
|
||||||
informationPopup.onCloseCallback = null
|
informationPopup.onCloseCallback = null
|
||||||
informationPopup.open();
|
informationPopup.open();
|
||||||
|
|
|
@ -63,6 +63,12 @@ DaemonManager *DaemonManager::instance(const QStringList *args)
|
||||||
|
|
||||||
bool DaemonManager::start(const QString &flags, NetworkType::Type nettype, const QString &dataDir, const QString &bootstrapNodeAddress, bool noSync /* = false*/)
|
bool DaemonManager::start(const QString &flags, NetworkType::Type nettype, const QString &dataDir, const QString &bootstrapNodeAddress, bool noSync /* = false*/)
|
||||||
{
|
{
|
||||||
|
if (!QFileInfo(m_monerod).isFile())
|
||||||
|
{
|
||||||
|
emit daemonStartFailure("\"" + QDir::toNativeSeparators(m_monerod) + "\" " + tr("executable is missing"));
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
// prepare command line arguments and pass to monerod
|
// prepare command line arguments and pass to monerod
|
||||||
QStringList arguments;
|
QStringList arguments;
|
||||||
|
|
||||||
|
@ -130,7 +136,7 @@ bool DaemonManager::start(const QString &flags, NetworkType::Type nettype, const
|
||||||
|
|
||||||
if (!started) {
|
if (!started) {
|
||||||
qDebug() << "Daemon start error: " + m_daemon->errorString();
|
qDebug() << "Daemon start error: " + m_daemon->errorString();
|
||||||
emit daemonStartFailure();
|
emit daemonStartFailure(m_daemon->errorString());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -140,7 +146,7 @@ bool DaemonManager::start(const QString &flags, NetworkType::Type nettype, const
|
||||||
emit daemonStarted();
|
emit daemonStarted();
|
||||||
m_noSync = noSync;
|
m_noSync = noSync;
|
||||||
} else {
|
} else {
|
||||||
emit daemonStartFailure();
|
emit daemonStartFailure(tr("Timed out, local node is not responding after %1 seconds").arg(DAEMON_START_TIMEOUT_SECONDS));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -64,7 +64,7 @@ private:
|
||||||
signals:
|
signals:
|
||||||
void daemonStarted() const;
|
void daemonStarted() const;
|
||||||
void daemonStopped() const;
|
void daemonStopped() const;
|
||||||
void daemonStartFailure() const;
|
void daemonStartFailure(const QString &error) const;
|
||||||
void daemonConsoleUpdated(QString message) const;
|
void daemonConsoleUpdated(QString message) const;
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
|
|
Loading…
Reference in a new issue