Skip to content

Friendly iOS notification missing config errors

Friendly messages for missing iOS notification config. These messages appear whenever the apps starts/restarts.

Is it fine to leave these as warnings? Do errors trigger something special in production if there is an actual config issue?

Should we just generate the certs in obtain-secrets or include some default ones and avoid the issue?


After:

2017-07-20T22:46:07.891Z - warn: ios push notification gateway (Prod) missing config, apn:certProd:undefined apn:keyProd:undefined
{ category: 'push-notifications' }
2017-07-20T22:46:07.899Z - warn: ios push notification gateway (Dev) missing config, apn:certDev:undefined apn:keyDev:undefined
{ category: 'push-notifications' }
2017-07-20T22:46:08.011Z - warn: ios push notification feedback (Dev) missing config, apn:certDev:undefined apn:keyDev:undefined
{ category: 'push-notifications' }

Before (keep in mind it wraps in the terminal which makes it longer):

2017-07-20T22:49:45.780Z - error: ios push notification feedback (Dev) experienced an error
{ error: 'ENOENT: no such file or directory, open \'C:\\Users\\some-user\\Documents\\GitLab\\webapp\\cert.pem\'',
  category: 'push-notifications' }
2017-07-20T22:49:45.790Z - error: No error reporting is enabled so just logging to logger:
{ exception:
   { message: 'ENOENT: no such file or directory, open \'C:\\Users\\some-user\\Documents\\GitLab\\webapp\\cert.pem\'',
     stack: 'Error: ENOENT: no such file or directory, open \'C:\\Users\\some-user\\Documents\\GitLab\\webapp\\cert.pem\'\n    at Error (native)\nFrom previous event:\n
at resolveCredential (C:\\Users\\some-user\\Documents\\GitLab\\webapp\\node_modules\\apn\\lib\\credentials\\resolve.js:17:31)\n    at loadCredentials (C:\\Users\\some-user\\Documents\\GitLab\\webapp\\node_modules\\apn\\lib\\credentials\\load.js:14:20)\n    at Feedback.loadCredentials (C:\\Users\\some-user\\Documents\\GitLab\\webapp\\node_modules\\apn\\lib\\feedback.js:121:29)\n    at Feedback.createSocket (C:\\Users\\some-user\\Documents\\GitLab\\webapp\\node_modules\\apn\\lib\\feedback.js:151:7)\n    at Feedback.request (C:\\Users\\some-user\\Documents\\GitLab\\webapp\\node_modules\\apn\\lib\\feedback.js:278:7)\n    at Feedback.start (C:\\Users\\some-user\\Documents\\GitLab\\webapp\\node_modules\\apn\\lib\\feedback.js:270:7)\n    at new Feedback (C:\\Users\\some-user\\Documents\\GitLab\\webapp\\node_modules\\apn\\lib\\feedback.js:88:7)\n    at createFeedbackEmitterForEnv (C:/Users/some-user/Documents/GitLab/webapp/modules/push-gateways/lib/ios/ios-notification-gateway.js:120:20)\n    at Object.createFeedbackEmitter (C:/Users/some-user/Documents/GitLab/webapp/modules/push-gateways/lib/ios/ios-notification-gateway.js:163:14)\n    at Object.exports.install (C:/Users/some-user/Documents/GitLab/webapp/server/event-listeners/apn-feedback-listener.js:14:36)\n    at C:/Users/some-user/Documents/GitLab/webapp/server/event-listeners/index.js:23:21\n    at Array.forEach (native)\n
   at Object.exports.install (C:/Users/some-user/Documents/GitLab/webapp/server/event-listeners/index.js:22:19)\n    at Object.<anonymous> (C:\\Users\\some-user\\Documents\\GitLab\\webapp\\server\\web.js:26:30)\n    at require (internal/module.js:20:19)\n    at Object.<anonymous> (C:\\Users\\some-user\\Documents\\GitLab\\webapp\\web.js:7:1)\n    at run (bootstrap_node.js:352:7)\n    at startup (bootstrap_node.js:144:9)\n    at bootstrap_node.js:467:3',
     name: 'Error' },
  meta:
   { errorString: 'Error: ENOENT: no such file or directory, open \'C:\\Users\\some-user\\Documents\\GitLab\\webapp\\cert.pem\'',
     apnEnv: 'Dev' },
  tags:
   { host: 'some-pc',
     module: 'ios-notification-gateway',
     job: 'web' } }
2017-07-20T22:49:45.794Z - error: ios push notification feedback (Dev) experienced a feedbackError
{ error: 'ENOENT: no such file or directory, open \'C:\\Users\\some-user\\Documents\\GitLab\\webapp\\cert.pem\'',
  category: 'push-notifications' }
