janoodleFTW / timy-messenger

Timy - open source mobile app for groups to communicate and organize themselves. Built with flutter.
Apache License 2.0
2.08k stars 464 forks source link

Cannot support 2 or more groups #42

Open yiutsunchan opened 4 years ago

yiutsunchan commented 4 years ago

Please help

I tried to create more than 1 group to the firebase via the "group-create.js" script The app show this error. Screenshot 2020-05-25 at 2 37 45 AM

Here is the error

════════ Exception caught by widgets library ═══════════════════════════════════ The following NoSuchMethodError was thrown building StoreConnector<AppState, ChannelScreenViewModel>(dependencies: [StoreProvider]): The getter 'authorId' was called on null. Receiver: null Tried calling: authorId

The relevant error-causing widget was StoreConnector<AppState, ChannelScreenViewModel> lib/…/channel/channel_screen.dart:19 When the exception was thrown, this was the stack

0 Object.noSuchMethod (dart:core-patch/object_patch.dart:53:5)

1 ChannelScreenViewModel.fromStore.

package:circles_app/…/channel/channel_screen_viewmodel.dart:42

2 ChannelScreenViewModelBuilder.update

package:circles_app/…/channel/channel_screen_viewmodel.g.dart:172

3 new _$ChannelScreenViewModel

package:circles_app/…/channel/channel_screen_viewmodel.g.dart:27

4 ChannelScreenViewModel.fromStore

package:circles_app/…/channel/channel_screen_viewmodel.dart:40 ...

xJon commented 4 years ago

Pretty sure this is unimplemented by them, but you can create another group with: Firestore.instance.collection('groups').add({<Map>})

yiutsunchan commented 4 years ago

@xJon Agreed that they haven't implemented the "Create Group" UI within the app. However, I used the script "group-create.js" to create 2 groups and the app crash because of this.

xJon commented 4 years ago

I'm not sure whether the script was intended for that; I'm not an expect in JavaScript nor did I read the script itself, but I do know that it's rather simple to add a new group with the code I quoted above.

Pssu1420 commented 4 years ago

@yiutsunchan did you find a solution?