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

App crashes when clicking on deleted repo in news feed #1401

Open
sirjofri opened this issue Sep 27, 2024 · 3 comments
Open

App crashes when clicking on deleted repo in news feed #1401

sirjofri opened this issue Sep 27, 2024 · 3 comments

Comments

@sirjofri
Copy link

sirjofri commented Sep 27, 2024

Today, my news feed showed that someone forked a repo. Since the forked repo showed up as (deleted)/reponame, I assume it was deleted in the mean time. However, clicking on that news feed entry immediately crashes the app.

Screenshot_20240927-130547

@Fs00
Copy link
Contributor

Fs00 commented Sep 29, 2024

It looks like that the account that created the fork was deleted. Could you please share the logcat output of the crash so we can see the place in the code where the error occurs?

@Fs00
Copy link
Contributor

Fs00 commented Sep 29, 2024

Never mind, I've managed to find an occurrence of the crash myself.
The relevant logcat output is:

FATAL EXCEPTION: main
Process: com.gh4a, PID: 32073
java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String com.meisolsson.githubsdk.model.User.login()' on a null object reference
	at com.gh4a.activities.RepositoryActivity.makeIntent(RepositoryActivity.java:56)
	at com.gh4a.activities.RepositoryActivity.makeIntent(RepositoryActivity.java:52)
	at com.gh4a.fragment.EventListFragment.onItemClick(EventListFragment.java:188)
	at com.gh4a.fragment.EventListFragment.onItemClick(EventListFragment.java:88)
	at com.gh4a.adapter.RootAdapter.onClick(RootAdapter.java:271)
	at com.gh4a.adapter.EventAdapter.onClick(EventAdapter.java:118)
	at android.view.View.performClick(View.java:7259)
	at android.view.View.performClickInternal(View.java:7236)
	at android.view.View.access$3600(View.java:801)
	at android.view.View$PerformClick.run(View.java:27892)
	at android.os.Handler.handleCallback(Handler.java:883)
	at android.os.Handler.dispatchMessage(Handler.java:100)
	at android.os.Looper.loop(Looper.java:214)
	at android.app.ActivityThread.main(ActivityThread.java:7356)
	at java.lang.reflect.Method.invoke(Native Method)
	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:491)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:940)

I'll try to look into it.

@Fs00
Copy link
Contributor

Fs00 commented Oct 19, 2024

Small update: I've noticed that the issue is caused by a silent breaking change of the GitHub events API, which is returning less fields of the forked repository than the app expects.
I've contacted GitHub support two weeks ago to report the problem, but I haven't received an answer yet. In the worst case, the app can be adapted to work with the changed API without too much effort.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants