Skip to content
This repository has been archived by the owner on Aug 27, 2018. It is now read-only.

No alarm notification if trigger time is absolute #784

Open
clochix opened this issue Jul 5, 2016 · 2 comments
Open

No alarm notification if trigger time is absolute #784

clochix opened this issue Jul 5, 2016 · 2 comments
Labels

Comments

@clochix
Copy link
Contributor

clochix commented Jul 5, 2016

Full stack:

[TypeError: Cannot read property '2' of null]
TypeError: Cannot read property '2' of null
    at iCalDurationToUnitValue (/usr/local/cozy/apps/home/node_modules/cozy-home/build/server/models/event.js:73:6)
    at ClassFromGetModel.Event.getAlarms (/usr/local/cozy/apps/home/node_modules/cozy-home/build/server/models/event.js:124:20)
    at AlarmManager.module.exports.AlarmManager.addEventCounters (/usr/local/cozy/apps/home/node_modules/cozy-home/build/server/lib/alarm_manager.js:90:26)
    at /usr/local/cozy/apps/home/node_modules/cozy-home/build/server/lib/alarm_manager.js:46:32
    at /usr/local/cozy/apps/home/node_modules/cozy-home/node_modules/cozydb/lib/model.js:213:18
    at /usr/local/cozy/apps/home/node_modules/cozy-home/node_modules/cozydb/lib/cozymodel.js:294:18
    at parseBody (/usr/local/cozy/apps/home/node_modules/cozy-home/node_modules/cozydb/node_modules/request-json-light/main.js:75:10)
    at IncomingMessage.<anonymous> (/usr/local/cozy/apps/home/node_modules/cozy-home/node_modules/cozydb/node_modules/request-json-light/main.js:109:14)
    at emitNone (events.js:72:20)
    at IncomingMessage.emit (events.js:166:7)
@clochix clochix added the bug label Jul 5, 2016
@clochix
Copy link
Contributor Author

clochix commented Jul 5, 2016

This error is triggered when parsing alarms fields of the users events. Here's one of the event that trigger this exception:

    { 
      "id": "e36b487277e6feb25c318fce162bf947",
      "key": "e36b487277e6feb25c318fce162bf947",
      "value": {
        "_id": "e36b487277e6feb25c318fce162bf947",
        "_rev": "1-dc7aa77152a1849a05a5e6ac045ea0e3",
        "start": "2013-09-05T08:00:00.000Z",
        "end": "2013-09-05T09:00:00.000Z",
        "details": "",
        "description": "xxxx",
        "rrule": "",
        "tags": [
          "Cours"
        ],
        "attendees": [],
        "related": null,
        "alarms": [
          { 
            "trigg": "19760401T005545Z",
            "action": "DISPLAY"
          }
        ],
        "created": "2013-06-20T12:53:04.000Z",
        "lastModification": "2013-06-20T12:53:34.000Z",
        "caldavuri": "3CDDC6CB-C755-4D1E-87C1-4F800ADE1549",
        "docType": "event"
      }
    },

@clochix
Copy link
Contributor Author

clochix commented Jul 5, 2016

Looks like we only handle one of the allowed values for alarm trigger field: https://tools.ietf.org/html/rfc5545#section-3.8.6.3

@clochix clochix changed the title TypeError: Cannot read property '2' of null No alarm notification if trigger time is absolute Jul 5, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

1 participant