Accessing staging courses

Hi all. I am trying to download courses to test on the app. I registered for the staging server. Switched the server within the app to point to our staging server. That all seemed to work fine. But the moment I click on download courses (or manage courses) I receive the following error message: Error. Invalid username/password please try again.

I logged out and in to double check both username and password in app and registered match, and they do. So how do I get access to the courses on the staging server so I can test them?

Hi Liz,

I think I know what’s happening here… the app caches the user accounts so that users are able to login even when offline.

Since you have the same username for the live and staging servers, but different passwords, it looks like it’s picking up the user data for the live server, instead of the staging one. I’ll add a bug fix to the tech dev sprints for this.

In the meantime, the way around this will be to uninstall and reinstall the app, then set to connect to the staging server before logging in.

hope that makes sense, but let me know if you’re still having problems,
Cheers,
Alex

Hi @alex,

I’m running into similar issues trying to switch between the Ethiopia staging and live servers. I have the same user name and password for both, but if I log into the app (most recent apk), switch from the live to staging server, then try to download courses, I get the invalid un/pw message. We’ve had similar issues reported from the Ethiopia team, though they have different un/pw combos for live and staging servers.

I was able to resolve with your suggested fix so this isn’t urgent, but curious if you have thoughts on what might be happened considering my un/pw are the same for both servers? I haven’t run into this issue before when switching between live and staging servers while logged into the Academy version of the app.

Thanks,
Julie

[a few hours later] I’m able to switch easily between staging and live servers in the Academy app, without having to log out and back in or uninstalling the app. Even after confirming un/pw combos were the same for both staging and live Ethiopia servers, and uninstalling/reinstalling the app, I am unable to switch between live and staging servers in the app (still getting the same un/pw error messages)

Hi @Julie,

One issue could be that although you;re using the same un/pw, the auto-generated api-key is different. It’s the combination of the username and api-key that gets used to connect to the server api (so it;s not sending the password around all the time). This issue would happen if the accounts were created on the live and staging servers at different times (even though same un/pw has been used), and the api-key would only be the same if the staging server was an exact clone of the live user account.

This might explain the different experiences you;re having with the CHA vs ET app.

In the current sprint, there is a fix for the issue Liz originally raised for when the user has different passwords (see: https://oppia.atlassian.net/browse/OPPIA-518), but this isn’t quite the same issue as you’re having.

But this fix should sort out the slightly misleading message that the un/pw is incorrect, as actually it;s the username and api-key combination that is incorrect.

One option/change we could make is that if you change the server that you’re connecting to, you;re automatically logged out of the app and need to log in again. That actually might be a better thing to do?

Cheers,
Alex