-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
fix: detect if date is NaN in getLocalDateFromDatetime #33223
Conversation
@abdulrahuman5196 Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
@hannojg Any specific case to reproduce this crash? Like any specific mobile? Edit: Anyways will test since the description and the fix is generic enough |
You could try running the e2e tests and see if you get the crash as well:
# Make sure that your .env file is the one we need for e2e testing:
cp ./tests/e2e/.env.e2e .env
# Build the android app like you normally would with
npm run android
require('./src/libs/E2E/reactNativeLaunchingTest');
- import '../../../index';
+ import '../../../appIndex'; Then run the tests using:
|
I tried multiple times and wasn't able to reproduce the crash same as if the author pointed. But on checking the changes, its more like a generic error handling which would be good here. |
Reviewer Checklist
Screenshots/VideosAndroid: NativeScreen.Recording.2023-12-19.at.1.30.23.AM.mp4Android: mWeb ChromeScreen.Recording.2023-12-19.at.1.32.06.AM.mp4iOS: NativeScreen.Recording.2023-12-19.at.1.28.51.AM.mp4iOS: mWeb SafariScreen.Recording.2023-12-19.at.1.29.47.AM.mp4MacOS: Chrome / SafariScreen.Recording.2023-12-19.at.1.06.28.AM.mp4MacOS: DesktopScreen.Recording.2023-12-19.at.1.13.01.AM.mp4 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes looks good and works well. Reviewers checklist is also complete.
All yours. @mountiny
🎀 👀 🎀
C+ Reviewed
Yeah the issue is that it doesn't happen on all android devices. Would be interesting to find out exactly why that is but I feel that would be a multiple days endeavour 😅 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
🚀 Deployed to production by https://github.com/mountiny in version: 1.4.18-8 🚀
|
Details
When running the e2e tests locally I noticed that on some android devices opening a report crashes.
We basically get this error, because we are trying to pass an invalid date here:
App/src/pages/home/report/ParticipantLocalTime.js
Line 23 in 648c000
The invalid date gets created here:
App/src/libs/DateUtils.ts
Lines 91 to 94 in 648c000
I investigate which values are passed to
utcToZonedTime
but they all seem valid. I try to reproduce the crash on my machine usingutcToZonedTime
and the input variable the app passes, but on my computer it was working.I assume that it's an issue due to the Intl polyfill. That might also be the reason why we don't see this on every android device, but just some.
Fixed Issues
$ #33219
PROPOSAL: #33219
Tests
Hard to test as you'd need a specific android phone where you'd get this error.
Offline tests
/
QA Steps
Same as tests
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)myBool && <MyComponent />
.src/languages/*
files and using the translation methodWaiting for Copy
label for a copy review on the original GH to get the correct copy.STYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)ScrollView
component to make it scrollable when more elements are added to the page.main
branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTest
steps.Screenshots/Videos
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
MacOS: Desktop