WildAid / o-fish-ios

iOS app for the Officer's Fishery Information Sharing Hub (O-FISH). The mobile app allows fisheries officers to document and share critical information gathered during a routine vessel inspection.
Apache License 2.0
33 stars 15 forks source link

Test Account or Service? #352

Closed bladebunny closed 3 years ago

bladebunny commented 3 years ago

I'd love to contribute but was not able to successfully configure the Realm component. I spent over an hour creating and then configuring a MongoDB account. Then tried following the Realm instructions but to no avail. I'm sure the instructions make sense to those already working on the project but coming with little or no MongoDB and Realm experience, I found them insufficient to get me set-up.

Most of the set-up seems specifically to onboard people to have a testable back-end. I would suggest setting up a back-end that contributors could use without having to create MongoDB accounts and go through all the additional setup - especially where the contributor only needs to work on a UI feature. I've worked on many apps where we added, for example, debug only settings to allow the developer to switch back-ends in dev to facilitate/expedite dev work and/or test back-ends in a given known state.

Just my two cents. Thank you for opening the project to outside contributors and I'm sorry I wasn't able to help out. I can only spend so much time trying to get a discretionary project working before I have to move on to something else.

Sheeri commented 3 years ago

Hi @bladebunny - I'm sorry you had so much trouble!

We do have a sandbox setup that anyone can use - As per the readme: "To build and use the app, you must first create and configure your serverless backend application using the WildAid O-FISH MongoDB Realm repo. Or you can easily get a login to the existing sandbox environment."

Getting a login to the sandbox environment is filling out a simple form - https://bit.ly/ofishsandbox - and the realm-app-id is at the bottom of that docs page.

I would like to know what errors you encountered so we can work on fixing them....also, how can we make the link to the sandbox environment more visible?

bladebunny commented 3 years ago

I did know about the sandbox, thanks, and signed up for that as well after failing to create my own instance. Maybe I missed something but it didn't look as though it had the o-fish demo/sample data I'd need.

As far as setup, challenges: 1) I lost time getting MongoDB setup because I picked a West Coast server (where I am) not realizing it didn't support choosing the required older version of mongo. 2) After figuring out above and successfully configuring MongoDB, I cloned the Realm sample data directory and attempted to complete the Realm steps. Those steps weren't always clear 'where' I should be - in the XCode project or the Realm data directory - but in any case I made the changes to the relevant configuration files but the Realm commands didn't work. Sorry I can't recall the specific errors. I did follow the steps in terms of configuring Realm on the server and generating the public/private keys. I know that the mongo terminal command to link or add my account worked. I don't recall if there was a similar Realm command to add the account or just generate Realm files but at any rate none of the Realm commands after updating the Realm data directory config files worked.

I'm sorry I can't remember the specifics better. I should have logged an issue then but by that point I was a bit frustrated and just decided to move on.

Sheeri commented 3 years ago

Hi @bladebunny - thanks for what you remember about the setup - that will definitely help.

The sandbox replaces the 'build your own environment' - all the data and realm code is already in the sandbox app. You can build the app by using the realm-app-id of wildaidsandbox-mxgfy - it will build successfully. You will need a login, which is what the form at https://wildaidsandbox-mxgfy.mongodbstitch.com/#/users/new_dev_user is for. We tried to make it super simple!

(If there's a way to make it more clear that all you need is to fill out the form, and use the realm-app-id in the configuration file when you build, we will be happy to change that!)

bladebunny commented 3 years ago

Thanks @Sheeri. I'll take another look and see if I can build and use with the sandbox. Will try to pick up some bugs if so!

bladebunny commented 3 years ago

Follow-up. I signed in to the web view for my test agency and I don't see any data.

Sheeri commented 3 years ago

Hi @bladebunny - looks like your test agency was created before we automatically added data to new agencies. I have added data, can you check now?

Sheeri commented 3 years ago

(I see the data, it looks like there's a bug in the web ui that isn't showing the form menu data....will investigate if that's in the code or just this particular build).

bladebunny commented 3 years ago

I definitely see some data now. TBH I'm not sure what I'm looking at/for but there's data there.