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

Errors when running 0.3.0 #51

Closed
michaelb-01 opened this issue Jan 10, 2017 · 11 comments
Closed

Errors when running 0.3.0 #51

michaelb-01 opened this issue Jan 10, 2017 · 11 comments

Comments

@michaelb-01
Copy link

I've just tried running 0.3.0 and I get various errors. I haven't successfully got meteor-desktop working yet so i'm not sure what ive done wrong..

So, as per the instructions on the github readme I ran the following in one tab

meteor --mobile-server=127.0.0.1:3000
Then in a second tab I ran:

npm run desktop -- --scaffold

The first warning i get is:

!expecting a meteor project running on port 3000!

Another warning:

warn: [main] will use desktop.asar from initial version because last downloaded version is using it: /Users/michaelbattcock/Documents/dev/apps/pipe/.meteor/desktop-build/desktop.asar

Then I get some errors:

error: [main] autoUpdater reported an error: Error: Could not get code signature for running application
    at Error (native)
    at Function.setUpAutoUpdater (/Users/michaelbattcock/Documents/dev/apps/pipe/.meteor/desktop-build/app/squirrel.js:158:25)
    at App.onReady (/Users/michaelbattcock/Documents/dev/apps/pipe/.meteor/desktop-build/app/app.js:385:18)
    at emitTwo (events.js:111:20)
    at App.emit (events.js:191:7)
error: [main]  Error: ENOTDIR: not a directory, open '/Users/michaelbattcock/Documents/dev/apps/pipe/.meteor/desktop-build/meteor.asar/app/desktop.asar'
    at Error (native)
    at Object.fs.openSync (original-fs.js:640:18)
    at Object.fs.readFileSync (original-fs.js:508:33)
    at assetBundle.getOwnAssets.some (/Users/michaelbattcock/Documents/dev/apps/pipe/.meteor/desktop-build/app/modules/autoupdate/assetBundleManager.js:414:53)
    at Array.some (native)
    at AssetBundleManager.handleDesktopBundle (/Users/michaelbattcock/Documents/dev/apps/pipe/.meteor/desktop-build/app/modules/autoupdate/assetBundleManager.js:410:44)
    at AssetBundleManager.didFinishDownloadingAssetBundle (/Users/michaelbattcock/Documents/dev/apps/pipe/.meteor/desktop-build/app/modules/autoupdate/assetBundleManager.js:381:14)
    at getDesktopVersion.e (/Users/michaelbattcock/Documents/dev/apps/pipe/.meteor/desktop-build/app/modules/autoupdate/assetBundleManager.js:200:26)
    at Request.httpClient.e [as _callback] (/Users/michaelbattcock/Documents/dev/apps/pipe/.meteor/desktop-build/app/modules/autoupdate/assetBundleManager.js:131:17)
    at Request.self.callback (/Users/michaelbattcock/Documents/dev/apps/pipe/.meteor/desktop-build/node_modules/request/request.js:186:22)
2017-01-10 21:45:45.357 Electron Helper[15931:1046717] Couldn't set selectedTextBackgroundColor from default ()

And when electron opens I get the following error:

The selector "app" did not match any elements

Even though it is declared and it works fine when I run the app normally in localhost.
Any ideas what i've done wrong?

@wojtkowiak
Copy link
Owner

!expecting a meteor project running on port 3000!

That is just a reminder. Actually yeah, with those exclamation marks it looks like a warning or sth - will change it.

warn: [main] will use desktop.asar from initial version because last downloaded version is using it: /Users/michaelbattcock/Documents/dev/apps/pipe/.meteor/desktop-build/desktop.asar

This should a be a info not warn - will be fixed.

[main] autoUpdater reported an error: Error: Could not get code signature for running application

electron/electron#7476 - unsigned apps (development app is unsigned) can not be auto updated. I will think of disabling this in development build on Mac. In the meantime you can use "autoUpdateCheckOnStart": false to get rid of this error.

error: [main] Error: ENOTDIR: not a directory, open '/Users/michaelbattcock/Documents/dev/apps/pipe/.meteor/desktop-build/meteor.asar/app/desktop.asar'

Please post full log from the app start to this error's occurrence.

The selector "app" did not match any elements

Was this working before in 0.2.6? Do you see any errors in the console? In the Network tab of devtools are there any files that failed to load?

@michaelb-01
Copy link
Author

I've never actually got meteor desktop working, I was getting different errors in 0.2.6 so I was waiting for 0.3.0.

Here's my full console output:

`> meteor-desktop "--scaffold"

METEOR-DESKTOP v0.3.0

!expecting a meteor project running on port 3000!

INFO index: initializing
INFO electronApp: scaffolding
VERBOSE desktop: checking .desktop existence
VERBOSE meteorApp: updating .meteor/.gitignore
VERBOSE meteorApp: desktopHCP is enabled, checking for required packages
VERBOSE electronAppScaffold: clearing desktop-build
VERBOSE electronAppScaffold: creating /Users/michaelbattcock/Documents/dev/apps/pipe/.meteor/desktop-build/app
VERBOSE electronAppScaffold: copying skeleton app
VERBOSE electronAppScaffold: writing package.json
VERBOSE electronApp: updating package.json fields
DEBUG electronApp: writing updated package.json
INFO electronApp: updating list of package.json's dependencies
DEBUG electronApp: merging settings.json[dependencies]
DEBUG electronApp: merging settings.json[plugins]
DEBUG electronApp: merging dependencies from modules
DEBUG electronApp: writing updated package.json
VERBOSE electronApp: calculating compatibility version
DEBUG electronApp: meteor-desktop compatibility version is 0.3
DEBUG electronApp: .desktop compatibility version is 0
INFO electronApp: installing dependencies
DEBUG electronApp: running npm prune to wipe unneeded dependencies
VERBOSE electronApp: executing npm prune
VERBOSE electronApp: executing npm install
WARN electronApp: native modules rebuild is turned off, be sure to turn it on if you added any native node modules
VERBOSE electronApp: copying .desktop to temporary location
DEBUG electronApp: updating settings.json fields
INFO desktop: calculating hash version from .desktop contents
INFO electronApp: excluding files from packing
INFO electronApp: transpiling and uglifying
INFO electronApp: packing .desktop to asar
VERBOSE electronApp: clearing temporary .desktop
INFO meteorApp: checking for any mobile platform
INFO meteorApp: building meteor app
DEBUG meteorApp: clearing build dir
INFO meteorApp: acquiring index.html
INFO meteorApp: successfully downloaded index.html from running meteor app
VERBOSE meteorApp: copying mobile build
INFO meteorApp: acquiring manifest.json
INFO meteorApp: successfully downloaded manifest.json from running meteor app
INFO meteorApp: mobile build copied to electron app
DEBUG meteorApp: copy cordova.js to meteor build
INFO meteorApp: injecting isDesktop
INFO meteorApp: injected successfully
INFO meteorApp: packing meteor app to asar archive
VERBOSE meteorApp: clearing meteor app after packing
INFO meteorApp: meteor build finished
INFO electronApp: running
info: [main] app data dir is: /Users/michaelbattcock/Library/Application Support/MyMeteorApp
info: [main] initial desktop version is 959df317df051905860c0990f1a4fb8019ee453d
warn: [main] will use desktop.asar from initial version because last downloaded version is using it: /Users/michaelbattcock/Documents/dev/apps/pipe/.meteor/desktop-build/desktop.asar
debug: [main] skeleton version 0.3.0
info: [main] ready fired
info: [main] seting autoupdate feed to url: http://127.0.0.1/update/darwin_x64/0.0.1
error: [main] autoUpdater reported an error: Error: Could not get code signature for running application
at Error (native)
at Function.setUpAutoUpdater (/Users/michaelbattcock/Documents/dev/apps/pipe/.meteor/desktop-build/app/squirrel.js:158:25)
at App.onReady (/Users/michaelbattcock/Documents/dev/apps/pipe/.meteor/desktop-build/app/app.js:385:18)
at emitTwo (events.js:111:20)
at App.emit (events.js:191:7)
debug: [main] loading plugin: meteor-desktop-splash-screen
debug: [main] loading plugin: meteor-desktop-localstorage
info: [meteor-desktop-splash-screen] [html] preparing splash screen.
info: [meteor-desktop-splash-screen] [html] splash screen prepared.
info: [meteor-desktop-splash-screen] [splashWindow] displaying splash screen from file:///Users/michaelbattcock/Documents/dev/apps/pipe/.meteor/desktop-build/splash.html
debug: [main] loading internal module: autoupdate
debug: [main] loading internal module: dummy
debug: [main] loading internal module: localServer
debug: [main] loading module: example => example
verbose: [autoupdate] initializing autoupdate module
verbose: [autoupdate] trying to read initial bundle version
verbose: [autoupdate] [AssetBundle] making bundle object for /Users/michaelbattcock/Documents/dev/apps/pipe/.meteor/desktop-build/meteor.asar
verbose: [autoupdate] [AssetBundle] loading manifest from /Users/michaelbattcock/Documents/dev/apps/pipe/.meteor/desktop-build/meteor.asar
debug: [autoupdate] [AssetManifest] 263 entries. (Version: 75daca45c80cf2488e7a2246eab1fdaaec008a19)
verbose: [autoupdate] [AssetBundle] trying to read desktop version for 75daca45c80cf2488e7a2246eab1fdaaec008a19
verbose: [autoupdate] [AssetBundle] the desktop version is 959df317df051905860c0990f1a4fb8019ee453d
verbose: [autoupdate] [AssetBundle] making bundle object for /Users/michaelbattcock/Library/Application Support/MyMeteorApp/versions/6a86eab4e8f527b3c56510ba9f3597e61a0030ee
verbose: [autoupdate] [AssetBundle] loading manifest from /Users/michaelbattcock/Library/Application Support/MyMeteorApp/versions/6a86eab4e8f527b3c56510ba9f3597e61a0030ee
debug: [autoupdate] [AssetManifest] 263 entries. (Version: 6a86eab4e8f527b3c56510ba9f3597e61a0030ee)
verbose: [autoupdate] [AssetBundle] trying to read desktop version for 6a86eab4e8f527b3c56510ba9f3597e61a0030ee
verbose: [autoupdate] [AssetBundle] the desktop version is 959df317df051905860c0990f1a4fb8019ee453d
info: [autoupdate] [AssetBundleManager] got version: 6a86eab4e8f527b3c56510ba9f3597e61a0030ee in 6a86eab4e8f527b3c56510ba9f3597e61a0030ee
verbose: [autoupdate] will use last downloaded version (6a86eab4e8f527b3c56510ba9f3597e61a0030ee)
debug: [main] desktop loaded
info: [localServer] will serve from: /Users/michaelbattcock/Library/Application Support/MyMeteorApp/versions/6a86eab4e8f527b3c56510ba9f3597e61a0030ee
info: [localServer] assigned port 8052
verbose: [autoupdate] started startup timer
debug: [autoupdate] timer set to 60000
info: [meteor-desktop-localstorage] loaded storage file /Users/michaelbattcock/Library/Application Support/MyMeteorApp/localstorage.json
info: [meteor-desktop-localstorage] have 0 keys
verbose: [meteor-desktop-localstorage] getAll received
verbose: [meteor-desktop-localstorage] sent storage to renderer
verbose: [autoupdate] startup did complete, stopping startup timer (startup took 5087ms)
info: [autoupdate] [AssetBundleManager] trying to query http://127.0.0.1:3000/__cordova/manifest.json
debug: [main] received did-stop-loading, assuming meteor webapp has loaded
debug: [main] showing main window
debug: [autoupdate] [AssetManifest] 263 entries. (Version: 75daca45c80cf2488e7a2246eab1fdaaec008a19)
debug: [autoupdate] [AssetBundleManager] downloaded asset manifest for version: 75daca45c80cf2488e7a2246eab1fdaaec008a19
debug: [autoupdate] got desktop version information: 959df317df051905860c0990f1a4fb8019ee453d (compatibility: dd228a785b9080ec22e49e220f4d3aed)
debug: [autoupdate] [AssetBundleManager] No redownload of initial version.
debug: [autoupdate] [AssetBundleManager] skipping writing desktop version into initial version
error: [main] Error: ENOTDIR: not a directory, open '/Users/michaelbattcock/Documents/dev/apps/pipe/.meteor/desktop-build/meteor.asar/app/desktop.asar'
at Error (native)
at Object.fs.openSync (original-fs.js:640:18)
at Object.fs.readFileSync (original-fs.js:508:33)
at assetBundle.getOwnAssets.some (/Users/michaelbattcock/Documents/dev/apps/pipe/.meteor/desktop-build/app/modules/autoupdate/assetBundleManager.js:414:53)
at Array.some (native)
at AssetBundleManager.handleDesktopBundle (/Users/michaelbattcock/Documents/dev/apps/pipe/.meteor/desktop-build/app/modules/autoupdate/assetBundleManager.js:410:44)
at AssetBundleManager.didFinishDownloadingAssetBundle (/Users/michaelbattcock/Documents/dev/apps/pipe/.meteor/desktop-build/app/modules/autoupdate/assetBundleManager.js:381:14)
at getDesktopVersion.e (/Users/michaelbattcock/Documents/dev/apps/pipe/.meteor/desktop-build/app/modules/autoupdate/assetBundleManager.js:200:26)
at Request.httpClient.e [as _callback] (/Users/michaelbattcock/Documents/dev/apps/pipe/.meteor/desktop-build/app/modules/autoupdate/assetBundleManager.js:131:17)
at Request.self.callback (/Users/michaelbattcock/Documents/dev/apps/pipe/.meteor/desktop-build/node_modules/request/request.js:186:22)
`

The I get the following in the electron console:

The selector "app" did not match any elements

And I get the following in a pop-up window with the options to 'shutdown' or 'restart'

ENOTDIR: not a directory, open '/Users/michaelbattcock/Documents/dev/apps/pipe/.meteor/desktop-build/meteor.asar/app/desktop.asar'

@michaelb-01
Copy link
Author

I can't access the network tab in the dev tools as its greyed out (maybe because of the pop-up window)

@wojtkowiak
Copy link
Owner

Please try out 0.4.0. That version should at least get you to the point where you will be able to debug the situation in the devtools.

@michaelb-01
Copy link
Author

michaelb-01 commented Jan 12, 2017

I've just tried 0.4.0 and I no longer get any errors in the terminal but I do get the following in electron's console:

No base href set. Please provide a value for the APP_BASE_HREF token or add a base element to the document.

But I do have href set as such in my index.html:

<head>
  <base href="/">
</head>

I also tried this but I get the same errors:

<head>
  <base href="./">
</head>

@michaelb-01
Copy link
Author

I've added the following to my app.module.ts

import { APP_BASE_HREF } from '@angular/common';

....
  providers: [
    { provide: APP_BASE_HREF, useValue: '/' }
  ]
....

So that gets rid of the href error but now i'm getting:

The selector "app" did not match any elements (my main component has 'app' as its selector)....

@wojtkowiak
Copy link
Owner

That is rather unrelated to meteor-desktop
Basically angular tried to start the app before it has fully loaded. On cordova it also did not work.

I have submitted a fix here:
michaelb-01/pipe#3

@michaelb-01
Copy link
Author

Hi, I tried your fix but now the app never loads.. My index.html loads fine with no errors but my router-outlet is empty...

@wojtkowiak
Copy link
Owner

but my router-outlet is empty...

I do not know angular so I am not sure what that means. I have exactly the same result in both Firefox and Desktop app.
What should I do with your app to experience the same problem?

@michaelb-01
Copy link
Author

Sorry stupid mistake by me, it works perfectly, thank you so much! (i'll try out loading files from the local file system asap)

@wojtkowiak
Copy link
Owner

Any more problems? Maybe I can close this, and you will report new issues if any occur?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants