# The things upgrade v3 missing field "session.dev\_addr"

**URL:** <https://www.thethingsnetwork.org/forum/t/the-things-upgrade-v3-missing-field-session-dev-addr/46126>\
**Category:** Migrating Devices to V3\
**Created:** [March 29, 2021, 5:09pm UTC](https://www.thethingsnetwork.org/forum/t/the-things-upgrade-v3-missing-field-session-dev-addr/46126 "2021-03-29T17:09:27Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![oberon](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/oberon/32/35697_2.png) [@oberon](https://www.thethingsnetwork.org/forum/u/oberon)\
**Post date:** [March 29, 2021, 5:09pm UTC](https://www.thethingsnetwork.org/forum/t/the-things-upgrade-v3-missing-field-session-dev-addr/46126/1 "2021-03-29T17:09:28Z")

</div>

Tried to upgrade my device from v2 to v3 using the following generated device.json:

```
{
    "ids": {
        "device_id": "appid001003",
        "application_ids": {
            "application_id": "appid001001"
        },
        "dev_eui": "A840410001818B3C",
        "join_eui": "9EF1E12F9A7877D9"
    },
    "created_at": "0001-01-01T00:00:00Z",
    "updated_at": "0001-01-01T00:00:00Z",
    "name": "appid001003",
    "lorawan_version": "1.0.2",
    "lorawan_phy_version": "1.0.2-b",
    "frequency_plan_id": "EU_863_870_TTN",
    "mac_settings": {
        "rx1_delay": {
            "value": 1
        },
        "supports_32_bit_f_cnt": true,
        "resets_f_cnt": true,
        "status_time_periodicity": "0s",
        "status_count_periodicity": 0
    }
}

```

but get the following error:

```
{
  "code": 3,
  "message": "error:pkg/networkserver:field_mask (invalid field mask)",
  "details": [
    {
      "@type": "type.googleapis.com/ttn.lorawan.v3.ErrorDetails",
      "namespace": "pkg/networkserver",
      "name": "field_mask",
      "message_format": "invalid field mask",
      "correlation_id": "e8c3ec4e0ebd44e5a3a89cc2e932c0be",
      "cause": {
        "namespace": "pkg/ttnpb",
        "name": "missing_field",
        "message_format": "field `{field}` is missing",
        "attributes": {
          "field": "session.dev_addr"
        },
        "code": 2
      },
      "code": 3
    }
  ],
  "request_details": {
    "url": "/ns/applications/appid001001v3/devices/appid001003",
    "method": "put",
    "stack_component": "ns"
  }
}

```

Any help regarding this would be appreciated.

---

<div class="post-metadata">

**Author:** ![cslorabox](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/cslorabox/32/35697_2.png) [@cslorabox](https://www.thethingsnetwork.org/forum/u/cslorabox)\
**Post date:** [March 29, 2021, 5:14pm UTC](https://www.thethingsnetwork.org/forum/t/the-things-upgrade-v3-missing-field-session-dev-addr/46126/2 "2021-03-29T17:14:33Z")

</div>

Could you cite the specific basis for thinking this would be a working path?

You appear to be trying to transfer registration of an OTAA device, so it would have to re-join and get a new session device address in the new network’s pool.

In so doing though, you should’t try to tell it to use TTN V2’s 1x RX1, but rather let V3 command the proper 5 second RX1 as part of the joining process.

---

<div class="post-metadata">

**Author:** ![oberon](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/oberon/32/35697_2.png) [@oberon](https://www.thethingsnetwork.org/forum/u/oberon)\
**Post date:** [March 29, 2021, 5:38pm UTC](https://www.thethingsnetwork.org/forum/t/the-things-upgrade-v3-missing-field-session-dev-addr/46126/3 "2021-03-29T17:38:26Z")

</div>

Thanks for the fast reply. I don’t know what you exactly mean. I followed the tutorial and executed:

> set TTNV2\_APP\_ID=appid001001  
> set TTNV2\_APP\_ACCESS\_KEY=ttn-account-v2.xxxxxxxx-xxxxxxxxx-xxxxxxxxxxxxxxxxxxxxxxxx  
> set FREQUENCY\_PLAN\_ID=EU\_863\_870\_TTN  
> ttn-lw-migrate device --source ttnv2 appid001003 --verbose \> devices.json

I imported the generated devices.json file, giving me the error.

Can you please clarify what I did wrong? Thnx in advance

---

<div class="post-metadata">

**Author:** ![descartes](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/descartes/32/47220_2.png) [@descartes](https://www.thethingsnetwork.org/forum/u/descartes)\
**Post date:** [March 29, 2021, 6:18pm UTC](https://www.thethingsnetwork.org/forum/t/the-things-upgrade-v3-missing-field-session-dev-addr/46126/4 "2021-03-29T18:18:36Z")

</div>

If you search the forum you’ll find other references to the `field_mask (invalid field mask)` issue.

---

<div class="post-metadata">

**Author:** ![ateainsights](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/ateainsights/32/35697_2.png) [@ateainsights](https://www.thethingsnetwork.org/forum/u/ateainsights)\
**Post date:** [April 6, 2021, 10:04am UTC](https://www.thethingsnetwork.org/forum/t/the-things-upgrade-v3-missing-field-session-dev-addr/46126/5 "2021-04-06T10:04:11Z")

</div>

I have the exact same problem and searching for the specific error does not provide any answers, but ironically just leads back to this thread.

I tried to export with --ttnv2.with-session=false, but produces the same error.

---

<div class="post-metadata">

**Author:** ![oberon](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/oberon/32/35697_2.png) [@oberon](https://www.thethingsnetwork.org/forum/u/oberon)\
**Post date:** [April 6, 2021, 3:15pm UTC](https://www.thethingsnetwork.org/forum/t/the-things-upgrade-v3-missing-field-session-dev-addr/46126/6 "2021-04-06T15:15:01Z")

</div>

Hi Ateainsigths

I stopped trying, I deleted my gateway and devices from v2 and added them fresh to v3.  
Now its all working again.  
But, yes, you loose the data on v2, so that’s a disadvantage.

---

<div class="post-metadata">

**Author:** ![ateainsights](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/ateainsights/32/35697_2.png) [@ateainsights](https://www.thethingsnetwork.org/forum/u/ateainsights)\
**Post date:** [April 7, 2021, 8:49am UTC](https://www.thethingsnetwork.org/forum/t/the-things-upgrade-v3-missing-field-session-dev-addr/46126/7 "2021-04-07T08:49:53Z")

</div>

Thank you Oberon. However, that’s not really an option - well, that would be a last resort anyway 🙂

I think it’s safe to say that Nick McCloud’s answer didn’t really help much, since we both hit a dead end. Is there anybody who had this problem and solved it?

---

<div class="post-metadata">

**Author:** ![descartes](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/descartes/32/47220_2.png) [@descartes](https://www.thethingsnetwork.org/forum/u/descartes)\
**Post date:** [April 7, 2021, 8:56am UTC](https://www.thethingsnetwork.org/forum/t/the-things-upgrade-v3-missing-field-session-dev-addr/46126/8 "2021-04-07T08:56:08Z")

</div>

> [@ateainsights](#):
>
> Is there anybody who had this problem and solved it?

I didn’t have the problem …

---

<div class="post-metadata">

**Author:** ![Jeff-UK](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/jeff-uk/32/35697_2.png) [@Jeff-UK](https://www.thethingsnetwork.org/forum/u/Jeff-UK)\
**Post date:** [April 7, 2021, 9:33am UTC](https://www.thethingsnetwork.org/forum/t/the-things-upgrade-v3-missing-field-session-dev-addr/46126/9 "2021-04-07T09:33:18Z")

</div>

> [@ateainsights](#):
>
> searching for the specific error does not provide any answers, but ironically just leads back to this thread.

I believe there atleast 3 other threads that call out this specific issue ( `field_mask (invalid field mask)` ) TL:DR as, like Nick, I dont have the problem!

> [@ateainsights](#):
>
> I think it’s safe to say that Nick McCloud’s answer didn’t really help much

We have no way of knowing ahead of time as we dont have same problem, atleast he had the courtecy to try and point you in right direction 😉 …sometimes there is no helping some people and little thanks for trying. 🤷‍♂️ Mods do this work voluntarily and often for little appreciation - just saying 🙂

---

<div class="post-metadata">

**Author:** ![ateainsights](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/ateainsights/32/35697_2.png) [@ateainsights](https://www.thethingsnetwork.org/forum/u/ateainsights)\
**Post date:** [April 7, 2021, 12:37pm UTC](https://www.thethingsnetwork.org/forum/t/the-things-upgrade-v3-missing-field-session-dev-addr/46126/10 "2021-04-07T12:37:45Z")

</div>

Thanks Jeff. By no means I meant to insult anybody. I was merely concluding that the suggested answer did not help.  
I am sorry if it was somehow perceived differently.

---

<div class="post-metadata">

**Author:** ![bluejedi](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/bluejedi/32/44639_2.png) [@bluejedi](https://www.thethingsnetwork.org/forum/u/bluejedi)\
**Post date:** [April 7, 2021, 1:02pm UTC](https://www.thethingsnetwork.org/forum/t/the-things-upgrade-v3-missing-field-session-dev-addr/46126/11 "2021-04-07T13:02:48Z")

</div>

> [@ateainsights](#):
>
> By no means I meant to insult anybody.

I’d like to add the following:

> [@ateainsights](#):
>
> Thank you Oberon. However, that’s not really an option - well, that would be a last resort anyway 🙂
> 
> I think it’s safe to say that Nick McCloud’s answer didn’t really help much

The above poses a remarkable contrast: You thank one user while saying his response is not really an option and then state that another user’s answer didn’t really help much (without thank you). You also mention the second user explicitly by name instead of the common @userid, while not being positive.

That is not what a positive contribution looks like.
