Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use ROOT/api to avoid ngrok problems #8049

Merged

Conversation

kidroca
Copy link
Contributor

@kidroca kidroca commented Mar 8, 2022

@marcaaron
Would this change resolve the ngrok problem?

Details

Trying to keep the same NetInfo config for dev and prod so that offline mode is detected the same way on both

Fixed Issues

$ #8043 (comment)

Tests

  1. verify internet reachability url is used and the request is receiving response (when online)

    1. open dev tools
    2. refresh page
    3. there should be a request triggered by internetReachability.js
    4. It should be using the URL in the NetInfo.configure ROOT/api
    5. It should be completing successfully and the app should be considered online
  2. using together with ngrok should work

  3. turning off network (airplane mode) should still correctly detect that you're offline

PR Review Checklist

Contributor (PR Author) Checklist

  • I verified the PR has a small number of commits behind main
  • I linked the correct issue in the ### Fixed Issues section above
  • I wrote clear testing steps that cover the changes made in this PR
    • I clearly indicated the environment tests should be run in (Staging vs Production)
  • I wrote testing steps that cover success & fail scenarios (if applicable)
  • I included screenshots or videos for tests on all platforms
  • I ran the tests & verify they passed on:
    • iOS / native
    • Android / native
    • iOS / Safari
    • Android / Chrome
    • MacOS / Chrome
    • MacOS / Desktop
  • I verified there are no console errors related to changes in this PR
  • I followed proper code patterns (see Reviewing the code)
    • I added comments when the code was not self explanatory
    • I put all copy / text shown in the product in all src/languages/* files (if applicable)
    • I followed proper naming convention for platform-specific files (if applicable)
    • I followed style guidelines (in Styling.md) for all style edits I made
    • I followed the JSDocs style guidelines (in STYLE.md)
  • I followed the guidelines as stated in the Review Guidelines
  • I tested other components that can be impacted by my changes (i.e. if the PR modifies a shared library or component like Avatar, I verified the components using Avatar are working as expected)
  • I corroborated the UI performance was not affected (the performance is the same than main branch)
  • If I created a new component I verified that a similar component doesn't exist in the codebase

QA Steps

Try to simulate very poor or no network conditions

  • Test network connection being correctly detected as offline
  • Test network connection being correctly detected as online

Screenshots

Web

Screenshot 2022-03-09 at 1 45 48

Mobile Web

Desktop

Screenshot 2022-03-09 at 3 04 34

iOS

Android

@marcaaron
Copy link
Contributor

yep, works well on dev. Nice !

@kidroca kidroca marked this pull request as ready for review March 9, 2022 01:10
@kidroca kidroca requested a review from a team as a code owner March 9, 2022 01:10
@MelvinBot MelvinBot requested review from marcochavezf and removed request for a team March 9, 2022 01:11
@kidroca
Copy link
Contributor Author

kidroca commented Mar 9, 2022

Not sure whether I'm supposed to check all the boxes for this PR, but if I do I can continue tomorrow

Copy link
Contributor

@luacmartins luacmartins left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the fix!

@marcaaron marcaaron merged commit 3c40247 into Expensify:main Mar 9, 2022
@OSBotify
Copy link
Contributor

OSBotify commented Mar 9, 2022

✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release.

@kidroca kidroca deleted the kidroca/fix/network-connection-local branch March 9, 2022 20:43
@OSBotify
Copy link
Contributor

🚀 Deployed to staging by @marcaaron in version: 1.1.42-0 🚀

platform result
🤖 android 🤖 success ✅
🖥 desktop 🖥 success ✅
🍎 iOS 🍎 success ✅
🕸 web 🕸 success ✅

@OSBotify
Copy link
Contributor

🚀 Deployed to production by @chiragsalian in version: 1.1.42-6 🚀

platform result
🤖 android 🤖 success ✅
🖥 desktop 🖥 success ✅
🍎 iOS 🍎 success ✅
🕸 web 🕸 success ✅

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants