dedis/popstellar

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

Kaz-ookid opened this issue · 0 comments

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:
e47fa9a

Front-ends:
  • [] Fe1-Web
  • Fe2-Android Emulator
  • Not applicable
Back-ends:
  • Be1-Go
  • Be2-Scala
  • Not applicable
Environment (as applicable):
  • Device: [e.g. Pixel 5 emulator on Mac]
  • OS: [e.g. Android 11, Windows 10]
  • Browser: [e.g. Chrome 57]

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