Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content

fix: missing navigation parameter, on previous sentry fix

Guillaume Jacquart requested to merge 0-fix_2_9beta_navigation_issue into main

Description

As reported by @fahim44 , navigation to App Trackers detail screen is broken, and navigation to Tracker details screen cause a crash on v2.9.0 .

The cause is that arguments required to display these screens are missing, giving following stacktrace :

--------- beginning of crash
03-13 11:39:09.472  3669  3669 E AndroidRuntime: FATAL EXCEPTION: main
03-13 11:39:09.472  3669  3669 E AndroidRuntime: Process: foundation.e.advancedprivacy, PID: 3669
03-13 11:39:09.472  3669  3669 E AndroidRuntime: java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
03-13 11:39:09.472  3669  3669 E AndroidRuntime: 	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:601)
03-13 11:39:09.472  3669  3669 E AndroidRuntime: 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:871)
03-13 11:39:09.472  3669  3669 E AndroidRuntime: Caused by: java.lang.reflect.InvocationTargetException
03-13 11:39:09.472  3669  3669 E AndroidRuntime: 	at java.lang.reflect.Method.invoke(Native Method)
03-13 11:39:09.472  3669  3669 E AndroidRuntime: 	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:591)
03-13 11:39:09.472  3669  3669 E AndroidRuntime: 	... 1 more
03-13 11:39:09.472  3669  3669 E AndroidRuntime: Caused by: java.lang.reflect.InvocationTargetException
03-13 11:39:09.472  3669  3669 E AndroidRuntime: 	at java.lang.reflect.Method.invoke(Native Method)
03-13 11:39:09.472  3669  3669 E AndroidRuntime: 	at androidx.navigation.NavArgsLazy.getValue(NavArgsLazy.kt:56)
03-13 11:39:09.472  3669  3669 E AndroidRuntime: 	at androidx.navigation.NavArgsLazy.getValue(NavArgsLazy.kt:35)
03-13 11:39:09.472  3669  3669 E AndroidRuntime: 	at foundation.e.advancedprivacy.features.trackers.trackerdetails.TrackerDetailsFragment.getArgs(TrackerDetailsFragment.kt:44)
03-13 11:39:09.472  3669  3669 E AndroidRuntime: 	at foundation.e.advancedprivacy.features.trackers.trackerdetails.TrackerDetailsFragment.viewModel_delegate$lambda$0(TrackerDetailsFragment.kt:45)
03-13 11:39:09.472  3669  3669 E AndroidRuntime: 	at foundation.e.advancedprivacy.features.trackers.trackerdetails.TrackerDetailsFragment.$r8$lambda$unmkJN9euXABmXDO_zoSLPl4oDc(Unknown Source:0)
03-13 11:39:09.472  3669  3669 E AndroidRuntime: 	at foundation.e.advancedprivacy.features.trackers.trackerdetails.TrackerDetailsFragment$$ExternalSyntheticLambda1.invoke(D8$$SyntheticClass:0)
03-13 11:39:09.472  3669  3669 E AndroidRuntime: 	at org.koin.androidx.viewmodel.parameter.AndroidParametersHolder.<init>(AndroidParametersHolder.kt:13)
03-13 11:39:09.472  3669  3669 E AndroidRuntime: 	at org.koin.androidx.viewmodel.factory.KoinViewModelFactory.create(KoinViewModelFactory.kt:24)
03-13 11:39:09.472  3669  3669 E AndroidRuntime: 	at androidx.lifecycle.ViewModelProvider$Factory.create(ViewModelProvider.android.kt:158)
03-13 11:39:09.472  3669  3669 E AndroidRuntime: 	at androidx.lifecycle.viewmodel.ViewModelProviderImpl_androidKt.createViewModel(ViewModelProviderImpl.android.kt:34)
03-13 11:39:09.472  3669  3669 E AndroidRuntime: 	at androidx.lifecycle.viewmodel.ViewModelProviderImpl.getViewModel$lifecycle_viewmodel_release(ViewModelProviderImpl.kt:65)
03-13 11:39:09.472  3669  3669 E AndroidRuntime: 	at androidx.lifecycle.viewmodel.ViewModelProviderImpl.getViewModel$lifecycle_viewmodel_release$default(ViewModelProviderImpl.kt:47)
03-13 11:39:09.472  3669  3669 E AndroidRuntime: 	at androidx.lifecycle.ViewModelProvider.get(ViewModelProvider.android.kt:91)
03-13 11:39:09.472  3669  3669 E AndroidRuntime: 	at androidx.lifecycle.ViewModelProvider.get(ViewModelProvider.android.kt:109)
03-13 11:39:09.472  3669  3669 E AndroidRuntime: 	at org.koin.androidx.viewmodel.GetViewModelKt.resolveViewModel(GetViewModel.kt:44)
03-13 11:39:09.472  3669  3669 E AndroidRuntime: 	at org.koin.androidx.viewmodel.GetViewModelKt.resolveViewModel$default(GetViewModel.kt:28)
03-13 11:39:09.472  3669  3669 E AndroidRuntime: 	at foundation.e.advancedprivacy.features.trackers.trackerdetails.TrackerDetailsFragment$special$$inlined$viewModel$default$2.invoke(FragmentVM.kt:83)
...

Screenshots

video_2025-03-13_11-12-05

Technical details

It was a regression introduced in a fix for a sentry crash. I just removed the arguments during navigation 🙈

Tests

10 commandments of code reviews

👪 ❤️ https://gitlab.e.foundation/internal/wiki/-/wikis/mobile-team/guidelines/Code-review

Merge request reports

Loading