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

[$250] iOS Hybrid - Lack of debug mode in the settings - Troubleshoot for IOS Hybrid app #50843

Closed
1 of 6 tasks
lanitochka17 opened this issue Oct 15, 2024 · 34 comments
Closed
1 of 6 tasks
Assignees
Labels
Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor Help Wanted Apply this label when an issue is open to proposals by contributors Reviewing Has a PR in review

Comments

@lanitochka17
Copy link

lanitochka17 commented Oct 15, 2024

If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!


Version Number: 9.0.49-0
Reproducible in staging?: Y
Reproducible in production?: Y
If this was caught during regression testing, add the test name, ID and link from TestRail: N/A
Email or phone of affected tester (no customers): [email protected]
Issue reported by: Applause - Internal Team

Issue found when executing PR #50519

Action Performed:

  1. Open the Expenisfy Hybrid app
  2. Sign into a valid account and access the ND features within the app
  3. Go to Account section > Troubleshoot > Scroll down

Expected Result:

User expects to see the Debug option

Actual Result:

No Debug option is shown

Workaround:

Unknown

Platforms:

Which of our officially supported platforms is this issue occurring on?

  • Android: Native
  • Android: mWeb Chrome
  • iOS: Native
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

Add any screenshot/video evidence
Bug6635787_1729028252122.No_Debug_option_in_Troubleshoot_menu_.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021846335027010160243
  • Upwork Job ID: 1846335027010160243
  • Last Price Increase: 2024-10-29
Issue OwnerCurrent Issue Owner: @situchan
@lanitochka17 lanitochka17 added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Oct 15, 2024
Copy link

melvin-bot bot commented Oct 15, 2024

Triggered auto assignment to @greg-schroeder (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.

@lanitochka17
Copy link
Author

@greg-schroeder FYI I haven't added the External label as I wasn't 100% sure about this issue. Please take a look and add the label if you agree it's a bug and can be handled by external contributors

@greg-schroeder greg-schroeder added the External Added to denote the issue can be worked on by a contributor label Oct 15, 2024
Copy link

melvin-bot bot commented Oct 15, 2024

Job added to Upwork: https://www.upwork.com/jobs/~021846335027010160243

@melvin-bot melvin-bot bot changed the title iOS Hybrid - Lack of debug mode in the settings - Troubleshoot for IOS Hybrid app [$250] iOS Hybrid - Lack of debug mode in the settings - Troubleshoot for IOS Hybrid app Oct 15, 2024
@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Oct 15, 2024
Copy link

melvin-bot bot commented Oct 15, 2024

Triggered auto assignment to Contributor-plus team member for initial proposal review - @situchan (External)

@layacat
Copy link
Contributor

layacat commented Oct 16, 2024

Proposal

Please re-state the problem that we are trying to solve in this issue.

Lack of debug mode in the settings - Troubleshoot for IOS Hybrid app

What is the root cause of that problem?

We always return Production for HybridAppModule here:

if (NativeModules.HybridAppModule) {
environment = CONST.ENVIRONMENT.PRODUCTION;
return;
}

That's the RCA.

What changes do you think we should make in order to solve the problem?

We should remove this block of code:

 if (NativeModules.HybridAppModule) { 
     environment = CONST.ENVIRONMENT.PRODUCTION; 
     return; 
 } 

What alternative solutions did you explore? (Optional)

N/A
Reminder: Please use plain English, be brief and avoid jargon. Feel free to use images, charts or pseudo-code if necessary. Do not post large multi-line diffs or write walls of text. Do not create PRs unless you have been hired for this job.

@situchan
Copy link
Contributor

can we allow debug mode in hybrid app?
tagging hybrid app experts: @AndrewGable @staszekscp @mateuuszzzzz

@AndrewGable
Copy link
Contributor

I believe we can, but let's confirm with @staszekscp and @mateuuszzzzz

@situchan
Copy link
Contributor

// If we don't use Development, and we're in the HybridApp, we should use Production
if (NativeModules.HybridAppModule) {
environment = CONST.ENVIRONMENT.PRODUCTION;
return;
}

@staszekscp @AndrewGable are we fine to remove this block, which reverts this PR?

@staszekscp
Copy link
Contributor

@situchan We'll have to remove this code in order to fix the issue, but I think we'll have to do one more thing on the OldDot side of things to make it work correctly, I'll come back to you with an update

@staszekscp
Copy link
Contributor

So, I'm back with an update 😄 On the Mobile-Expensify side, we'll have to link a Native Module called EnvironmentChecker, which is an easy fix. Combining it with removal of the code mentioned here should fix iOS.

Nevertheless we'll have a problem with Android. Currently we base our beta check on this line: https://github.com/Expensify/App/blob/main/src/libs/Environment/betaChecker/index.android.ts#L27. We get the latest release tag, and compare it with the version in package.json. If the versions match, we're on production, if the one in package.json is higher, we're on a beta build.

The problem is that the HybridApp's production version is different than the release NewDot version. Eg. currently we're on 9.0.47 on HybridApp, and 9.0.51 on NewDot. We cannot simply swap CONST.GITHUB_RELEASE_URL value to the Mobile-Expensify url, because it's not a public repo, and AFAIK would require additional authentication. Maybe we could create some dummy public repo that would keep that information only for HybridApp version so the only thing we have to do on the NewDot side is to swap a url? Or maybe to have some API endpoint to check the release version?

cc: @Julesssss

@Julesssss
Copy link
Contributor

Julesssss commented Oct 22, 2024

Thanks for the detailed explanation. I wonder why the debug tool is restricted by version instead of email, internal beta, etc... It seems necessarily complex, and restricts us from debugging prod. Though I suppose with external contributors its better to keep access open rather than locked down...

What if we locked the beta tools behind a hidden menu? For example, 8 taps of the version code could set an Onyx key that unlocks the debug menu.

One bad alternative might be to query the Google Play Store API and provide the Mobile-Expensify version via a backend command, though I recall the API being pretty bad and undocumented...

@staszekscp
Copy link
Contributor

Yep, as far as I know there is no reliable way to check if a specific build is an Android Play Store Beta build 😢 I suppose that's the reason why the whole version checker tool has been implemented. I'd like to keep using this mechanism in order to introduce less changes on the NewDot side - the hidden menu may expose some options to regular users, that we would like to keep unavailable 😄 I'm not familiar with the whole debugging tools code, but we would have to revise it thoroughly first

Maybe we could change the release tag logic on GitHub so it would match only the HybridApp version, since we're going to deprecate NewDot in the nearest future?

Copy link

melvin-bot bot commented Oct 22, 2024

📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸

@AndrewGable
Copy link
Contributor

I think we are planning on having them be in sync, but we need to change some processes internally before we can do so.

@staszekscp
Copy link
Contributor

In this case should we wait until it's changed? I suppose we could easily enable debug mode for iOS (since it's based on a TestFlight link, not the version in package.json), and have it disabled for Android until we have releases of both repos in sync

