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

Unable to run Meteor 1.9 with meteor-desktop #264

Open
wreiske opened this issue Jan 26, 2020 · 1 comment
Open

Unable to run Meteor 1.9 with meteor-desktop #264

wreiske opened this issue Jan 26, 2020 · 1 comment

Comments

@wreiske
Copy link

wreiske commented Jan 26, 2020

I am thrilled to see some progress with meteor-desktop!! Decided to finally try it again in my meteor project, but it seems to fail to start.

vpn0-user6:project username$ meteor npm install --save-dev meteor-desktop
vpn0-user6:project username$ meteor run ios --port 5000 --mobile-server=http://localhost --verbose --settings settings.json

The app starts, and then errors out.

=> Started your app.

=> App running at: http://localhost:5000/
W20200125-21:59:01.584(-5)? (STDERR) WARNING: Push APN is in development mode
TypeError: Cannot read property 'toLowerCase' of undefined
    at /Users/username/prj/project/.meteor/local/cordova-build/platforms/ios/cordova/lib/list-emulator-build-targets:54:45
    at Array.forEach (<anonymous>)
    at /Users/username/prj/project/.meteor/local/cordova-build/platforms/ios/cordova/lib/list-emulator-build-targets:52:44
    at Array.reduce (<anonymous>)
    at /Users/username/prj/project/.meteor/local/cordova-build/platforms/ios/cordova/lib/list-emulator-build-targets:50:57
    at Array.reduce (<anonymous>)
    at /Users/username/prj/project/.meteor/local/cordova-build/platforms/ios/cordova/lib/list-emulator-build-targets:45:28
    at _fulfilled (/Users/username/prj/project/.meteor/local/cordova-build/platforms/ios/cordova/node_modules/q/q.js:854:54)
    at /Users/username/prj/project/.meteor/local/cordova-build/platforms/ios/cordova/node_modules/q/q.js:883:30
    at Promise.promise.promiseDispatch (/Users/username/prj/project/.meteor/local/cordova-build/platforms/ios/cordova/node_modules/q/q.js:816:13)
=> Errors executing Cordova commands:

   While running Cordova app for platform iOS with options
   --buildConfig,/Users/username/prj/project/.meteor/local/cordova-build/build.json,--emulator:
   Error: Command failed: /Users/username/prj/project/.meteor/local/cordova-build/platforms/ios/cordova/run --buildConfig
   /Users/username/prj/project/.meteor/local/cordova-build/build.json --emulator

   at ChildProcess.exitCallback
   (/Users/username/.meteor/packages/meteor-tool/.1.9.0.1lpg62k.6s1p++os.osx.x86_64+web.browser+web.browser.legacy+web.cordova/mt-os.osx.x86_64/tools/utils/tools/utils/processes.ts:174:23)
   at ChildProcess.emit (events.js:210:5)
   at Process.ChildProcess._handle.onexit (internal/child_process.js:272:12)

/Users/username/.meteor/packages/coffeescript/.1.0.17.12bvfse.4o3a++os+web.browser+web.cordova/plugin.compileCoffeescript.os/npm/node_modules/meteor/promise/node_modules/meteor-promise/promise_server.js:116
      throw error;
      ^
ExitWithCode { code: 1 }

Any ideas?

@wreiske
Copy link
Author

wreiske commented Jan 26, 2020

Looks like listEmulatorBuildTargets() needs to be modified in .meteor/local/cordova-build/platforms/ios/cordova/lib/list-emulator-build-targets

Before

 availableDevicesInCategory.forEach(function (device) {
                    if (device.name === deviceType.name.replace(/\-inch/g, ' inch') && 
                        device.availability.toLowerCase().indexOf('unavailable') < 0) {
                            availAcc.push(device);
                        }
                });

After

 availableDevicesInCategory.forEach(function (device) {
                        if (device.name === deviceType.name.replace(/\-inch/g, ' inch') && device.isAvailable) {
                            availAcc.push(device);
                        }
                    });

After that, the following error occurs:

** BUILD SUCCEEDED **

No target specified for emulator. Deploying to undefined simulator
** RUN SUCCEEDED **
Device type "com.apple.CoreSimulator.SimDeviceType.undefined" could not be found.
=> Errors executing Cordova commands:

   While running Cordova app for platform iOS with options
   --buildConfig,/Users/username/prj/project/.meteor/local/cordova-build/build.json,--emulator:
   Error: Command failed: /Users/username/prj/project/.meteor/local/cordova-build/platforms/ios/cordova/run --buildConfig
   /Users/username/prj/project/.meteor/local/cordova-build/build.json --emulator

   at ChildProcess.exitCallback
   (/Users/username/.meteor/packages/meteor-tool/.1.9.0.1lpg62k.6s1p++os.osx.x86_64+web.browser+web.browser.legacy+web.cordova/mt-os.osx.x86_64/tools/utils/tools/utils/processes.ts:174:23)
   at ChildProcess.emit (events.js:210:5)
   at Process.ChildProcess._handle.onexit (internal/child_process.js:272:12)

/Users/username/.meteor/packages/coffeescript/.1.0.17.12bvfse.4o3a++os+web.browser+web.cordova/plugin.compileCoffeescript.os/npm/node_modules/meteor/promise/node_modules/meteor-promise/promise_server.js:116
      throw error;
      ^
ExitWithCode { code: 1 }

Running with ios-device instead of ios runs...

For some reason, it died and now it won't start

=> Started MongoDB.
[meteor-desktop] calculated .desktop hash version is d12bcf5349c54ffc63de845c3d91fe8b76cf29b1_dev
/Users/username/.meteor/packages/omega_meteor-desktop-bundler/.2.2.5.1wrzb89.06n2i++os+web.browser+web.browser.legacy+web.cordova/plugin.meteor-desktop-bundler.os/npm/node_modules/meteor/meteor-desktop-bundler/node_modules/graceful-fs/graceful-fs.js:217
    if (this instanceof WriteStream)
             ^

RangeError: Maximum call stack size exceeded
    at Function.[Symbol.hasInstance] (<anonymous>)
    at WriteStream (/Users/username/.meteor/packages/omega_meteor-desktop-bundler/.2.2.5.1wrzb89.06n2i++os+web.browser+web.browser.legacy+web.cordova/plugin.meteor-desktop-bundler.os/npm/node_modules/meteor/meteor-desktop-bundler/node_modules/graceful-fs/graceful-fs.js:217:14)
    at WriteStream (/Users/username/.meteor/packages/omega_meteor-desktop-bundler/.2.2.5.1wrzb89.06n2i++os+web.browser+web.browser.legacy+web.cordova/plugin.meteor-desktop-bundler.os/npm/node_modules/meteor/meteor-desktop-bundler/node_modules/graceful-fs/graceful-fs.js:218:29)
    at WriteStream (/Users/username/.meteor/packages/omega_meteor-desktop-bundler/.2.2.5.1wrzb89.06n2i++os+web.browser+web.browser.legacy+web.cordova/plugin.meteor-desktop-bundler.os/npm/node_modules/meteor/meteor-desktop-bundler/node_modules/graceful-fs/graceful-fs.js:218:29)

... spammed a million times and then finished with this

    at WriteStream (/Users/username/.meteor/packages/omega_meteor-desktop-bundler/.2.2.5.1wrzb89.06n2i++os+web.browser+web.browser.legacy+web.cordova/plugin.meteor-desktop-bundler.os/npm/node_modules/meteor/meteor-desktop-bundler/node_modules/graceful-fs/graceful-fs.js:218:29)
    at new WriteStream (/Users/username/.meteor/packages/omega_meteor-desktop-bundler/.2.2.5.1wrzb89.06n2i++os+web.browser+web.browser.legacy+web.cordova/plugin.meteor-desktop-bundler.os/npm/node_modules/meteor/meteor-desktop-bundler/node_modules/graceful-fs/graceful-fs.js:218:29)
    at Object.createWriteStream (/Users/username/.meteor/packages/meteor-tool/.1.9.0.1lpg62k.6s1p++os.osx.x86_64+web.browser+web.browser.legacy+web.cordova/mt-os.osx.x86_64/dev_bundle/lib/node_modules/graceful-fs/graceful-fs.js:306:12)
    at Object.module.exports.writeFilesystem (/Users/username/prj/project/node_modules/asar/lib/disk.js:60:18)
    at /Users/username/prj/project/node_modules/asar/lib/asar.js:150:19
    at /Users/username/prj/project/node_modules/mkdirp/index.js:48:26
    at callback (/Users/username/.meteor/packages/meteor-tool/.1.9.0.1lpg62k.6s1p++os.osx.x86_64+web.browser+web.browser.legacy+web.cordova/mt-os.osx.x86_64/dev_bundle/lib/node_modules/graceful-fs/polyfills.js:295:20)
    at callback (/Users/username/.meteor/packages/meteor-tool/.1.9.0.1lpg62k.6s1p++os.osx.x86_64+web.browser+web.browser.legacy+web.cordova/mt-os.osx.x86_64/dev_bundle/lib/node_modules/npm/node_modules/graceful-fs/polyfills.js:295:20)
    at FSReqCallback.oncomplete (fs.js:159:5)

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

1 participant