Giter Club home page Giter Club logo

Comments (11)

nop33 avatar nop33 commented on August 13, 2024

Hi @diomark, thanks for the feedback. Which version of Windows are you using?

When you say that the wallet was running in the background, do you mean that there was a window open and hidden behind other windows? Or that all windows of the application were closed and the process was still running in the background?

Was this the screen you saw when you opened the application the second time, after already creating a wallet?

image

Thanks a lot for the valuable feedback!

from desktop-wallet.

polarker avatar polarker commented on August 13, 2024

@nop33 @mvaivre is this related to our latest fix PR? If so, we need to assign a bounty for this issue report

from desktop-wallet.

nop33 avatar nop33 commented on August 13, 2024

I haven't been able to reproduce this on my macbook, waiting for input from @diomark. I can check with @Arbaba who is using Windows, when I see him on Friday.

from desktop-wallet.

diomark avatar diomark commented on August 13, 2024

Windows 10 [Version 10.0.19043.1348]

The existing wallet window was just hiding behind other windows (i.e. functioning correctly/not crashed)

This is pretty easy to replicate -

Start alephium wallet, login

Start alephium wallet again (from start menu. It will give the options of new wallet or importing wallet (vs just focusing on the already opened wallet)

from desktop-wallet.

diomark avatar diomark commented on August 13, 2024

btw - yes - that's the screen that shows up when launching a second time. (option for new wallet or importing)

from desktop-wallet.

nop33 avatar nop33 commented on August 13, 2024

I managed to reproduce the issue. I still haven't found a solution. Some notes during my debugging:

  • We create new windows only when 2 events get triggered: ready and activate.
  • Even when commenting out the callback of the activate event completely, when clicking the installed Windows Alephium app it still opens a second window. The only place where createWindow is now called is in the ready event callback. Updating the callback to the following snippet does not solve the problem (second window opens again):
    app.on('ready', () => {
      if (mainWindow === null) createWindow()
    })
  • I tried this, also no success:
    app.on('ready', () => {
      if (BrowserWindow.getAllWindows().length === 0) createWindow()
    })
  • I tried updating the snippet to the following, again, without success:
    app.whenReady().then(() => {
      if (mainWindow === null) createWindow()
    })
  • It would seem that every time the installed exe is launched on Windows (located at C:\Users\<my-user-name>\AppData\Local\Programs\alephium-wallet\Alephium.exe), the mainWindow variable is set to null.

Need to keep debugging...

from desktop-wallet.

polarker avatar polarker commented on August 13, 2024

I managed to reproduce the issue. I still haven't found a solution. Some notes during my debugging:

  • We create new windows only when 2 events get triggered: ready and activate.
  • Even when commenting out the callback of the activate event completely, when clicking the installed Windows Alephium app it still opens a second window. The only place where createWindow is now called is in the ready event callback. Updating the callback to the following snippet does not solve the problem (second window opens again):
    app.on('ready', () => {
      if (mainWindow === null) createWindow()
    })
  • I tried this, also no success:
    app.on('ready', () => {
      if (BrowserWindow.getAllWindows().length === 0) createWindow()
    })
  • I tried updating the snippet to the following, again, without success:
    app.whenReady().then(() => {
      if (mainWindow === null) createWindow()
    })
  • It would seem that every time the installed exe is launched on Windows (located at C:\Users\<my-user-name>\AppData\Local\Programs\alephium-wallet\Alephium.exe), the mainWindow variable is set to null.

Need to keep debugging...

Is this the same for Macos ?

from desktop-wallet.

nop33 avatar nop33 commented on August 13, 2024

Is this the same for Macos ?

No. Everything works fine there.

from desktop-wallet.

nop33 avatar nop33 commented on August 13, 2024

It turns out that this is not a bug. This is the expected behavior on Windows. Here is an example with another popular electron app (Visual Studio Code). As you can see in the demo, double-clicking the executable opens a new window, exactly as it happens with our wallet.

Kapture.2021-12-21.at.15.36.24.mp4

from desktop-wallet.

nop33 avatar nop33 commented on August 13, 2024

However, if an account has already been created, the second window should display the Login page, not the new wallet creation/import page.

from desktop-wallet.

nop33 avatar nop33 commented on August 13, 2024

For the record, here's a demo of the problem:

Kapture.2021-12-21.at.15.48.54.mp4

from desktop-wallet.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.