Skip to content

"Create Label Error" when adding custom label on staging #1080

Open
@JGreenlee

Description

@JGreenlee

This error occurs when adding any custom label.

It is 100% reproducible using e-mission-phone (at master) and connecting to the staging server.
However, it is not reproducible when connecting to a local instance of e-mission-server (also at master); even with e-mission-phone still at master and same config (I was using stage-study). I am perplexed by this.

The error message would suggest malformed JSON, but I inspected what the UI is sending and it looks fine:
DEBUG:About to update custom label: {"key":"mode","old_label":"","new_label":"skateboard","is_new_label_must_added":true}

Googling the error message reveals that the error occurs in iOS native code. However, I couldn't find any more details in the loggerDB logs.


On the server logs, it appears that the /customlabel/update request is initiated and immediately exits:

2024-07-25T03:33:57.480Z | 2024-07-25 03:33:57,479:DEBUG:140584710653504:START POST /customlabel/update
-- | --
2024-07-25T03:33:57.480Z | 2024-07-25 03:33:57,480:DEBUG:140584710653504:END POST /customlabel/update 0.0003833770751953125

This is what /customlabel/update should be doing:

@post('/customlabel/update')
def updateUserCustomLabel():
  logging.debug("Called updateUserCustomLabel")
  updated_label = request.json['updated_label']
  user_uuid = getUUID(request)
  user = User.fromUUID(user_uuid)
  to_return = user.updateUserCustomLabel(updated_label)
  logging.debug("Successfully updated label label for user %s" % user_uuid)
  return { 'label' : to_return }

...but not even "Called updateUserCustomLabel" gets logged out.

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