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

fix NPE when baseUrl is missing #4163

Closed
wants to merge 1 commit into from
Closed

Conversation

mahibi
Copy link
Collaborator

@mahibi mahibi commented Sep 6, 2024

fix #4134

🏁 Checklist

  • ⛑️ Tests (unit and/or integration) are included or not needed
  • 🔖 Capability is checked or not needed
  • 🔙 Backport requests are created or not needed: /backport to stable-xx.x
  • 📅 Milestone is set
  • 🌸 PR title is meaningful (if it should be in the changelog: is it meaningful to users?)

@mahibi mahibi added the 3. to review Waiting for reviews label Sep 6, 2024
@mahibi mahibi added this to the 20.1.0 milestone Sep 6, 2024
@mahibi mahibi self-assigned this Sep 6, 2024
no idea how this happens, however this was
reported via gplay pre launch report for 20.0.0RC1
("Detected on 10 devices during testing"):

Exception java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String com.nextcloud.talk.data.user.model.User.getBaseUrl()' on a null object reference
  at com.nextcloud.talk.activities.BaseActivity.startActivity (BaseActivity.kt:240)
  at com.nextcloud.talk.account.ServerSelectionActivity.showVisitProvidersInfo$lambda$5 (ServerSelectionActivity.kt:206)
  at com.nextcloud.talk.account.ServerSelectionActivity.$r8$lambda$pjpPT-LQbGLSCJPXeRE8IJvpLIE
  at com.nextcloud.talk.account.ServerSelectionActivity$$ExternalSyntheticLambda0.onClick (D8$$SyntheticClass)
  at android.view.View.performClick (View.java:7506)
  at android.view.View.performClickInternal (View.java:7483)
  at android.view.View.-$$Nest$mperformClickInternal
  at android.view.View$PerformClick.run (View.java:29335)
  at android.os.Handler.handleCallback (Handler.java:942)
  at android.os.Handler.dispatchMessage (Handler.java:99)
  at androidx.test.espresso.base.Interrogator.loopAndInterrogate (Interrogator.java:10)
  at androidx.test.espresso.base.UiControllerImpl.loopUntil (UiControllerImpl.java:7)
  at androidx.test.espresso.base.UiControllerImpl.loopUntil (UiControllerImpl.java:1)
  at androidx.test.espresso.base.UiControllerImpl.injectMotionEvent (UiControllerImpl.java:5)
  at androidx.test.espresso.action.MotionEvents.sendUp (MotionEvents.java:6)
  at androidx.test.espresso.action.MotionEvents.sendUp (MotionEvents.java:1)
  at androidx.test.espresso.action.Tap.sendSingleTap (Tap.java:5)
  at androidx.test.espresso.action.Tap.-$$Nest$smsendSingleTap
  at androidx.test.espresso.action.Tap$1.sendTap (Tap.java:1)
  at androidx.test.espresso.action.GeneralClickAction.perform (GeneralClickAction.java:4)
  at androidx.test.espresso.ViewInteraction$SingleExecutionViewAction.perform (ViewInteraction.java:2)
  at androidx.test.espresso.ViewInteraction.doPerform (ViewInteraction.java:23)
  at androidx.test.espresso.ViewInteraction.-$$Nest$mdoPerform
  at androidx.test.espresso.ViewInteraction$1.call (ViewInteraction.java:6)
  at androidx.test.espresso.ViewInteraction$1.call (ViewInteraction.java:1)
  at java.util.concurrent.FutureTask.run (FutureTask.java:264)
  at android.os.Handler.handleCallback (Handler.java:942)
  at android.os.Handler.dispatchMessage (Handler.java:99)
  at android.os.Looper.loopOnce (Looper.java:201)
  at android.os.Looper.loop (Looper.java:288)
  at android.app.ActivityThread.main (ActivityThread.java:7898)
  at java.lang.reflect.Method.invoke
  at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:548)
  at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:936)

If baseUrl is really missing this may lead to followup issues, however this maybe only 'happens' in gplay pre launch report without any real world scenario. A best solution may be to make baseUrl not nullable, but don't want to do this on short term before release..

Signed-off-by: Marcel Hibbe <[email protected]>
@mahibi
Copy link
Collaborator Author

mahibi commented Sep 6, 2024

"Merge attempt failed" error from github... i will try to re create this PR..

@mahibi mahibi closed this Sep 6, 2024
@mahibi mahibi mentioned this pull request Sep 6, 2024
5 tasks
@mahibi mahibi deleted the bugfix/4134/fixNpeBaseUrl branch September 6, 2024 13:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3. to review Waiting for reviews
Projects
None yet
Development

Successfully merging this pull request may close these issues.

NPE in User.getBaseUrl()
2 participants