Skip to content

throw _iteratorError #62

Closed
Closed
@funkenstrahlen

Description

@funkenstrahlen

I am running version 1.2.0 of parse-server-push-adapter. I added osx push config to my server configuration. Now the app crashes on startup with throw _iteratorError.

2017-03-14T14:56:39.663970+00:00 heroku[web.1]: Starting process with command `npm start`
2017-03-14T14:56:42.403842+00:00 app[web.1]:
2017-03-14T14:56:42.403855+00:00 app[web.1]: > [email protected] start /app
2017-03-14T14:56:42.403856+00:00 app[web.1]: > node index.js
2017-03-14T14:56:42.403857+00:00 app[web.1]:
2017-03-14T14:56:44.369047+00:00 app[web.1]:
2017-03-14T14:56:44.369063+00:00 app[web.1]: /app/node_modules/parse-server-push-adapter/lib/ParsePushAdapter.js:81
2017-03-14T14:56:44.369064+00:00 app[web.1]:           throw _iteratorError;
2017-03-14T14:56:44.369065+00:00 app[web.1]:           ^
2017-03-14T14:56:44.369066+00:00 app[web.1]: [object Object]
2017-03-14T14:56:44.383983+00:00 app[web.1]:
2017-03-14T14:56:44.394205+00:00 app[web.1]: npm ERR! Linux 3.13.0-112-generic
2017-03-14T14:56:44.394396+00:00 app[web.1]: npm ERR! argv "/app/.heroku/node/bin/node" "/app/.heroku/node/bin/npm" "start"
2017-03-14T14:56:44.394542+00:00 app[web.1]: npm ERR! node v7.7.2
2017-03-14T14:56:44.394668+00:00 app[web.1]: npm ERR! npm  v4.1.2
2017-03-14T14:56:44.394837+00:00 app[web.1]: npm ERR! code ELIFECYCLE
2017-03-14T14:56:44.395060+00:00 app[web.1]: npm ERR! [email protected] start: `node index.js`
2017-03-14T14:56:44.395160+00:00 app[web.1]: npm ERR! Exit status 1
2017-03-14T14:56:44.395291+00:00 app[web.1]: npm ERR!
2017-03-14T14:56:44.395379+00:00 app[web.1]: npm ERR! Failed at the [email protected] start script 'node index.js'.
2017-03-14T14:56:44.395468+00:00 app[web.1]: npm ERR! Make sure you have the latest version of node.js and npm installed.
2017-03-14T14:56:44.395560+00:00 app[web.1]: npm ERR! If you do, this is most likely a problem with the podlive-parse-server package,
2017-03-14T14:56:44.395649+00:00 app[web.1]: npm ERR! not with npm itself.
2017-03-14T14:56:44.395744+00:00 app[web.1]: npm ERR! Tell the author that this fails on your system:
2017-03-14T14:56:44.395831+00:00 app[web.1]: npm ERR!     node index.js
2017-03-14T14:56:44.395920+00:00 app[web.1]: npm ERR! You can get information on how to open an issue for this project with:
2017-03-14T14:56:44.396011+00:00 app[web.1]: npm ERR!     npm bugs podlive-parse-server
2017-03-14T14:56:44.396098+00:00 app[web.1]: npm ERR! Or if that isn't available, you can get their info via:
2017-03-14T14:56:44.396186+00:00 app[web.1]: npm ERR!     npm owner ls podlive-parse-server
2017-03-14T14:56:44.396275+00:00 app[web.1]: npm ERR! There is likely additional logging output above.
2017-03-14T14:56:44.405248+00:00 app[web.1]:
2017-03-14T14:56:44.405608+00:00 app[web.1]: npm ERR! Please include the following file with any support request:
2017-03-14T14:56:44.405803+00:00 app[web.1]: npm ERR!     /app/npm-debug.log
2017-03-14T14:56:46.493610+00:00 heroku[web.1]: State changed from starting to crashed
2017-03-14T14:56:46.483890+00:00 heroku[web.1]: Process exited with status 1

This is how my push config does look like:

  push: {
    ios: {
      pfx: __dirname + '/certs/' + process.env.APNS_IOS_CERTIFICATE, // The filename of private key and certificate in PFX or PKCS12 format from disk  
      bundleId: process.env.BUNDLE_ID_IOS, // The bundle identifier associate with your app
      production: is_production // Specifies which environment to connect to: Production (if true) or Sandbox
    },
    osx: {
      pfx: __dirname + '/certs/' + process.env.APNS_OSX_CERTIFICATE, // The filename of private key and certificate in PFX or PKCS12 format from disk  
      bundleId: process.env.BUNDLE_ID_OSX, // The bundle identifier associate with your app
      production: is_production // Specifies which environment to connect to: Production (if true) or Sandbox
    }
  },

All configuration variables are set.

Expected:

parse server push adapter should throw an error that osx is unsupported push type as this is only supported with release 1.3.0.

Actual result:

It crashes with throw _iteratorError;.

thoughts:

I think _iteratorError in this case is actually the correct error I expect ( throw new Parse.Error(Parse.Error.PUSH_MISCONFIGURED, 'Push to ' + pushType + ' is not supported');. However parse server does not print the error correctly to the user as you can see here: https://github.com/ParsePlatform/parse-server/blob/c1dcaf12712eb025d502387e564d3b9c1093a768/src/Adapters/AdapterLoader.js

Therefore I never see the actual error message. Maybe this is an error of parse-server in this case.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions