Skip to content

[PHP] Using Blob as input fails with mscorlib exception #787

@ElvenSpellmaker

Description

@ElvenSpellmaker

When trying to specify a blob as an input my function isn't called and a .NET internal error is thrown.

Repro steps

Add a blob input to a PHP Azure Function:

...
    {
      "type": "blob",
      "name": "blob",
      "path": "test-container/testblob",
      "connection": "storage_STORAGE",
      "direction": "in"
    }
...

Expected behaviour

The blob is available using getenv('<name>');

Actual behaviour

Trying to run the function causes the following message to appear in the logs:

2016-10-20T20:24:52.380 Exception while executing function: Functions.FunctionName. mscorlib: Value cannot be null.
Parameter name: destination.

I tried populating the file with some data (just in case it didn't support empty files) and this didn't help either.

Known workarounds

None at the moment. Removing the script changes nothing, which means it isn't a script error as it's not even calling it.

Related information

  • PHP (5.6 and 7)
  • Links to source: N/A as the invocation doesn't even get to the source.

As an aside, it's also impossible to have a non-existent blob as an input, which would be useful in the case that the function might not need the blob to function or perhaps creates it for use in later invocations (is this a separate issue?).
The following error is thrown in that case:

2016-10-20T20:30:15.537 Exception while executing function: Functions.FunctionName. Microsoft.Azure.WebJobs.Script: Object reference not set to an instance of an object.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions