I think we need to revisit the [[ https://www.mediawiki.org/wiki/Page_Previews/API_Specification#For_a_page_outside_of_the_wiki's_content_namespaces | 204 behavior in the summary endpoint ]] since those responses don't go too well with the Android app. It crashes when viewing a link preview which returns 204. Not sure how to iOS app behaves but the Android app behavior is probably a showstopper since we cannot control the rollout of Android app updates.
=== Example pages
Any page not in main namespace.
==== Beta cluster
https://en.wikipedia.beta.wmflabs.org/wiki/Wikipedia:Community_portal
click on the department directory link. (https://en.wikipedia.beta.wmflabs.org/wiki/Wikipedia:Department_directory).
==== Alternatively: Local RB install pointing to prod wikis
Make sure the RB config.yaml has entries for the `summary` like this:
```
mobileapps:
host: http://appservice.wmflabs.org
#http://localhost:6927
summary:
protocol: https
implementation: mcs
host: https://appservice.wmflabs.org
```
Pages: https://en.wikipedia.org/wiki/Help:Contents, https://en.wikipedia.org/wiki/User:BSitzmann_(WMF)/sandbox or anything else with a link to a non-main namespace page.
== Android info
dev build with commit c67d784 (but that should not matter)
[[ https://www.mediawiki.org/wiki/Wikimedia_Apps/Team/RESTBase_services_for_apps#Testing_with_the_Android_app | Dev Settings ]] set to Beta Cluster or local RB install.
=== Stack trace
org.wikipedia.dev E/AndroidRuntime: FATAL EXCEPTION: main
Process: org.wikipedia.dev, PID: 26681
java.lang.NullPointerException: Attempt to invoke interface method 'boolean org.wikipedia.dataclient.page.PageSummary.hasError()' on a null object reference
at org.wikipedia.page.linkpreview.LinkPreviewDialog$2.onResponse(LinkPreviewDialog.java:292)
at retrofit2.ExecutorCallAdapterFactory$ExecutorCallbackCall$1$1.run(ExecutorCallAdapterFactory.java:70)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:158)
at android.app.ActivityThread.main(ActivityThread.java:7224)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120)