adopted-ember-addons / ember-electron

:zap: Build, test, compile and package desktop apps with Ember and Electron
https://ember-electron.js.org/
Other
805 stars 111 forks source link

New Project Doesn't Work At all #370

Closed josiahbryan closed 5 years ago

josiahbryan commented 6 years ago
$ ember new fakeproject
$ ember install ember-electron
$ ember electron

Results in a window with nothing rendered: image

Using ember-cli 3.3.0.

(Note: I added a console.out to main.js just to make sure it was loading, hence the extra line on the console)

jacobq commented 6 years ago

I wonder if this is due to #362, which was my goof. It's fixed in master -- just waiting on @felixrieseberg to release a new version. Could you please try with the latest master branch?

On Thu, Oct 11, 2018, 4:20 PM Josiah Bryan notifications@github.com wrote:

$ ember new fakeproject $ ember install ember-electron $ ember electron

Results in a window with nothing rendered: [image: image] https://user-images.githubusercontent.com/4821548/46834573-c2ef4e00-cd79-11e8-8612-05d1a3f57af0.png

Using ember-cli 3.3.0.

(Note: I added a console.out to main.js just to make sure it was loading, hence the extra line on the console)

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/felixrieseberg/ember-electron/issues/370, or mute the thread https://github.com/notifications/unsubscribe-auth/ABjss9HHDB0gL-L9Vc2wUiC4n3JsQSwIks5uj7YLgaJpZM4XYY2l .

jacobq commented 6 years ago

Would you mind specifying more information about your platform? I have Linux and Windows machines at my disposal but unfortunately not a Mac right now. If you are using Electron v3 (which might happen automatically as it is now the latest) you could be seeing the problem fixed in #368. So if you don't want to try ember install ember-electron@latest you could also try changing electron-prebuilt-compile to 2.0.8 (instead of the latest 3.x).

josiahbryan commented 6 years ago

Sure! 👍👍 How do I try with master? Specific install command...?

On Thu, Oct 11, 2018, 7:06 PM Jacob notifications@github.com wrote:

I wonder if this is due to #362, which was my goof. It's fixed in master -- just waiting on @felixrieseberg to release a new version. Could you please try with the latest master branch?

On Thu, Oct 11, 2018, 4:20 PM Josiah Bryan notifications@github.com wrote:

$ ember new fakeproject $ ember install ember-electron $ ember electron

Results in a window with nothing rendered: [image: image] < https://user-images.githubusercontent.com/4821548/46834573-c2ef4e00-cd79-11e8-8612-05d1a3f57af0.png

Using ember-cli 3.3.0.

(Note: I added a console.out to main.js just to make sure it was loading, hence the extra line on the console)

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/felixrieseberg/ember-electron/issues/370, or mute the thread < https://github.com/notifications/unsubscribe-auth/ABjss9HHDB0gL-L9Vc2wUiC4n3JsQSwIks5uj7YLgaJpZM4XYY2l

.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/felixrieseberg/ember-electron/issues/370#issuecomment-429151034, or mute the thread https://github.com/notifications/unsubscribe-auth/AEmSLHP_zxe1QS4UYs119XkeD1r9q88Lks5uj87xgaJpZM4XYY2l .

bendemboski commented 6 years ago

FWIW, I just created a new ember app on my mac, installed ember-electron and ran ember electron and it started up and showed me the welcome page as expected.

I'm using ember-cli@3.4.3 and node@8.10.0.

josiahbryan commented 6 years ago

Hmmm...will try updating ember cli...using 3.3.0ish...will try tonight and report back

On Thu, Oct 11, 2018, 8:11 PM Ben Demboski notifications@github.com wrote:

FWIW, I just created a new ember app, installed ember-electron and ran ember electron and it started up and showed me the welcome page as expected.

I'm using ember-cli@3.4.3 and node@v8.10.0.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/felixrieseberg/ember-electron/issues/370#issuecomment-429162293, or mute the thread https://github.com/notifications/unsubscribe-auth/AEmSLOrR_7xz60t5Sjar8bzM60RRCvWrks5uj94hgaJpZM4XYY2l .

