googlesamples / googlesamples/mlkit
[GenAI Prompt API] checkStatus() throws unhandled NullPointerException on Galaxy S25 (SM-S931B), reproduced on both beta2 and beta4
- Dominant language
- Kotlin
- Stars
- 4.3k
- Forks
- 3.1k
- PR merge metrics
- No merged PRs in 30d
Description
### Summary
`GenerativeModel.checkStatus()` throws a raw, unhandled `NullPointerException` from deep inside internal (R8-minified) code on a Samsung Galaxy S25, rather than returning a `FeatureStatus` or throwing a `GenAiException`. Reproduced identically on both `genai-prompt:1.0.0-beta4` and `genai-prompt:1.0.0-beta2` — downgrading did not help, so this doesn't look like the beta3 `ModelConfig` feature-ID regression from #1061.
### Environment
| | |
|---|---|
| Device | Samsung Galaxy S25 (SM-S931B), Snapdragon (qcom) variant |
| Android | 16, build `BP4A.251205.006.S931BXXSBCZG3`, SDK 36 |
| Bootloader | locked |
| `com.google.android.aicore` | `0.release.qc.prod_aicore_20260723.00_RC11.964081323` (versionCode 494422), last updated 2026-08-19 |
| `com.samsung.android.aicore` | `3.0.02.7` (versionCode 300207510), last updated 2026-06-07 |
| `genai-prompt` tested | `1.0.0-beta4` and `1.0.0-beta2` — both fail identically |
### Steps to reproduce
```kotlin
val model = Generation.getClient(generationConfig {})
model.checkStatus() // suspend fun — throws here
```
No `ModelConfig` overrides — default config only.
### Actual behavior
```
java.lang.NullPointerException
at java.util.Objects.throwNullPointerException(Objects.java:504)
at java.util.Objects.requireNonNull(Objects.java:222)
at ba0.(...)
at ea0.a(...)
at p7.b(...)
at fa0.a(...)
at ce0.(...)
at yf.a(...)
at ot.a(...)
at f4.g(...)
at t2.resumeWith(...)
at k9.run(...)
at android.os.Handler.handleCallback(Handler.java:1070)
...
```
(Class names are R8-obfuscated per build and differ between the beta2/beta4 runs — the shape of the trace, `Objects.requireNonNull` failing during an internal object's ``, is identical both times.)
### Expected behavior
Either a valid `FeatureStatus`, or a caught `GenAiException` with a real error code/message — not an unhandled NPE escaping the coroutine.
### Additional context
This looks similar in shape to #1021 ("Null getService" on Galaxy S26/SLSI2600), which was reported fixed in an AICore release around end of April 2026. Both AICore packages on this device postdate that fix (see versions above), so this looks like either a distinct, still-unpatched variant, or something specific to Samsung's own `com.samsung.android.aicore` layer rather than Google's side. Happy to pull more logs / try a minimal repro project if useful.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reproducing the Kotlin checkStatus() call on the Samsung Galaxy S25 using genai-prompt beta2 and beta4 with the default Generation config. Compare the resulting stack traces and collect the requested logs or a minimal repro project; done means checkStatus() returns a FeatureStatus or a caught GenAiException instead of an unhandled NullPointerException.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, kotlin
- Domain
- ai, mobile
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Active
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100