Skip to content

Cannot Read Base64 Encoded Message with Queue Trigger #3886

@raahmed

Description

@raahmed

Investigative information

Please provide the following:

  • Timestamp: 12:30p, 12/12/2018
  • Function App version (1.0 or 2.0): 2.0 (Public Preview)
  • Function App name: QueueTrigger (unpublished), ReadFromStorage(unpublished)
  • Function name(s) (as appropriate): init.py

Please note: The functions are not published yet.

Repro steps

Provide the steps required to reproduce the problem:

  1. Create a function to insert a json string into Functions in Python. The code for the insertion should look like this:

queue_name = "example"

queue_service = QueueService(account_name = "sample", account_key = "sample")

datapoint = json.dumps({"date": "123", "location" : "somewhere"})

datapoint = base64.b64encode(bytes(datapoint, 'utf-8'))

queue_service.put_message(queue_name, str(datapoint))
  1. Execute the function successfully.

  2. Create another function for queue triggers.

def main(msg: func.QueueMessage) -> None:
    logging.info(msg.get_body.decode('utf-8')

Expected behavior

The function in 3) executes, showing all the queue messages.

Actual behavior

The function in 3) fails with the following error:

image

Known workarounds

None

Related information

Provide any related information

  • Programming language used: Python
  • Bindings used: Queues for the second function. Blobs for the first. Both are input bindings.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions