diff --git a/common/src/main/resources/i18n/displayStrings.properties b/common/src/main/resources/i18n/displayStrings.properties index 79c8626721..8d126c6766 100644 --- a/common/src/main/resources/i18n/displayStrings.properties +++ b/common/src/main/resources/i18n/displayStrings.properties @@ -1242,12 +1242,12 @@ popup.headline.warning=Warning popup.headline.error=Error popup.doNotShowAgain=Don't show again +popup.reportError.log=Open log file popup.reportError.gitHub=Report to Github issue tracker popup.reportError.forum=Report at Bisq forum -popup.reportError={0}\n\nTo help us to improve the software please report the bug at our issue tracker at Github or post it at the Bisq forum.\n\ -The error message will be copied to clipboard when you click the below buttons.\n\ -It will make debugging easier if you can attach the Bisq.log file which you can find in the application directory.\n\ -You can open the application directory at \"Account/Backup\". +popup.reportError={0}\n\nTo help us to improve the software please report the bug at our issue tracker at Github (https://github.com/bisq-network/exchange/issues).\n\ +The error message will be copied to the clipboard when you click the below buttons.\n\ +It will make debugging easier if you can attach the bisq.log file as well. popup.error.tryRestart=Please try to restart your application and check your network connection to see if you can resolve the issue. popup.error.createTx=Error at creating transaction: {0} diff --git a/core/src/main/java/io/bisq/core/app/BisqEnvironment.java b/core/src/main/java/io/bisq/core/app/BisqEnvironment.java index 21fe711c73..8fd04e8e42 100644 --- a/core/src/main/java/io/bisq/core/app/BisqEnvironment.java +++ b/core/src/main/java/io/bisq/core/app/BisqEnvironment.java @@ -79,6 +79,11 @@ public class BisqEnvironment extends StandardEnvironment { private static final String BISQ_HOME_DIR_PROPERTY_SOURCE_NAME = "bisqHomeDirProperties"; private static final String BISQ_CLASSPATH_PROPERTY_SOURCE_NAME = "bisqClasspathProperties"; + private static String staticAppDataDir; + public static String getStaticAppDataDir() { + return staticAppDataDir; + } + @SuppressWarnings("SameReturnValue") public static BaseCurrencyNetwork getDefaultBaseCurrencyNetwork() { return BaseCurrencyNetwork.BTC_MAINNET; @@ -203,6 +208,8 @@ public class BisqEnvironment extends StandardEnvironment { appDataDir = commandLineProperties.containsProperty(AppOptionKeys.APP_DATA_DIR_KEY) ? (String) commandLineProperties.getProperty(AppOptionKeys.APP_DATA_DIR_KEY) : appDataDir(userDataDir, appName); + staticAppDataDir = appDataDir; + ignoreDevMsg = commandLineProperties.containsProperty(AppOptionKeys.IGNORE_DEV_MSG_KEY) ? (String) commandLineProperties.getProperty(AppOptionKeys.IGNORE_DEV_MSG_KEY) : ""; diff --git a/core/src/main/java/io/bisq/core/payment/AccountAgeWitnessService.java b/core/src/main/java/io/bisq/core/payment/AccountAgeWitnessService.java index fd077f02c5..003eef27d5 100644 --- a/core/src/main/java/io/bisq/core/payment/AccountAgeWitnessService.java +++ b/core/src/main/java/io/bisq/core/payment/AccountAgeWitnessService.java @@ -45,7 +45,7 @@ import static com.google.common.base.Preconditions.checkNotNull; public class AccountAgeWitnessService { // TODO update release date - private static final Date RELEASE = Utilities.getUTCDate(2017, GregorianCalendar.NOVEMBER, 8); + private static final Date RELEASE = Utilities.getUTCDate(2017, GregorianCalendar.NOVEMBER, 11); private static final Date FIRST_PHASE = Utilities.getUTCDate(2017, GregorianCalendar.DECEMBER, 15); private static final Date SECOND_PHASE = Utilities.getUTCDate(2018, GregorianCalendar.JANUARY, 15); public static final Date FULL_ACTIVATION = Utilities.getUTCDate(2018, GregorianCalendar.FEBRUARY, 15); diff --git a/gui/src/main/java/io/bisq/gui/main/overlays/Overlay.java b/gui/src/main/java/io/bisq/gui/main/overlays/Overlay.java index 7104abe7db..6de5adf8c8 100644 --- a/gui/src/main/java/io/bisq/gui/main/overlays/Overlay.java +++ b/gui/src/main/java/io/bisq/gui/main/overlays/Overlay.java @@ -22,6 +22,7 @@ import io.bisq.common.Timer; import io.bisq.common.UserThread; import io.bisq.common.locale.Res; import io.bisq.common.util.Utilities; +import io.bisq.core.app.BisqEnvironment; import io.bisq.core.user.DontShowAgainLookup; import io.bisq.gui.app.BisqApp; import io.bisq.gui.components.BusyAnimation; @@ -56,6 +57,9 @@ import org.apache.commons.lang3.StringUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import java.io.File; +import java.io.IOException; +import java.nio.file.Paths; import java.util.Optional; import java.util.concurrent.TimeUnit; @@ -724,29 +728,33 @@ public abstract class Overlay { private void addReportErrorButtons() { messageLabel.setText(Res.get("popup.reportError", truncatedMessage)); + Button logButton = new Button(Res.get("popup.reportError.log")); + GridPane.setMargin(logButton, new Insets(20, 0, 0, 0)); + GridPane.setHalignment(logButton, HPos.RIGHT); + GridPane.setRowIndex(logButton, ++rowIndex); + GridPane.setColumnIndex(logButton, 1); + gridPane.getChildren().add(logButton); + logButton.setOnAction(event -> { + try { + File dataDir = new File(BisqEnvironment.getStaticAppDataDir()); + File logFile = new File(Paths.get(dataDir.getPath(), "bisq.log").toString()); + Utilities.openFile(logFile); + } catch (IOException e) { + e.printStackTrace(); + log.error(e.getMessage()); + } + }); + Button gitHubButton = new Button(Res.get("popup.reportError.gitHub")); - GridPane.setMargin(gitHubButton, new Insets(20, 0, 0, 0)); GridPane.setHalignment(gitHubButton, HPos.RIGHT); GridPane.setRowIndex(gitHubButton, ++rowIndex); GridPane.setColumnIndex(gitHubButton, 1); gridPane.getChildren().add(gitHubButton); - gitHubButton.setOnAction(event -> { if (message != null) Utilities.copyToClipboard(message); GUIUtil.openWebPage("https://github.com/bisq-network/exchange/issues"); - }); - - Button forumButton = new Button(Res.get("popup.reportError.forum")); - GridPane.setHalignment(forumButton, HPos.RIGHT); - GridPane.setRowIndex(forumButton, ++rowIndex); - GridPane.setColumnIndex(forumButton, 1); - gridPane.getChildren().add(forumButton); - - forumButton.setOnAction(event -> { - if (message != null) - Utilities.copyToClipboard(message); - GUIUtil.openWebPage("http://forum.bisq.network"); + hide(); }); }