bugfix: Fix e2e test resources android#2380
Merged
Merged
Conversation
🤖 Augment PR SummarySummary: Fixes Android e2e tests by ensuring shared resources are packaged and screenshots are written to an app-owned external storage directory. Changes:
🤖 Was this summary useful? React with 👍 or 👎 |
|
|
||
| Log.d(TAG, "Determining screenshotsVfs...") | ||
| val path = Environment["OUTPUT_DIR"] ?: "." | ||
| val path = applicationContext.getExternalFilesDir(null)!!.absolutePath |
There was a problem hiding this comment.
e2e/e2e-test/androidApp/src/main/kotlin/org/korge/e2e/MainActivity.kt:33 — getExternalFilesDir(null) can return null when external storage isn’t currently mounted; the !! will crash the e2e app and prevent screenshot capture in that case.
Severity: medium
🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.
jobe-m
reviewed
Jul 16, 2026
Fix invalid path for android application by using an app-specific external storage path.
malliaridis
force-pushed
the
malliaridis/bugfix/e2e-test-resources-android
branch
from
July 21, 2026 21:20
0ff46c0 to
3e4093b
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
While executing the e2e test example on Android, I noticed that the resources were not loaded properly and the screenshots were not captured.
Additionally, from #2375 we introduced a package missmatch for JVM.
Solution
This PR addresses all these issues by using an app-specific external storage path, loads explicitly the commonMain resources as assets into the androidApp module, and updates the jvm main class package to match the correct one.
Additional Information
The fix for loading the common resources as assets into the androidApp module should be only temporary and normally handled by the korge plugin, or at least moved to the shared module's logic. However, this require more time to investigate and figure out how to do it, so I chose the quick solution for now.
You may review the fixes by opening the screenshots on the test device. They can now be found under
/storage/emulated/0/Android/data/org.korge.e2e.test/files/. Before the fix they were not created (errors were logged), and with both fixes at least theFilters.pngis different and is rendering the images. I am not sure what the third ping screenshot is supposed to display.