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

Error: Binding nameTrigger not supported #566

Open
mebibou opened this issue Aug 17, 2021 · 2 comments
Open

Error: Binding nameTrigger not supported #566

mebibou opened this issue Aug 17, 2021 · 2 comments

Comments

@mebibou
Copy link

mebibou commented Aug 17, 2021

This is a Bug Report

Description

  • What went wrong?
    Created a new serverless azure function, trying to run/deploy it
  • What did you expect should have happened?
    Should work
  • What was the config you used?
service: test

frameworkVersion: '2'

provider:
  name: azure
  region: UK South
  runtime: python3.6
  stage: dev
  resourceGroup: 'resourceGroup'

plugins:
  - serverless-azure-functions

package:
  patterns:
    - '!env/**'
    - '!.env/**'
    - '!local.settings.json'
    - '!.vscode/**'
    - '!__pycache__/**'
    - '!node_modules/**'
    - '!.python_packages/**'
    - '!.funcignore'
    - '!package.json'
    - '!package-lock.json'
    - '!.gitignore'
    - '!.git/**'

functions:
  test:
    handler: src/handlers/test.main
    events:
      - blob:
        name: item
        path: data/{name}.json
        connection: BLOB_CONNECTION_STRING
  • What stacktrace or error message from your provider did you see?
% sls offline
Serverless: Configuration warning: Unrecognized provider 'azure'
Serverless:  
Serverless: You're relying on provider plugin which doesn't provide a validation schema for its config.
Serverless: Please report the issue at its bug tracker linking: https://www.serverless.com/framework/docs/providers/aws/guide/plugins#extending-validation-schema
Serverless: You may turn off this message with "configValidationMode: off" setting
Serverless:  
Serverless: Initializing provider configuration...
Serverless: Python functions can ONLY run on Linux Function Apps. Switching now
Serverless: Building offline service
Serverless: Parsing Azure Functions Bindings.json...
 
 Error ---------------------------------------------------
 
  Error: Binding  nameTrigger not supported
      at Function.<anonymous> ([path]/node_modules/serverless-azure-functions/lib/shared/utils.js:98:39)
      at step ([path]/node_modules/serverless-azure-functions/lib/shared/utils.js:43:23)
      at Object.next ([path]/node_modules/serverless-azure-functions/lib/shared/utils.js:24:53)
      at fulfilled ([path]/node_modules/serverless-azure-functions/lib/shared/utils.js:15:58)
      at processTicksAndRejections (internal/process/task_queues.js:97:5)
 
     For debugging logs, run again after setting the "SLS_DEBUG=*" environment variable.
 
  Get Support --------------------------------------------
     Docs:          docs.serverless.com
     Bugs:          github.com/serverless/serverless/issues
     Issues:        forum.serverless.com
 
  Your Environment Information ---------------------------
     Operating System:          darwin
     Node Version:              13.14.0
     Framework Version:         2.54.0
     Plugin Version:            5.4.3
     SDK Version:               4.2.6
     Components Version:        3.15.0
 
Serverless: Deprecation warnings:

Detected ".env" files. In the next major release variables from ".env" files will be automatically loaded into the serverless build process. Set "useDotenv: true" to adopt that behavior now.
More Info: https://www.serverless.com/framework/docs/deprecations/#LOAD_VARIABLES_FROM_ENV_FILES

CLI options definitions were upgraded with "type" property (which could be one of "string", "boolean", "multiple"). Below listed plugins do not predefine type for introduced options:
 - AzureInvokePlugin for "resourceGroup", "region", "subscriptionId", "method", "function", "path", "data", "port"
 - AzureRemovePlugin for "resourceGroup", "region", "subscriptionId"
 - AzureDeployPlugin for "resourceGroup", "region", "subscriptionId", "stage", "function"
 - AzureFuncPlugin for "name"
 - AzureOfflinePlugin for "nocleanup", "spawnargs"
 - AzureRollbackPlugin for "resourceGroup", "region", "subscriptionId"
Please report this issue in plugin issue tracker.
Starting with next major release, this will be communicated with a thrown error.
More Info: https://www.serverless.com/framework/docs/deprecations/#CLI_OPTIONS_SCHEMA

Additional Data

  • Serverless Framework Version you're using: 2.54.0
  • Serverless CLI Version you're using:
  • Serverless Azure Plugin Version you're using:1.0.2-22
  • Operating System: Mac
  • Stack Trace:
  • Provider Error messages:
@mebibou
Copy link
Author

mebibou commented Aug 17, 2021

So if I change

functions:
  test:
    handler: src/handlers/test.main
    events:
      - blob:
        name: item
        path: data/{name}.json
        connection: BLOB_CONNECTION_STRING

to

functions:
  test:
    handler: src/handlers/test.main
    events:
      - blob:
          name: item
          path: data/{name}.json
          connection: BLOB_CONNECTION_STRING

i.e. double indent under -blob, it goes through but I have another error:

TypeError: Cannot set property 'name' of undefined
      at PackageService.getFunctionJson ([path]/node_modules/serverless-azure-functions/lib/services/packageService.js:215:47)
      at PackageService.createBinding ([path]/node_modules/serverless-azure-functions/lib/services/packageService.js:202:33)
      at PackageService.<anonymous> ([path]/node_modules/serverless-azure-functions/lib/services/packageService.js:102:68)
      at step ([path]/node_modules/serverless-azure-functions/lib/services/packageService.js:45:23)
      at Object.next ([path]/node_modules/serverless-azure-functions/lib/services/packageService.js:26:53)
      at fulfilled ([path]/node_modules/serverless-azure-functions/lib/services/packageService.js:17:58)
      at processTicksAndRejections (internal/process/task_queues.js:97:5)

FYI, this is taken straight from https://www.serverless.com/framework/docs/providers/azure/events/blobstorage/ and it doesnt work. Anyone tested this?

@amit12cool
Copy link

amit12cool commented Dec 1, 2021

functions:
  test:
    handler: src/handlers/test.main
    events:
      - blob:
          name: item
         path: data/{name}.json
         connection: BLOB_CONNECTION_STRING

Try above

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

2 participants