Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FwLiteWeb creating new sense has entryId "" (empty string), which .NET refuses to parse as a GUID #1363

Closed
rmunn opened this issue Jan 10, 2025 · 2 comments · Fixed by #1359
Labels
bug Something isn't working 💻 FW Lite issues related to the fw lite application, not miniLcm or crdt related

Comments

@rmunn
Copy link
Contributor

rmunn commented Jan 10, 2025

Describe the bug
Creating a new sense in an example FwLite project ends up with:

Error: System.Text.Json.JsonException: The JSON value could not be converted to System.Guid. Path: $.senses[0].entryId | LineNumber: 0 | BytePositionInLine: 196.

The JSON in question includes Senses[0] as { id: "00000000-0000-0000-0000-df85dbc25d08", entryId: "", definition: {…}, … } - note entryId being an empty string.

To Reproduce
Steps to reproduce the behavior:

  1. Run task fw-lite-web
  2. Create new example project
  3. Create new sense in first entry
  4. Edit definition field, tab out
  5. See error

Expected behavior
A missing entryId would be serialized as null rather than an empty string, or the C# backend code would handle the empty string as a special case in deserializing GUIDs and replace it with either null (for a nullable GUID property) or Guid.Empty (for a non-nullable GUID property).

@rmunn rmunn added bug Something isn't working 💻 FW Lite issues related to the fw lite application, not miniLcm or crdt related labels Jan 10, 2025
@hahn-kev
Copy link
Collaborator

@myieye this looks like it's caused by code in defaultSense (and probably example) in lib/utls.ts we also have some empty id stuff which doesn't look like it's being used anymore, but I don't remember what that was doing. In this case it would make sense to make an empty id constant and use that to solve this bug, but we are calling something else an empty id already.

@hahn-kev
Copy link
Collaborator

strike that, this will be closed by #1359

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working 💻 FW Lite issues related to the fw lite application, not miniLcm or crdt related
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants