The length of [apns-collapse-id] header must not exceed [64] bytes

Hi All,

Since HA update to 2021.7.0 (docker on Debian) I get this error:

2021-07-07 18:16:54 ERROR (MainThread) [homeassistant.components.mobile_app.notify] The length of [apns-collapse-id] header must not exceed [64] bytes. This message is generated externally to Home Assistant.
2021-07-07 18:16:55 ERROR (MainThread) [homeassistant.components.mobile_app.notify] The length of [apns-collapse-id] header must not exceed [64] bytes. This message is generated externally to Home Assistant.
2021-07-07 18:16:55 ERROR (MainThread) [homeassistant.components.mobile_app.notify] The length of [apns-collapse-id] header must not exceed [64] bytes. This message is generated externally to Home Assistant.
2021-07-07 18:24:30 ERROR (MainThread) [homeassistant.components.mobile_app.notify] The length of [apns-collapse-id] header must not exceed [64] bytes. This message is generated externally to Home Assistant.
2021-07-07 18:31:36 ERROR (MainThread) [homeassistant.components.mobile_app.notify] The length of [apns-collapse-id] header must not exceed [64] bytes. This message is generated externally to Home Assistant.

iOS HA app Version: 2021.6 (2021.158)

what notification is being sent?

Only what it can be is a notification with a image in it.
The notification is send. I receive it on my iPhone and the image is shown also.

- id: "notify_me_when_toogoodtogo"
  alias: "TooGoodToGo - All shops"
  description: "TooGoodToGo - Stock Available"
  trigger:
    - platform: state
      entity_id:
        - sensor.toogoodtogo_broodhuys_meijer_magic_box
        - sensor.toogoodtogo_albert_heijn_amsterdamseweg_amstelveen_magic_box
        - sensor.toogoodtogo_albert_heijn_to_go_amsterdam_wtc_magic_box
        - sensor.toogoodtogo_boulangerie_noe_gustav_mahlerlaan_amsterdam
        - sensor.toogoodtogo_de_drie_graefjes_stadionplein_amsterdam
        - sensor.toogoodtogo_hema_gelderlandplein
        - sensor.toogoodtogo_lidl_amsterdamseweg_188_groente_fruit_box
        - sensor.toogoodtogo_lidl_bankrashof_groente_fruit_box
        - sensor.toogoodtogo_starbucks_gustav_mahler_amsterdam
        - sensor.toogoodtogo_sushi_time_wtc_amsterdam_magic_box
        - sensor.toogoodtogo_the_roastary_magic_box
        - sensor.toogoodtogo_poke_perfect_zuidas_magic_box
        - sensor.toogoodtogo_juicebrothers_gustav_mahlerlaan_magic_box
        - sensor.toogoodtogo_le_pain_quotidien_gelderlandplein_magic_box
        - sensor.toogoodtogo_stadsbakker_jongejans_gelderlandplein_magic_box
        - sensor.toogoodtogo_brood_en_banketbakkerij_hulleman_buitenveldertselaan_amsterdam
        - sensor.toogoodtogo_jumbo_velu_kastelenstraat_amsterdam
        - sensor.toogoodtogo_instock_producent_abn_amro_circl

  condition: "{{ trigger.to_state.state | int > 0 }}"

  mode: queued

  variables:
    stock: "{{ states(trigger.to_state.entity_id) }}"
    name: "{{ state_attr(trigger.to_state.entity_id, 'friendly_name') }}"
    picture: "{{ state_attr(trigger.to_state.entity_id, 'picture') }}"
    url: "{{ state_attr(trigger.to_state.entity_id, 'url') }}"

  action:
    - service: notify.mobile_app_peter_iphone
      data:
        title: "TooGoodToGo: {{ name }}"
        message: >
          {% set entityID = trigger.to_state.entity_id %}
          {% set names = state_attr(entityID,'friendly_name').split('-') %}
          {% set namesLength = names | length %}
          {% if namesLength > 2 %}
          {% set outName = names[1] + '-' + names[2] %}
          {% else %}
          {% set outName = names[1] %}
          {% endif %}
          {{ states(entityID) }}x{{ outName }} €{{ state_attr(entityID,'price') }}
        data:
          ttl: 0
          priority: high
          sticky: true
          channel: "TooGoodToGo"
          persistent: true
          tag: "{{ trigger.to_state.entity_id }}"
          image: "{{ picture }}"
          url: "{{ url }}"
          clickAction: "{{ url }}"
          actions:
            - action: "URI"
              title: "Open"
              uri: "{{ url }}"

The tag is too long. I have posted a solution in TooGoodToGo MQTT Bridge - #69 by aritmeester

1 Like