App: [Regression test required] [$500] HIGH: Add `Avatar > About > Troubleshooting` section
Strategy: A billion users means a billion problems. To diagnose and solve them at scale, we capture client-side logs and upload centrally.
Problem: Some problems can’t be diagnosed cleanly after the fact from the logs, for a few reasons:
- External contributors don’t have access to production logs.
- Internal engineers do have production access, but they’re often cumbersome to access.
- The logs are often ambiguous, such as if you have multiple devices connected and tabs open at the same time – reverse engineering what happened for a particular client is confusing and time consuming.
- Observing logs in realtime is cumbersome or sometimes impossible, which slows down and complicates testing.
- Even if you have all the access you need, when talking with a user sometimes it’s difficult to find the logs specific to them.
Solution: Let’s expand our ability to remotely diagnose production devices with better dev tools built into the app itself. Specifically:
- Add a
Troubleshootingsection to theAvatar > Aboutpage, just aboveReport a bug- This will always be available, both on staging and production builds
- Move the following
Test preferencessettings into this new menu:- Use staging server
- Force offline
- Simulate failing network requests
- Authentication status: Invalidate
- Device credentials: Destroy
- Add
Reset and refresh, which wipes Onyx clean except for the minimum needed to call OpenApp (so you don’t need to reauthenticate) - Add
View consolewhich opens a simple console:- This would first open up and initialize with all locally stored logs, so you can scroll back and see what happened
- It would also append new logs in realtime
- There would also be a
Savebutton that just copies all available logs into a text file that is saved on the device - Add a
Sharebutton that brings up aSearchselector and just posts the logs into the selected room (and then leaves the user navigated there, so they can talk about them). I’m imagining this would be useful for chatting with a real world user and asking them to do something and send you the logs. - At the bottom is a command line that works similar to the Chrome console, where you can execute arbitrary JavaScript, with the results output to the console
This is blocking https://github.com/Expensify/App/issues/33040.
Upwork Automation - Do Not Edit
- Upwork Job URL: https://www.upwork.com/jobs/~01c2a08b8b8ae90e21
- Upwork Job ID: 1744202378047897600
- Last Price Increase: 2024-01-15
- Automatic offers:
- fedirjh | Reviewer | 28115102
About this issue
- Original URL
- State: closed
- Created 6 months ago
- Comments: 138 (100 by maintainers)
Here’s my take on the console screen. A few notes:
Keen on @Expensify/design thoughts
Oh interesting, I happened several times yesterday, and according to the logs it wasn’t coming from a local environment. I will report again if the alert pops up again, thanks!
Both Troubleshooting page and Debug console page are merged now 🎉 However they are currently displayed in an RHP, wondering if they should follow the new design and be displayed in full screen navigator? Could we get an input from someone from design team? cc @fedirjh @techievivek
100% with you on Mono font. I thought about it but was unsure if we even had access to it in the app. So glad you brought this up ❤️ Updated mocks with mono font:
Works nicely, thank you! 👍
Please submit proposals, especially for how you intend to do the console feature. The more detail you provide, the greater likelihood we select your proposal.
On Sun, Jan 7, 2024, 7:57 PM Antony Kithinzi @.***> wrote:
Regression Test Proposal
Test 1 :
Test 2 :
Ahh yes. How quickly I forget. Thanks 😂
@techievivek Yes, that’s a possibility too. In such a case, should we consider logging out the user?
Displaying an alert seems friendlier. I’m curious about the @Expensify/design team’s thoughts on this.
@fedirjh
Given that the app will become unusable, I think we can enable this option only for online users. Otherwise, if they are on a bad connection, we might end up making the App unusable for them.
Today I was able to implement sharing txt file with users on iOS:
https://github.com/Expensify/App/assets/13985840/6ee12393-46be-4132-a2c0-0b9e62e99b61
I still have to do some debugging on Android, as i am getting “Unexpected error” when trying to upload a file. Still need to work on Web/desktop implementation as I cannot use a filesystem there, trying to figure out how to achieve the same result with Blob
I have also added a flag in Onyx that determines if the logs should be collected. By default it’s false, and it’s set to true when user opens up the Debug console for the first time. Happy to discuss more improvements in this area, as we have to make sure the file does not exceed 24mbs.
@techievivek
Discussed it lately here, however it’s hard to decide what interval should we take here. My main concern is: the longer interval, the bigger possibility we could excess the 24 mb limit of the attachment file.
Recently I discovered logs are being sent to the server (via Logger from expensify-common package) and I am wondering if we could access those logs so we could avoid keeping the historic data on the device.
@shawnborton @dannymcclain @dubielzyk-expensify button styles updated ✅ once we have it merged this style will apply globally
Yep, what Shawn and Danny said. Also worth mentioning that the logs area is the only area that should scale:
Definitely. Those buttons should look like Jon’s mock.
It should always be center-aligned as far as I know… cc @Expensify/design for additional thoughts though.
Curious what @quinthar thinks about your questions, I’m not too sure how to answer them.
OMG YES DO IT!
Look great! Hear me out, would the console be a good spot to bring in
Expensify Mono?? Just ignore if you think it’s unnecessary—you know me, always trying to find uses forExMono🙃sounds great to me @LLPeckham 👍 Thank you!
For sure I can help
Got it, thanks for clarifying. I could see where a small alert dialog would work in that case, which exists as an existing pattern (for instance, try to delete an outstanding money request and you will see the confirmation modal). Curious if @quinthar agrees though!
Got it. I think this is fine, especially if we have the confirmation modal.
I’m not entirely sure what the intention is behind this feature, so would love for @quinthar to chime in on this one too. Are you thinking we would display our own custom view of a console, or just launch the existing browser console, or something else?
Yeah. Lightbulb is cute. Dig it!
Thanks for finding it, here’s a version with a lightbulb:
Unsure exactly what the console view looks like, but here’s my take on how we could design the page. cc @Expensify/design
Quick update from my side:
Troubleshootingpage and linked it with routingDo we have any design for the new page? If we want to follow the design of other pages, what i need to know is: