App icon indicating copy to clipboard operation
App copied to clipboard

[$250] iOS - Troubleshoot- The "Client side logging" toggle is automatically turned off

Open vincdargento opened this issue 1 year ago โ€ข 5 comments

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.72-0 Reproducible in staging?: Yes Reproducible in production?: Yes If this was caught on HybridApp, is this reproducible on New Expensify Standalone?: Yes, reproducible on both 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): N/A Issue reported by: Applause Internal Team

Action Performed:

  1. Launch the app
  2. Navigate to the Troubleshoot in the Settings
  3. Turn on the Client side logging toggle
  4. Tap the View debug console button
  5. Tap the Share log button
  6. Select the chat and send a log
  7. Return the Troubleshoot

Expected Result:

The "Client side logging" toggle is turned on.

Actual Result:

After sharing a log, the "Client side logging" toggle is automatically turned off and can't be toggled on by the first try.

Workaround:

Unknown

Platforms:

  • [ ] Android: Standalone
  • [ ] Android: HybridApp
  • [ ] Android: mWeb Chrome
  • [x] iOS: Standalone
  • [x] iOS: HybridApp
  • [ ] iOS: mWeb Safari
  • [ ] MacOS: Chrome / Safari
  • [ ] MacOS: Desktop

Screenshots/Videos

https://github.com/user-attachments/assets/65929546-fcaf-4e75-9c9e-465cf3d310b5

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021866259215454556892
  • Upwork Job ID: 1866259215454556892
  • Last Price Increase: 2024-12-09
Issue OwnerCurrent Issue Owner: @getusha

vincdargento avatar Dec 06 '24 16:12 vincdargento

Triggered auto assignment to @Christinadobrzyn (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.

melvin-bot[bot] avatar Dec 06 '24 16:12 melvin-bot[bot]

Proposal

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

The client side logging toggle is switched off again after sharing the log.

What is the root cause of that problem?

This is similar to https://github.com/Expensify/App/pull/50554. Based on the PR explanation, the style on the UI thread is lost. This happens when our FreezeWrapper freezes the screen. https://github.com/Expensify/App/blob/b595f5d24141a403fcc3f44c73d00cd6951dca7d/src/components/withPrepareCentralPaneScreen/index.native.tsx#L4-L10

In our case, the switch depends on the offsetX shared value to animate the style using useAnimatedStyle. https://github.com/Expensify/App/blob/b595f5d24141a403fcc3f44c73d00cd6951dca7d/src/components/Switch.tsx#L38-L61

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

I think this is best to be fixed on the reanimated repo, but in case we want to fix it on our app, we can toggle the offsetX value on/off every time the screen is unfrozen. react-freeze uses Suspense which based on the doc, it will trigger useLayoutEffect when unsuspended.

useLayoutEffect(() => {
    offsetX.set(!isOn ? OFFSET_X.ON : OFFSET_X.OFF);
    offsetX.set(isOn ? OFFSET_X.ON : OFFSET_X.OFF);
}, []);

What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?

N/A

bernhardoj avatar Dec 07 '24 05:12 bernhardoj

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

melvin-bot[bot] avatar Dec 09 '24 23:12 melvin-bot[bot]

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

melvin-bot[bot] avatar Dec 09 '24 23:12 melvin-bot[bot]

Oh interesting! I think this should be fixed so adding an External label

Christinadobrzyn avatar Dec 09 '24 23:12 Christinadobrzyn

waiting for proposals

Christinadobrzyn avatar Dec 10 '24 15:12 Christinadobrzyn

Just a heads up that I'm going to be ooo Dec 12 - 13th. Back on Monday 16th. I'm not going to assign this to a BZ teammate but if anything is urgent, please reach out to the team for a volunteer.

Christinadobrzyn avatar Dec 11 '24 17:12 Christinadobrzyn

Oh, we have a proposal! @getusha can you please review?

Christinadobrzyn avatar Dec 11 '24 17:12 Christinadobrzyn

@Christinadobrzyn could we get someone from Software Mansion to have a look on this? seems like something we would want to fix in react-native-reanimated library

getusha avatar Dec 12 '24 12:12 getusha

yep! asking - https://expensify.slack.com/archives/C04878MDF34/p1734105460130609

Christinadobrzyn avatar Dec 13 '24 15:12 Christinadobrzyn

@Christinadobrzyn, @getusha Whoops! This issue is 2 days overdue. Let's get this updated quick!

melvin-bot[bot] avatar Dec 16 '24 09:12 melvin-bot[bot]

Hi I'm Zuza from Software Mansion, and I will take care of this issue ๐Ÿ˜Š

zfurtak avatar Dec 16 '24 11:12 zfurtak

Thanks for your help @zfurtak - I've added you to this issue. Feel free to reach out with any questions!

Christinadobrzyn avatar Dec 16 '24 15:12 Christinadobrzyn

Just a note for Melvin - We're working on a PR

Christinadobrzyn avatar Dec 17 '24 21:12 Christinadobrzyn

Little update from me, as indeed this bug seems to appear in external library I'm consulting it with people from swm who are maintaining react-native-reanimated and react-freeze ๐Ÿ˜Š

zfurtak avatar Dec 18 '24 19:12 zfurtak

@Christinadobrzyn @getusha @zfurtak this issue was created 2 weeks ago. Are we close to approving a proposal? If not, what's blocking us from getting this issue assigned? Don't hesitate to create a thread in #expensify-open-source to align faster in real time. Thanks!

melvin-bot[bot] avatar Dec 20 '24 09:12 melvin-bot[bot]

Hi @zfurtak just checking to see if you have an update for us. Thank you!

Christinadobrzyn avatar Dec 23 '24 16:12 Christinadobrzyn

@Christinadobrzyn, @getusha, @zfurtak Eep! 4 days overdue now. Issues have feelings too...

melvin-bot[bot] avatar Dec 24 '24 09:12 melvin-bot[bot]

Just a heads up that I'm going to be ooo until Dec 30th. I'm not going to assign this to a BZ teammate but if anything is urgent, please reach out to the team for a volunteer.

Christinadobrzyn avatar Dec 24 '24 16:12 Christinadobrzyn

So far I didn't find the best solution and fyi I will be ooo until 10th January

zfurtak avatar Dec 25 '24 23:12 zfurtak

Okay thanks for the update @zfurtak - I think we can keep this assigned for now since most of SWM is gone until that time.

I'll set to weekly and return back to daily when you're back

Christinadobrzyn avatar Dec 28 '24 18:12 Christinadobrzyn

@Christinadobrzyn @getusha @zfurtak this issue is now 4 weeks old, please consider:

  • Finding a contributor to fix the bug
  • Closing the issue if BZ has been unable to add the issue to a VIP or Wave project
  • If you have any questions, don't hesitate to start a discussion in #expensify-open-source

Thanks!

melvin-bot[bot] avatar Jan 03 '25 09:01 melvin-bot[bot]

I think we're good Melvin - @zfurtak is ooo until Jan 10th, I think we're going to stick with them as the contributor for this job so we'll continue when they are back.

Christinadobrzyn avatar Jan 03 '25 21:01 Christinadobrzyn

This is on hold for now but will be worked on by @zfurtak soon!

Christinadobrzyn avatar Jan 09 '25 00:01 Christinadobrzyn

I will continue working on it on Monday ๐Ÿ˜Š

zfurtak avatar Jan 10 '25 18:01 zfurtak

Hi, sorry but due to other issues I wasn't able to work on this one, I'm ooo until Wednesday but if it's any rush I can ask my colleagues from SWM to look at it.

zfurtak avatar Jan 16 '25 19:01 zfurtak

I think if there is someone who can take this @zfurtak that might be good since it's been pending for over a month now. Let us know if you find someone!

Christinadobrzyn avatar Jan 16 '25 23:01 Christinadobrzyn

actually, @zfurtak are you back now? Let me know if you're available to continue with this.

Christinadobrzyn avatar Jan 23 '25 01:01 Christinadobrzyn

Nudge @zfurtak are you able to grab this again?

Christinadobrzyn avatar Jan 29 '25 00:01 Christinadobrzyn

Yes sure! I can continue, sorry for the delay...

zfurtak avatar Jan 29 '25 13:01 zfurtak