Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

App window is not shown in dev mode on Windows #48

Closed
ikke09 opened this issue May 3, 2020 · 4 comments
Closed

App window is not shown in dev mode on Windows #48

ikke09 opened this issue May 3, 2020 · 4 comments

Comments

@ikke09
Copy link

ikke09 commented May 3, 2020

Hey Guys,

I am using the breaktimer-app for some days now. So I also wanted to try contribute to this cool open-source project. But unfortunately I am having some trouble setting it up on my mashine.

What I did:

  1. Forked the repo
  2. Cloned the repo locally
  3. yarn install
  4. yarn dev

What happens:
I am getting no errors in the console. The build works fine. Electron gets also startet, I can see a process in my process monitor. But the app window does not open. I also can not force it into the front.

grafik

I am developing on a Windows 10 mashine.

Hopefully someone can help me with this issue. Looking forward to support the project 😁

@tom-james-watson
Copy link
Owner

Firstly - thanks for getting involved - that's great!

I've actually never developed on Windows. I've only used linux or macOS. I only test the built pacakges themselves on Windows.

The first time you run the app the settings should automatically appear, but after that it simply starts minimized into the system tray. Are you sure it's not in the tray?

It would be great if Windows development worked too, and if someone can get it working then that would be great, but I don't want to commit the time to looking into that myself as it is something I will not use.

I recommend developing on linux or macOS.

@ikke09
Copy link
Author

ikke09 commented May 4, 2020

Hey @tom-james-watson,
thanks for your response. I took some time trying to figure out why it does not show the app window....

So here are my insights after today:

  1. Running electron.exe "<path-to-repo>/app/main/main.dev.babel.js" leads to the following error:
    grafik
    -> I could find this error in an issue at electron, described here
    -> Trying to install esm and run it seemd better. I was able to get rid of the first error but got a bunch of errors complaining about 'unexpeced tokens'. So it seems like the Types can not be loaded.
    => Unfortunately I have way to less experience with such compiler things to tackle that error.

  2. Trying to run the app with the production build failed at first also with the following error:
    grafik
    -> Electron could not find the tray-icon in its resources.
    -> I was able to solve that error by simply coping the resources dir from the main directory to ./node_modules/electron/dist/resources/app/resources/

So for me the production build works, only the dev builds shows no app window nor tray-icon. As simple workaround I changed the "dev" script in packages.json to yarn build && yarn start.
That is of course not ideal for developing and much slower but I would be able to make changes and also test them.

Hopefully someone has more experience in such things than me and could help me out with that issue. For now I will leave it for me there and try to help out with my simple workaround.

Sorry for the long post 😅 Looking forward to contribute to this project ✌

@tom-james-watson tom-james-watson changed the title App window is not shown in dev mode App window is not shown in dev mode on Windows May 5, 2020
@tom-james-watson
Copy link
Owner

OK - it looks like something with the webpack dev build is not configured properly for Windows.

yarn build && yarn start should work but it may be a bit tedious for development.

If you get any further let me know 🙂

@tom-james-watson
Copy link
Owner

Also - just my opinion - but if you're getting into programming, especially web stuff, I really recommend just setting up dual boot linux on your machine and doing it there.

@ikke09 ikke09 closed this as completed Jun 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants