Landry333 / Big-Owl

soen 490 project
2 stars 2 forks source link

BUG-278: Accepting invitation request crashes the app #278

Closed ShawnGuerra-Bautista closed 3 years ago

ShawnGuerra-Bautista commented 3 years ago

Related Issue(s):

52

Relevant File(s):

SignUpPageActivity.java

Describe the bug:

When accepting a group invitation request, the app will crash.

The reason behind this is because, in the database, the memberGroupIdList is null instead of empty when a user is new to the app. So, when the app tries to add the user to a group, it will call something like null.add(group) which crashes the app.

To Reproduce:

Steps to reproduce the behavior:

  1. Create a new user (let's call them user_1)
  2. From another account (user_2), invite user_1 into its group
  3. From user_1's account, accept their invitation
  4. App crashes

Expected behavior

User_1 should be added to user_2's group successfully.