[
https://issues.apache.org/jira/browse/CB-12306?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15795800#comment-15795800
]
Joe Bowser commented on CB-12306:
---------------------------------
This isn't in the Stack Trace, but instead found in the logs and is the culprit
of the failed test:
{noformat}
01-03 10:42:02.696 16815-16830/org.apache.cordova.test E/MediaStore: Failed to
insert image
java.lang.SecurityException: Permission Denial: writing
com.android.providers.media.MediaProvider uri
content://media/external/images/media from pid=16815, uid=10243 requires
android.permission.WRITE_EXTERNAL_STORAGE, or grantUriPermission()
at
android.os.Parcel.readException(Parcel.java:1684)
at
android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:183)
at
android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:135)
at
android.content.ContentProviderProxy.insert(ContentProviderNative.java:476)
at
android.content.ContentResolver.insert(ContentResolver.java:1276)
at
android.provider.MediaStore$Images$Media.insertImage(MediaStore.java:968)
at
org.apache.cordova.test.CordovaResourceApiTest.createTestImageContentUri(CordovaResourceApiTest.java:88)
at
org.apache.cordova.test.CordovaResourceApiTest.testJavaApis(CordovaResourceApiTest.java:129)
at
java.lang.reflect.Method.invoke(Native Method)
at
android.test.InstrumentationTestCase.runMethod(InstrumentationTestCase.java:220)
at
android.test.InstrumentationTestCase.runTest(InstrumentationTestCase.java:205)
at
android.test.ActivityInstrumentationTestCase2.runTest(ActivityInstrumentationTestCase2.java:192)
at
junit.framework.TestCase.runBare(TestCase.java:134)
at
junit.framework.TestResult$1.protect(TestResult.java:115)
at
junit.framework.TestResult.runProtected(TestResult.java:133)
at
junit.framework.TestResult.run(TestResult.java:118)
at
junit.framework.TestCase.run(TestCase.java:124)
at
android.test.AndroidTestRunner.runTest(AndroidTestRunner.java:198)
at
android.test.AndroidTestRunner.runTest(AndroidTestRunner.java:183)
at
android.test.InstrumentationTestRunner.onStart(InstrumentationTestRunner.java:560)
at
android.app.Instrumentation$InstrumentationThread.run(Instrumentation.java:1932)
{noformat}
> Unit tests are failing for cordova-android
> ------------------------------------------
>
> Key: CB-12306
> URL: https://issues.apache.org/jira/browse/CB-12306
> Project: Apache Cordova
> Issue Type: Test
> Components: Android
> Environment: Android Studio 2.3
> Reporter: Igor Ganapolsky
> Priority: Minor
> Labels: gradle, test
>
> The following repo has unit tests defined:
> https://github.com/apache/cordova-android. However, running `./gradlew
> connectedAndroidTest` will show these failing unit tests:
> Starting 16 tests on Pixel_XL_API_25(AVD) - 7.1
> Starting 16 tests on Nexus 5X - 7.1.1
> Starting 16 tests on Z667G - 4.3
> org.apache.cordova.test.CordovaResourceApiTest >
> testJavaApis[Pixel_XL_API_25(AVD) - 7.1] FAILED
> java.lang.NullPointerException: uriString
> at android.net.Uri$StringUri.<init>(Uri.java:475)
> org.apache.cordova.test.CordovaResourceApiTest > testJavaApis[Nexus 5X -
> 7.1.1] FAILED
> java.lang.NullPointerException: uriString
> at android.net.Uri$StringUri.<init>(Uri.java:475)
> Starting 16 tests on Nexus 7 - 6.0.1
> org.apache.cordova.test.CordovaResourceApiTest > testJavaApis[Nexus 7 -
> 6.0.1] FAILED
> java.lang.NullPointerException: uriString
> at android.net.Uri$StringUri.<init>(Uri.java:475)
> org.apache.cordova.test.CordovaResourceApiTest > testJavaApis[Z667G - 4.3]
> FAILED
> java.lang.NoClassDefFoundError: java.nio.charset.StandardCharsets
> at
> org.apache.cordova.test.CordovaResourceApiTest$1.handleOpenForRead(CordovaResourceApiTest.java:71)
> org.apache.cordova.test.HtmlNotFoundTest > testUrl[Z667G - 4.3] FAILED
> junit.framework.AssertionFailedError
> at
> org.apache.cordova.test.HtmlNotFoundTest.testUrl(HtmlNotFoundTest.java:43)
> :connectedDebugAndroidTest FAILED
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]