2017-07-20T22:49:45.795Z - error: No error reporting is enabled so just logging to logger:
{ exception:
   { message: 'ENOENT: no such file or directory, open \'C:\\Users\\some-user\\Documents\\GitLab\\webapp\\cert.pem\'',
     stack: 'Error: ENOENT: no such file or directory, open \'C:\\Users\\some-user\\Documents\\GitLab\\webapp\\cert.pem\'\n    at Error (native)\nFrom previous event:\n
at resolveCredential (C:\\Users\\some-user\\Documents\\GitLab\\webapp\\node_modules\\apn\\lib\\credentials\\resolve.js:17:31)\n    at loadCredentials (C:\\Users\\some-user\\Documents\\GitLab\\webapp\\node_modules\\apn\\lib\\credentials\\load.js:14:20)\n    at Feedback.loadCredentials (C:\\Users\\some-user\\Documents\\GitLab\\webapp\\node_modules\\apn\\lib\\feedback.js:121:29)\n    at Feedback.createSocket (C:\\Users\\some-user\\Documents\\GitLab\\webapp\\node_modules\\apn\\lib\\feedback.js:151:7)\n    at Feedback.request (C:\\Users\\some-user\\Documents\\GitLab\\webapp\\node_modules\\apn\\lib\\feedback.js:278:7)\n    at Feedback.start (C:\\Users\\some-user\\Documents\\GitLab\\webapp\\node_modules\\apn\\lib\\feedback.js:270:7)\n    at new Feedback (C:\\Users\\some-user\\Documents\\GitLab\\webapp\\node_modules\\apn\\lib\\feedback.js:88:7)\n    at createFeedbackEmitterForEnv (C:/Users/some-user/Documents/GitLab/webapp/modules/push-gateways/lib/ios/ios-notification-gateway.js:120:20)\n    at Object.createFeedbackEmitter (C:/Users/some-user/Documents/GitLab/webapp/modules/push-gateways/lib/ios/ios-notification-gateway.js:163:14)\n    at Object.exports.install (C:/Users/some-user/Documents/GitLab/webapp/server/event-listeners/apn-feedback-listener.js:14:36)\n    at C:/Users/some-user/Documents/GitLab/webapp/server/event-listeners/index.js:23:21\n    at Array.forEach (native)\n
   at Object.exports.install (C:/Users/some-user/Documents/GitLab/webapp/server/event-listeners/index.js:22:19)\n    at Object.<anonymous> (C:\\Users\\some-user\\Documents\\GitLab\\webapp\\server\\web.js:26:30)\n    at require (internal/module.js:20:19)\n    at Object.<anonymous> (C:\\Users\\some-user\\Documents\\GitLab\\webapp\\web.js:7:1)\n    at run (bootstrap_node.js:352:7)\n    at startup (bootstrap_node.js:144:9)\n    at bootstrap_node.js:467:3\nFrom previous event:\n    at Feedback.createSocket (C:\\Users\\some-user\\Documents\\GitLab\\webapp\\node_modules\\apn\\lib\\feedback.js:150:30)\n    at Feedback.request (C:\\Users\\some-user\\Documents\\GitLab\\webapp\\node_modules\\apn\\lib\\feedback.js:278:7)\n    at Feedback.start (C:\\Users\\some-user\\Documents\\GitLab\\webapp\\node_modules\\apn\\lib\\feedback.js:270:7)\n    at new Feedback (C:\\Users\\some-user\\Documents\\GitLab\\webapp\\node_modules\\apn\\lib\\feedback.js:88:7)\n    at createFeedbackEmitterForEnv (C:/Users/some-user/Documents/GitLab/webapp/modules/push-gateways/lib/ios/ios-notification-gateway.js:120:20)\n    at Object.createFeedbackEmitter (C:/Users/some-user/Documents/GitLab/webapp/modules/push-gateways/lib/ios/ios-notification-gateway.js:163:14)\n    at Object.exports.install (C:/Users/some-user/Documents/GitLab/webapp/server/event-listeners/apn-feedback-listener.js:14:36)\n    at C:/Users/some-user/Documents/GitLab/webapp/server/event-listeners/index.js:23:21\n    at Array.forEach (native)\n    at Object.exports.install (C:/Users/some-user/Documents/GitLab/webapp/server/event-listeners/index.js:22:19)\n    at Object.<anonymous> (C:\\Users\\some-user\\Documents\\GitLab\\webapp\\server\\web.js:26:30)\n    at require (internal/module.js:20:19)\n    at Object.<anonymous> (C:\\Users\\some-user\\Documents\\GitLab\\webapp\\web.js:7:1)\n    at run (bootstrap_node.js:352:7)\n    at startup (bootstrap_node.js:144:9)\n    at bootstrap_node.js:467:3',
     name: 'Error' },
  meta:
   { errorString: 'Error: ENOENT: no such file or directory, open \'C:\\Users\\some-user\\Documents\\GitLab\\webapp\\cert.pem\'',
     apnEnv: 'Dev' },
  tags:
   { host: 'some-pc',
     module: 'ios-notification-gateway',
     job: 'web' } }
Edited by 🤖 GitLab Bot 🤖

Merge request reports