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

Convert error report timestamps to ISO format #11887

Open
wants to merge 2 commits into
base: dev
Choose a base branch
from

Conversation

Nikunj-Aggarwal
Copy link

What is it?

  • Bugfix (user facing)
  • Feature (user facing)
  • Codebase improvement (dev facing)
  • Meta improvement to the project (dev facing)

Description of the changes in your PR

  • The current implementation in ErrorActivity was using CURRENT_TIMESTAMP_FORMATTER instead of that, I have converted the LocalDateTime to ISO format

Fixes the following issue(s)

APK testing

The APK can be found by going to the "Checks" tab below the title. On the left pane, click on "CI", scroll down to "artifacts" and click "app" to download the zip file which contains the debug APK of this PR. You can find more info and a video demonstration on this wiki page.

Due diligence

@github-actions github-actions bot added the size/small PRs with less than 50 changed lines label Jan 7, 2025
Copy link
Member

@Stypox Stypox left a comment

Choose a reason for hiding this comment

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

Thank you!
I don't think you need a separate file. You can inline the currentDateToIsoDateFormat function in my opinion, i.e. call LocalDateTime.now().format(DateTimeFormatter.ISO_DATE_TIME) directly.

@Nikunj-Aggarwal
Copy link
Author

Thank you! I don't think you need a separate file. You can inline the currentDateToIsoDateFormat function in my opinion, i.e. call LocalDateTime.now().format(DateTimeFormatter.ISO_DATE_TIME) directly.

You are right @Stypox but this file will work as a helper class for other date time related functions still if you feel that this is not required then please let me know here
I will remove it and will make it inline

@Stypox
Copy link
Member

Stypox commented Jan 10, 2025

Yes please remove it, there is no much use in a utility function that just wraps another function in a very specific way.

@TheAssassin
Copy link
Member

Please post the new format so that I can prepare an update for the importer to additionally support the new format. Ideally, please post the entire JSON.

@Nikunj-Aggarwal
Copy link
Author

Please post the new format so that I can prepare an update for the importer to additionally support the new format. Ideally, please post the entire JSON.

Could you please elaborate?
I didn't understand what you mean

@Stypox
Copy link
Member

Stypox commented Jan 11, 2025

I think he means, just open the app built by this PR, go to settings->debug, use the button to make the app crash (which should open the report screen), click on the button to report via mail and send here the json report that your email client would put in the email body.

@Nikunj-Aggarwal
Copy link
Author

I think he means, just open the app built by this PR, go to settings->debug, use the button to make the app crash (which should open the report screen), click on the button to report via mail and send here the json report that your email client would put in the email body.

@TheAssassin

{"user_action":"ui error","request":"Dummy","content_language":"en-IN","content_country":"IN","app_language":"en_IN","service":"none","package":"org.schabi.newpipe.debug.bgisotimestamp","version":"0.27.4","os":"Linux Redmi/peux_in/peux:13/TKQ1.221114.001/V816.0.6.0.TKCINXM:user/release-keys 13 - 33","time":"2025-01-12T00:49:24.395","exceptions":["java.lang.RuntimeException: Dummy\n\tat org.schabi.newpipe.settings.DebugSettingsFragment.lambda$onCreatePreferences$5(DebugSettingsFragment.java:85)\n\tat org.schabi.newpipe.settings.DebugSettingsFragment.$r8$lambda$orjSIDahtE9hiky58tDzSrf2FtQ(Unknown Source:0)\n\tat org.schabi.newpipe.settings.DebugSettingsFragment$$ExternalSyntheticLambda5.onPreferenceClick(D8$$SyntheticClass:0)\n\tat androidx.preference.Preference.performClick(Preference.java:1200)\n\tat androidx.preference.Preference.performClick(Preference.java:1182)\n\tat androidx.preference.Preference$1.onClick(Preference.java:182)\n\tat android.view.View.performClick(View.java:7600)\n\tat android.view.View.performClickInternal(View.java:7577)\n\tat android.view.View.-$$Nest$mperformClickInternal(Unknown Source:0)\n\tat android.view.View$PerformClick.run(View.java:30186)\n\tat android.os.Handler.handleCallback(Handler.java:942)\n\tat android.os.Handler.dispatchMessage(Handler.java:99)\n\tat android.os.Looper.loopOnce(Looper.java:211)\n\tat android.os.Looper.loop(Looper.java:300)\n\tat android.app.ActivityThread.main(ActivityThread.java:8503)\n\tat java.lang.reflect.Method.invoke(Native Method)\n\tat com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:561)\n\tat com.android.internal.os.ZygoteInit.main(ZygoteInit.java:954)\n"],"user_comment":""} 

@AudricV AudricV changed the title feat: added DateTimeHelper to convert current date in ISO format Convert error report timestamps to ISO format Jan 12, 2025
@AudricV AudricV added the feature request Issue is related to a feature in the app label Jan 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request Issue is related to a feature in the app size/small PRs with less than 50 changed lines
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Provide proper ISO 8601 timestamps in crash report emails
4 participants