Avatar

Community Advisor

I tried to add openwhisk alarms to my app using /whisk.system/alarms https://github.com/AdobeDocs/adobeio-runtime/blob/33d0979a45b9e35e8addaad7e97dfb00f8ea5e12/reference... and added a new trigger to my manifest.yml file as following:

 

    triggers:
      myIntervalTest:
        feed: /whisk.system/alarms/interval
        inputs: 
          minutes: '5'
          start-date: "2020-08-30T19:30:00.000Z"
          stop-date: "2020-08-30T21:30:00.000Z"
          payload: "{}"

 

 and running local dev server with "aio app run --local" I get the following error message:

 

OpenWhiskError: POST http://localhost:3233/api/v1/namespaces/whisk.system/actions/alarms/interval?blocking=true Returned HTTP 403 (Forbidden) --> "The supplied authentication is not authorized to access 'whisk.system/alarms'."

 


Question 1: what do I need to change to get proper authentication?

 

on the other hand, it runs leaving out the "--local" parameter with the following message:

Local Dev Serverinterval:0ebaeb2b80054388baeb2b800523887b

so it looks as the trigger has successfully been placed on whisk with the desired interval.

but as soon as the trigger reaches the interval, the following error message appears in console:

 stdout: alarm: Error invoking whisk action: 204 undefined

I double checked any spellings and everything looks fine, here are just the main entries from manifest.yml

packages:
  __APP_PACKAGE__:
    license: Apache-2.0
    actions:
      testAlarmsPackage:
        function: actions\testAlarmsPackage\index.js
        web: 'yes'
        runtime: 'nodejs:12'
        inputs:
          LOG_LEVEL: debug
        annotations:
          require-adobe-auth: true
          final: true
    triggers:
      myIntervalTest:
        feed: /whisk.system/alarms/interval
        inputs: 
          {see above}
    rules:
      runTestAlarms2:
        trigger: myIntervalTest
        action: testAlarmsPackage

I tryed to change the names for trigger and action in the rules set to confirm it is no spelling mistake. spelling mistakes break the build and output following messages:

Error: Action/Trigger provided in the rule not found in manifest file

 

Question 2: Any ideas what to change so that the alarm can trigger the right action?