@Julesssss
Copy link
Contributor

It could be a while though. I would vote for simplify access to the HybridApp debug tools in the meantime.

@AndrewGable
Copy link
Contributor

@puneetlath - Do you think we could solve this in a different way than looking at the versioning for the time being? Maybe we can include the debug tools for certain domains using the beta manager?

@Julesssss
Copy link
Contributor

One concern about a beta is that it'll be a barrier that might prevent users/qa from providing logs due to the extra step. Also we'll have to constantly be adding contributors to the beta.

@AndrewGable
Copy link
Contributor

Do you have any ideas for alternative solutions? My thought was we could use Beta manager as an additional way to add SWM + Callstack + Expensify domains to the beta manager for those who use HybridApp. Not necessarily just use beta manager exclusively.

@puneetlath
Copy link
Contributor

Perhaps we can just make it available via the four-finger-tap/cmd+d on production. That way there's still a way to get to it on Android. Or if we ever wanted someone to on production for whatever reason.

@Julesssss
Copy link
Contributor

Julesssss commented Oct 23, 2024

...For example, 8 taps of the version code could set an Onyx key that unlocks the debug menu.

I think 4 finger tap or unlocking the menu item after x taps are both good simple solutions. I don't think we should care about users accidentally discovering these tools (granted with the open repo, its pretty easy for users to discover if they really wanted to).

@AndrewGable
Copy link
Contributor

Perhaps we can just make it available via the four-finger-tap/cmd+d on production

I like this 👍

@puneetlath
Copy link
Contributor

I agree with that @Julesssss

@staszekscp
Copy link
Contributor

Ok, cool! In that case the implementation will be HybridApp agnostic, and it can be done entirely on standalone NewDot. I suppose this kind of work will require some proposal, and general agreement on the solution, so I'll try to find someone on our side to take care of it! 😄

@melvin-bot melvin-bot bot added the Overdue label Oct 24, 2024
@Julesssss
Copy link
Contributor

Sounds good @staszekscp, let's open a new issue rather than modifying this one. Let me know when you find someone to work on the task and I'll create one for you.

@blazejkustra
Copy link
Contributor

blazejkustra commented Oct 24, 2024

Hey @Julesssss! I'm going to work on it. Tag me in the issue, and I'll start tomorrow morning 😄

@Julesssss
Copy link
Contributor

Hey @blazejkustra could you comment here and I'll assign you, thanks!

@Julesssss Julesssss self-assigned this Oct 24, 2024
@melvin-bot melvin-bot bot removed the Overdue label Oct 24, 2024
Copy link

melvin-bot bot commented Oct 29, 2024

📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸

@melvin-bot melvin-bot bot added the Overdue label Oct 29, 2024
@greg-schroeder
Copy link
Contributor

Okay I'm a bit confused on this one - who is going to take this one on? Or are we still waiting for a valid proposal?

@melvin-bot melvin-bot bot removed the Overdue label Oct 29, 2024
@Julesssss Julesssss added the Reviewing Has a PR in review label Oct 29, 2024
@Julesssss
Copy link
Contributor

I think we can close this once this issue is completed (its awaiting testing on prod)

@greg-schroeder
Copy link
Contributor

greg-schroeder commented Nov 1, 2024

Held til 2024-11-07

Copy link

melvin-bot bot commented Nov 5, 2024

@Julesssss, @greg-schroeder, @situchan Whoops! This issue is 2 days overdue. Let's get this updated quick!

@Julesssss
Copy link
Contributor

Still held

@Julesssss
Copy link
Contributor

The linked issue is closed. We didn't end up needing C+ review here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor Help Wanted Apply this label when an issue is open to proposals by contributors Reviewing Has a PR in review
Projects
Development

No branches or pull requests

9 participants