alkem-io / server

Core server in the Alkemio platform, offering a GraphQL api for interacting with the logical domain model.
http://alkem.io
European Union Public License 1.2
24 stars 4 forks source link

BUG: When populating datа to server with enable "communications" feature, error is thrown #1347

Closed Comoque1 closed 2 years ago

Comoque1 commented 3 years ago

Describe the bug When populating datа to server with enable "communications" feature, error is thrown.

To Reproduce Steps to reproduce the behavior:

  1. Precondition: the server has "communications" feature enabled

  2. Using populator dev branch, upload "alkemio-sdgs.ods"

  3. Error is thrown, regarding rooms/communications image.png

  4. In addition, when try to query messages, error is thrown

    
    query {
    ecoverses {
    community {
      discussionRoom {
        id
        messages {
          id
          message
          sender
        }
      }
    }
    }
    }

![image.png](https://images.zenhubusercontent.com/5f5ff9fd50a1a94a1f25f32c/896baf72-9a30-4039-a5c5-4d0207ed55a2)

**Expected behavior**
When "communication" feature is enabled, user can populate data, without exceptions being thrown. User can query community messages data, with no errors.
techsmyth commented 3 years ago

I think if you were to reset the db, and then start up the server with comms enabled this issue may not happen.

Looking at the stack trace above it is the assign user to community that is failing, so the user is created ok.

Comoque1 commented 3 years ago

I think if you were to reset the db, and then start up the server with comms enabled this issue may not happen.

Looking at the stack trace above it is the assign user to community that is failing, so the user is created ok.

Will give it a try locally. Same behavior was experienced on demo env.

techsmyth commented 3 years ago

think any ecoverse / challenge / opportunity that was created without comms enabled has this issue. Should be straightforward to fix, and am pretty sure on @Enderedne radar...

techsmyth commented 3 years ago

Can you please retest this with the server-937 branch?

Comoque1 commented 3 years ago

The issue is reproducible on Test env. The error is a bit different. image.png

techsmyth commented 3 years ago

Needs a clean home server database?

Comoque1 commented 2 years ago

Not able to reproduce the issue on DEV env. Closing.