josiahbryan commented 6 years ago

Still no love, using ember-cli: 3.4.3 and node: 8.11.3, running on CentOS Linux release 7.2.1511 (Core) - EXACT same problem.

Complete, unabridged logs to recreate below. It is as simple as:

[josiah@JosiahsLaptop ember]$ ember new cloudcon
WARNING: 
WARNING: The 'package.json' file for the addon at /home/josiah/.nvm/versions/node/v8.11.3/lib/node_modules/ember-cli/node_modules/sane
WARNING:   specifies a missing dependency 'fsevents'
udcinstalling app
  create .editorconfig
  create .ember-cli
  create .eslintignore
  create .eslintrc.js
  create .template-lintrc.js
  create .travis.yml
  create .watchmanconfig
  create README.md
  create app/app.js
  create app/components/.gitkeep
  create app/controllers/.gitkeep
  create app/helpers/.gitkeep
  create app/index.html
  create app/models/.gitkeep
  create app/resolver.js
  create app/router.js
  create app/routes/.gitkeep
  create app/styles/app.css
  create app/templates/application.hbs
  create app/templates/components/.gitkeep
  create config/environment.js
  create config/optional-features.json
  create config/targets.js
  create ember-cli-build.js
  create .gitignore
  create package.json
  create public/robots.txt
  create testem.js
  create tests/helpers/.gitkeep
  create tests/index.html
  create tests/integration/.gitkeep
  create tests/test-helper.js
  create tests/unit/.gitkeep
  create vendor/.gitkeep
onWARNING: Ember CLI is using the global npm, but your npm version has not yet been verified to work with the current Ember CLI release.
⠹ npm: Installing dependencies ...
npm: Installed dependencies
Successfully initialized git.
[josiah@JosiahsLaptop ember]$ cd cloudcon
[josiah@JosiahsLaptop cloudcon]$ ember install ember-electron
WARNING: 
WARNING: The 'package.json' file for the addon at /opt/ncs.jbiconsult.com/ember/cloudcon/node_modules/sane
WARNING:   specifies a missing dependency 'fsevents'
WARNING: Ember CLI is using the global npm, but your npm version has not yet been verified to work with the current Ember CLI release.
npm: Installed ember-electron
installing ember-electron
  create ember-electron/.compilerc
  create ember-electron/main.js
  create ember-electron/test-main.js
  create testem-electron.js
Project needs forge config
WARNING: Ember CLI is using the global npm, but your npm version has not yet been verified to work with the current Ember CLI release.
npm: Installed devtron@^1.4.0
WARNING: Ember CLI is using the global npm, but your npm version has not yet been verified to work with the current Ember CLI release.
npm: Installed electron-protocol-serve@^1.3.0
Installed electron build tools
Created ember-electron resource dirs
Extracted ember-electron forge config
Installed addon package.
[josiah@JosiahsLaptop cloudcon]$ ember electron
WARNING: 
WARNING: The 'package.json' file for the addon at /opt/ncs.jbiconsult.com/ember/cloudcon/node_modules/electron-installer-dmg
WARNING:   specifies a missing dependency 'appdmg'
WARNING: 
WARNING: The 'package.json' file for the addon at /opt/ncs.jbiconsult.com/ember/cloudcon/node_modules/sane
WARNING:   specifies a missing dependency 'fsevents'
Could not start watchman
Visit https://ember-cli.com/user-guide/#watchman for more info.

"ember-welcome-page" was detected in your devDependencies!
Please note that this addon only works in development environment
and will not render in production mode. It is safe to uninstall
this addon once you removed the {{welcome-page}} template tag.

Build successful (8888ms)

Slowest Nodes (totalTime => 5% )              | Total (avg)         
----------------------------------------------+---------------------
Babel: ember-data (2)                         | 2369ms (1184 ms)    
Babel: ember-test-helpers (2)                 | 2263ms (1131 ms)    
Rollup (1)                                    | 997ms               
Package /assets/vendor.js (1)                 | 684ms               
Babel: cloudcon (2)                           | 489ms (244 ms)      
broccoli-persistent-filter:EslintValid... (2) | 462ms (231 ms)      

