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 crash when no browsers are installed #120

Merged
merged 1 commit into from
Sep 14, 2023

Conversation

NHellFire
Copy link

When no browsers are installed, it will currently crash with:

System.err: java.lang.NullPointerException: Attempt to read from field 'android.content.pm.ActivityInfo android.content.pm.ResolveInfo.activityInfo' on a null object reference
System.err:   at jp.co.cyberagent.stf.util.BrowserUtil.filterChooser(BrowserUtil.java:43)
System.err:   at jp.co.cyberagent.stf.util.BrowserUtil.getDefaultBrowser(BrowserUtil.java:37)
System.err:   at jp.co.cyberagent.stf.monitor.BrowserPackageMonitor.report(BrowserPackageMonitor.java:87)
System.err:   at jp.co.cyberagent.stf.monitor.BrowserPackageMonitor.peek(BrowserPackageMonitor.java:77)
System.err:   at jp.co.cyberagent.stf.Service$Server$Connection.run(Service.java:371)
System.err:   at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:428)
System.err:   at java.util.concurrent.FutureTask.run(FutureTask.java:237)
System.err:   at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
System.err:   at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
System.err:   at java.lang.Thread.run(Thread.java:761)

Signed-off-by: Nathan Rennie-Waldock <nathan.renniewaldock@gmail.com>
@koral-- koral-- merged commit d158a53 into DeviceFarmer:master Sep 14, 2023
2 checks passed
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

Successfully merging this pull request may close these issues.

2 participants