# Maven 2 repository "Strict Content Type Validation" does not allow deployment of Android Bundles

**URL:** <https://community.sonatype.com/t/maven-2-repository-strict-content-type-validation-does-not-allow-deployment-of-android-bundles/5786>\
**Category:** Sonatype Nexus Repository\
**Created:** [January 29, 2021, 9:39am UTC](https://community.sonatype.com/t/maven-2-repository-strict-content-type-validation-does-not-allow-deployment-of-android-bundles/5786 "2021-01-29T09:39:02Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![alix.warnke](https://yyz1.discourse-cdn.com/flex047/user_avatar/community.sonatype.com/alix.warnke/32/1629_2.png) [@alix.warnke](https://community.sonatype.com/u/alix.warnke)\
**Post date:** [January 29, 2021, 9:39am UTC](https://community.sonatype.com/t/maven-2-repository-strict-content-type-validation-does-not-allow-deployment-of-android-bundles/5786/1 "2021-01-29T09:39:02Z")

</div>

I am using version OSS 3.29.2-02 of Nexus Repository Manager and have previously checked the option “Strict Content Type Validation” and it has worked well for deploying the old APK format. But when switching to the new preferred publishing format for Android applications called “Android App Bundle” (.aab) the deployment fails.

After unchecking “Strict Content Type Validation” I could successfully deploy .aab files.

Is this a known issue?

I am not allowed to create issues in [Dev - Nexus Repo - Sonatype JIRA](https://issues.sonatype.org/projects/NEXUS/summary)

Reference:  
[https://developer.android.com/guide/app-bundle](https://developer.android.com/guide/app-bundle)

---

<div class="post-metadata">

**Author:** ![rseddon](https://yyz1.discourse-cdn.com/flex047/user_avatar/community.sonatype.com/rseddon/32/341_2.png) [@rseddon](https://community.sonatype.com/u/rseddon)\
**Post date:** [January 29, 2021, 5:46pm UTC](https://community.sonatype.com/t/maven-2-repository-strict-content-type-validation-does-not-allow-deployment-of-android-bundles/5786/2 "2021-01-29T17:46:55Z")

</div>

I don’t think that is a known issue. Can you try to create an issue for it again? The problem with htat should be fixed now.

---

<div class="post-metadata">

**Author:** ![alix.warnke](https://yyz1.discourse-cdn.com/flex047/user_avatar/community.sonatype.com/alix.warnke/32/1629_2.png) [@alix.warnke](https://community.sonatype.com/u/alix.warnke)\
**Post date:** [January 30, 2021, 8:10am UTC](https://community.sonatype.com/t/maven-2-repository-strict-content-type-validation-does-not-allow-deployment-of-android-bundles/5786/4 "2021-01-30T08:10:57Z")

</div>

Thanks, reported now: [https://issues.sonatype.org/browse/NEXUS-26556](https://issues.sonatype.org/browse/NEXUS-26556)

---

<div class="post-metadata">

**Author:** ![iriswangbuildandrelease](https://avatars.discourse-cdn.com/v4/letter/i/53a042/32.png) [@iriswangbuildandrelease](https://community.sonatype.com/u/iriswangbuildandrelease)\
**Post date:** [June 9, 2023, 9:06am UTC](https://community.sonatype.com/t/maven-2-repository-strict-content-type-validation-does-not-allow-deployment-of-android-bundles/5786/5 "2023-06-09T09:06:15Z")

</div>

i could not view the NEXUS-26556  
is this problem fixed?my nexus version is oss 3.37.3-02  
i could not upload the Android bundle aab file by maven plugin to nexus repo, and got 400 error.“Received status code 400 from server: Detected content type [application/zip, application/x-zip-compressed], but expected [application/x-authorware-bin]:”  
so i want to add the aab in the mime configure list. but the Admin web ui did not provide the interface.  
i also searched the nexus.properties file, and those file content is simple, did not have the mime configure info

---

<div class="post-metadata">

**Author:** ![rahogata](https://yyz1.discourse-cdn.com/flex047/user_avatar/community.sonatype.com/rahogata/32/3539_2.png) [@rahogata](https://community.sonatype.com/u/rahogata)\
**Post date:** [July 10, 2024, 7:40pm UTC](https://community.sonatype.com/t/maven-2-repository-strict-content-type-validation-does-not-allow-deployment-of-android-bundles/5786/6 "2024-07-10T19:40:02Z")

</div>

I am facing similar issue for a yaml file. I am using latest sonatype docker image sonatype/nexus3.

Environment details:  
**OS:** Ubuntu  
**Docker:** 27.0.3  
**Image:** sonatype/nexus3; sha256:348631820abdbe7269a455f7b6d228a275337b905364284b07e44c5eebd4a302  
**Nexus:** 3.70.0

**Error**

```auto
Could not PUT 'http://localhost:8081/repository/maven-snapshots/in/co/rahogata/boot/spring-boot-kindergarten-manifest/0.1.0-SNAPSHOT/spring-boot-kindergarten-manifest-0.1.0-20240710.193333-7.yaml'. Received status code 400 from server: Detected content type [text/html], but expected [text/x-yaml, application/x-yaml, application/x-yml, application/yaml, text/vnd.yaml, text/x-yml, text/yaml]: in/co/rahogata/boot/spring-boot-kindergarten-manifest/0.1.0-SNAPSHOT/spring-boot-kindergarten-manifest-0.1.0-20240710.193333-7.yaml

```

File content tried.

```auto
apiVersion: v1
kind: ConfigMap
metadata:
  creationTimestamp: 2022-02-18T18:52:05Z
  name: game-config
  namespace: default
  resourceVersion: "516"
  uid: b4952dc3-d670-11e5-8cd0-68f728db1985
data:
  game.properties: |
    enemies=aliens
    lives=3
    enemies.cheat=true
    enemies.cheat.level=noGoodRotten
    secret.code.passphrase=UUDDLRLRBABAS
    secret.code.allowed=true
    secret.code.lives=30
  ui.properties: |
    color.good=purple
    color.bad=yellow
    allow.textmode=true
    how.nice.to.look=fairlyNice
  index.html: |
    <!DOCTYPE html>
    <html>
    <body>

    <h1>My First Heading</h1>

    <p>My first paragraph.</p>

    </body>
    </html>

```

---

<div class="post-metadata">

**Author:** ![rseddon](https://yyz1.discourse-cdn.com/flex047/user_avatar/community.sonatype.com/rseddon/32/341_2.png) [@rseddon](https://community.sonatype.com/u/rseddon)\
**Post date:** [July 17, 2024, 4:39pm UTC](https://community.sonatype.com/t/maven-2-repository-strict-content-type-validation-does-not-allow-deployment-of-android-bundles/5786/7 "2024-07-17T16:39:38Z")

</div>

There is a reason why we have an option to turn the content validation off, it can sometimes misfire.

The workaround here is to disable content validation in the hosted repository’s configuration.

Rich