Starting Electron...
/opt/ncs.jbiconsult.com/ember/cloudcon/node_modules/electron-prebuilt-compile/node_modules/electron/dist/electron: /lib64/libdbus-1.so.3: no version information available (required by /opt/ncs.jbiconsult.com/ember/cloudcon/node_modules/electron-prebuilt-compile/node_modules/electron/dist/electron)
/opt/ncs.jbiconsult.com/ember/cloudcon/node_modules/electron-prebuilt-compile/node_modules/electron/dist/electron: /lib64/libdbus-1.so.3: no version information available (required by /opt/ncs.jbiconsult.com/ember/cloudcon/node_modules/electron-prebuilt-compile/node_modules/electron/dist/electron)
(electron) The 'lstatSyncNoException' function has been deprecated and marked for removal.
(electron) The 'lstatSyncNoException' function has been deprecated and marked for removal.
(electron) The 'lstatSyncNoException' function has been deprecated and marked for removal.
Electron exited.
[josiah@JosiahsLaptop cloudcon]$ lsb_release -a
LSB Version:    :core-4.1-amd64:core-4.1-noarch:cxx-4.1-amd64:cxx-4.1-noarch:desktop-4.1-amd64:desktop-4.1-noarch:languages-4.1-amd64:languages-4.1-noarch:printing-4.1-amd64:printing-4.1-noarch
Distributor ID: CentOS
Description:    CentOS Linux release 7.2.1511 (Core) 
Release:        7.2.1511
Codename:       Core
[josiah@JosiahsLaptop cloudcon]$  ember -v
WARNING: 
WARNING: The 'package.json' file for the addon at /opt/ncs.jbiconsult.com/ember/cloudcon/node_modules/electron-installer-dmg
WARNING:   specifies a missing dependency 'appdmg'
WARNING: 
WARNING: The 'package.json' file for the addon at /opt/ncs.jbiconsult.com/ember/cloudcon/node_modules/sane
WARNING:   specifies a missing dependency 'fsevents'
ember-cli: 3.4.3
node: 8.11.3
os: linux x64
josiahbryan commented 6 years ago

Update:

Running ember install ember-electron@latest didn't work - same result

BUT

Editing package.json and doing this: "electron-prebuilt-compile": "2.0.8", then npm install (of course) - that FIXED it!!

Happy to try other things if suggested, but for now I'll start actually developing the code I need to now...let me know what else I should try if anyone wants me to try anything else. Thanks guys!

bendemboski commented 6 years ago

So the app launches, but the window is blank? Try installing electron-debug so you can open the dev tools and see if there are errors in the browser console? Or try running ember electron:test and see if any errors are logged?

On Thu, Oct 11, 2018, 6:53 PM Josiah Bryan notifications@github.com wrote:

Update:

Running ember install ember-electron@latest didn't work - same result

BUT

Editing package.json and doing this: "electron-prebuilt-compile": "2.0.8",

  • that FIXED it!!

Happy to try other things if suggested, but for now I'll start actually developing the code I need to now...let me know what else I should try if anyone wants me to try anything else. Thanks guys!

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/felixrieseberg/ember-electron/issues/370#issuecomment-429177628, or mute the thread https://github.com/notifications/unsubscribe-auth/AAiHmcnJGtrXd1o-f-ao3KFL_FIGKn7Fks5uj_YHgaJpZM4XYY2l .

josiahbryan commented 6 years ago

Windows is blank as in NOT rendered AT ALL - see original screenshot. Moving the window seems to "grab" the content behind it and drag it around like a frozen Windows 3.1 Internet dialog lol

The app works if I run with electron-prebuilt-compile 2.0.8, but @latest fails ... are you saying I should install -debug or electron:test with @latest?

jacobq commented 6 years ago

@josiahbryan Thanks for posting more details. I only have a few minutes right now (perhaps can write more tomorrow, if needed) but here're a couple things worth mentioning:

bendemboski commented 6 years ago

You might also try creating a raw electron project (without Ember) to see if it works...

jacobq commented 6 years ago

