dedis / popstellar

Proof-of-personhood System
GNU Affero General Public License v3.0
35 stars 8 forks source link

[BUG] Emulator Cannot Communicate with Servers After Re-building the App #1926

Open Kaz-ookid opened 2 months ago

Kaz-ookid commented 2 months ago

Description (Actual behavior)

When using an emulator on Android Studio and joining/creating a LAO , we can use the app freely : join roll calls, send chirps, coins, etc... When going to Invite section, the server address it the actual one of the server.

If you re-build the app using Run 'app' button (basically just running the App), you can reconnect to the LAO, but in the invite section the server address has changed to "ws://10.0.2.2:9000/client". Also, you are not receiving any updates for the LAO (like new chirps in the feed), and can't send anything (like sending coins, chirp, etc) : it always results in a timeout.

This issue might be normal given the specifications of the app, but since I am unaware of these, I prefer to document this bug. Maybe it highlights an actual problem with the app. Also, this issue is only happening since recently, I'd say a month from now.

Expected behavior

When re-running the App on an emulator, previous LAOs should be usable : server should communicate updates, and let us send updates.

How to reproduce

  1. Run the App in an emulator instance
  2. Create a LAO, or join one, and use it
  3. Go to Invite section and see the right server address
  4. Re-run the App (rebuilding it), for example by using the dedicated Run button in the IDE.
  5. Go to Invite section, see the wrong address : "ws://10.0.2.2:9000/client"
  6. Try so use the app through the LAO : send chirps, see new chirps coming in, send coins...

Version & Environment

This bug was reproduced on: https://github.com/dedis/popstellar/commit/e47fa9acd0045b71e4db8057dbaee4aac6025011

Front-ends:
Back-ends:
Environment (as applicable):

Impact

Very high : slows down testing and dev drastically... Need to re-create LAOs, rejoin, re-run roll calls, re-scan/input manually after EACH changes to test the app again.

Possible root cause

No idea

Screenshots

image