Another thing to try, especially for the "blank window" symptom, is disabling GPU acceleration. There have been a number of reported problems over the past couples years related to chromium/electron not always playing nicely with graphics drivers. e.g. https://github.com/electron/electron/issues/4380 https://github.com/electron/electron/issues/10863 and https://github.com/electron/electron/issues/13622#issuecomment-404850344

Ben's suggestion of running electron by itself on that machine is a good one. (Check out https://github.com/electron/electron-quick-start if you haven't already.) That should help you determine if the problem is caused by something outside of ember-electron. If the quick start also shows the same problem you can try passing it the --disable-gpu command line argument, finding/creating an issue in the electron repo, trying different versions, etc. until you figure out what's going on. Once you know electron runs then resume troubleshooting with ember-electron. (There might even be a new release out then :bowtie: )

josiahbryan commented 6 years ago

Oh I should have told you guys - yeah, a plain electron project works totally fine - following electron's quickstart guide started up an app with no problem whatsoever. I tried that even before I learned about ember-electron.

So, long and short, electron already verified to work haha! So yeah, still just a problem with ember-electron ...

I'll try upgrading to @latest again and try --disable-gpu and let you know.....

jacobq commented 6 years ago

Note: latest ember-electron is an npm tag that refers to latest release, which does not have a fix needed for electron v3.x. (master, on the other hand, is a git branch that has the latest (usually unreleased) code).

If you're feeling extra adventurous you could try my (not yet merged) PR #358 (commit 9f9ff75cc65757b8371819046d8f92561345fc29).

josiahbryan commented 6 years ago

ohhhhh okay...didn't know that...okay, how do I install master then...?

jacobq commented 6 years ago

To be certain, check the ember-cli docs, but I believe ember install ... uses similar syntax to npm install ..., including support for manually specifying a remote git repository, (e.g. npm install <githubname>/<githubrepo>[#<commit-ish>]). I think I posted an example that should work above.

josiahbryan commented 6 years ago

Gahh missed that post you linked ... read too fast. ...my bad. Will process shortly

jacobq commented 6 years ago

@josiahbryan Were you able to try building with the latest (master branch and/or the PR I mentioned)? Did it resolve the problem you were encountering?

josiahbryan commented 6 years ago

@jacobq - Humble apologies, crazy weekend, didn't get time to do that. Just settled in at Starbucks for afternoon work...will test posthaste.

josiahbryan commented 6 years ago

@jacobq - I tried both of these: ember install ember-electron@felixrieseberg/ember-electron#9f9ff75cc65757b8371819046d8f92561345fc29 and ember install ember-electron@felixrieseberg/ember-electron#master

Running ember electron after each produced the same problem - so basically, no, problem wasn't resolved with either master branch or the PR, sorry.

josiahbryan commented 6 years ago

@jacobq - After testing, I wanted to continue other development, so I did ember install ember-electron@2.9.0 - but the project still didn't work.

It's only when I edit package.json and change the ver of electron-prebuilt-compile from 3.x to 2.0.8 (and re-run npm install) that it actually works.

jacobq commented 6 years ago

@josiahbryan Hmm, that's not what I expected. I guess I'll have to try to reproduce it for myself later when I have some time to mess around with it again. (BTW, 2.9.0 is same as latest release tag on npm so should have identical results to not specifying any version)

josiahbryan commented 6 years ago

Got you, no problem! Well, I have a configuration that seems to work for me for now. I'll use the older version of electron until something changes. please do feel free to let me know if you would like me to try anything else, more than happy to help reproduce!

On Mon, Oct 15, 2018, 7:21 PM Jacob notifications@github.com wrote:

@josiahbryan https://github.com/josiahbryan Hmm, that's not what I expected. I guess I'll have to try to reproduce it for myself later when I have some time to mess around with it again. (BTW, 2.9.0 is same as latest release tag on npm so should have identical results to not specifying any version)

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/felixrieseberg/ember-electron/issues/370#issuecomment-430047436, or mute the thread https://github.com/notifications/unsubscribe-auth/AEmSLFUS0pHjwvb-GwcnF5fyPwZ7tYRWks5ulRh5gaJpZM4XYY2l .

bendemboski commented 5 years ago

Closing due to inactivity