New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mapping file upload fails with error "invalidSymbolFile" #368

Closed
knordbo opened this Issue Jul 2, 2018 · 13 comments

Comments

Projects
3 participants
@knordbo

knordbo commented Jul 2, 2018

Describe the bug

When releasing a bundle it fails during upload of deobfuscation files https://developers.google.com/android-publisher/api-ref/edits/deobfuscationfiles/upload

It fails while hitting:
https://www.googleapis.com/upload/androidpublisher/v3/applications/.../deobfuscationFiles

{
 "error": {
  "errors": [
   {
    "domain": "androidpublisher",
    "reason": "invalidSymbolFile",
    "message": "Symbol file invalid."
   }
  ],
  "code": 403,
  "message": "Symbol file invalid."
 }
}

Unsure if this is a problem with Google APIs or the plugin.

Leaving out rest of logs since its all auth headers etc, but it should be easy enough to reproduce.

To Reproduce

./gradlew publishRelease --info

release {
    minifyEnabled true
    proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
play {
    defaultToAppBundles = true
    serviceAccountCredentials = file("service-account.json")
    track = 'internal'
}

Versions

  • Gradle Play Publisher: current master
  • Gradle Wrapper (if applicable): 4.7
  • Android Gradle Plugin (if applicable): 3.2.0-beta01

Expected behavior

Mapping file successfully uploaded

Additional context

In my case I actually have -dontobfuscate so the mapping file is not needed, maybe it should be configurable? Probably that is overkill though, it never hurts to upload it.

@knordbo knordbo changed the title from Deobfuscate mapping fails to Deobfuscate mapping fails while releasing bundle Jul 2, 2018

@SUPERCILEX

This comment has been minimized.

Show comment
Hide comment
@SUPERCILEX

SUPERCILEX Jul 2, 2018

Collaborator

Interesting, do both publishBundle and publishApk have this problem? It shouldn't be specific to bundles since the code is shared.

Collaborator

SUPERCILEX commented Jul 2, 2018

Interesting, do both publishBundle and publishApk have this problem? It shouldn't be specific to bundles since the code is shared.

@knordbo

This comment has been minimized.

Show comment
Hide comment
@knordbo

knordbo Jul 2, 2018

Yes, it appears to happen in both cases. If there was no actual changes when it was made common between apk and bundle it might indicate either an error/breaking change on Googles side.

knordbo commented Jul 2, 2018

Yes, it appears to happen in both cases. If there was no actual changes when it was made common between apk and bundle it might indicate either an error/breaking change on Googles side.

@SUPERCILEX

This comment has been minimized.

Show comment
Hide comment
@SUPERCILEX

SUPERCILEX Jul 2, 2018

Collaborator

Nice, that means the bundles PR can move forward. 👍 And yeah, there weren't any changes to mapping stuff when adding bundle support.

I'm able to upload mapping files just fine, but I haven't tried the don't obfuscate stuff so I'll see what happens with that when I take a look tomorrow.

Collaborator

SUPERCILEX commented Jul 2, 2018

Nice, that means the bundles PR can move forward. 👍 And yeah, there weren't any changes to mapping stuff when adding bundle support.

I'm able to upload mapping files just fine, but I haven't tried the don't obfuscate stuff so I'll see what happens with that when I take a look tomorrow.

@SUPERCILEX SUPERCILEX changed the title from Deobfuscate mapping fails while releasing bundle to Mapping file upload fails with invalidSymbolFile Jul 2, 2018

@SUPERCILEX SUPERCILEX changed the title from Mapping file upload fails with invalidSymbolFile to Mapping file upload fails with error "invalidSymbolFile" Jul 2, 2018

@SUPERCILEX SUPERCILEX added the bug label Jul 2, 2018

@SUPERCILEX SUPERCILEX self-assigned this Jul 2, 2018

@knordbo

This comment has been minimized.

Show comment
Hide comment
@knordbo

knordbo Jul 2, 2018

Yup. I'm not even sure why a mapping file is generated since I use -dontobfuscate

It could very well be a bug in the tooling since I'm on beta02

knordbo commented Jul 2, 2018

Yup. I'm not even sure why a mapping file is generated since I use -dontobfuscate

It could very well be a bug in the tooling since I'm on beta02

@knordbo

This comment has been minimized.

Show comment
Hide comment
@knordbo

knordbo Jul 2, 2018

When -dontobfuscate is used it generates an empty mapping.txt file. I feel like that is a bug in the tooling, do you want me to create a bug in the google issue tracker instead? Either they should not create an empty file or the endpoint that takes obfuscation files should handle the case for empty file.

As a workaround for now you could check if the file length is 0. The easiest might be to make that change directly in the app-bundle branch to avoid conflict.

knordbo commented Jul 2, 2018

When -dontobfuscate is used it generates an empty mapping.txt file. I feel like that is a bug in the tooling, do you want me to create a bug in the google issue tracker instead? Either they should not create an empty file or the endpoint that takes obfuscation files should handle the case for empty file.

As a workaround for now you could check if the file length is 0. The easiest might be to make that change directly in the app-bundle branch to avoid conflict.

@SUPERCILEX

This comment has been minimized.

Show comment
Hide comment
@SUPERCILEX

SUPERCILEX Jul 2, 2018

Collaborator

Can confirm -dontobfuscate breaks it, will fix.

Collaborator

SUPERCILEX commented Jul 2, 2018

Can confirm -dontobfuscate breaks it, will fix.

@SUPERCILEX SUPERCILEX added this to Triage in v2.0 via automation Jul 2, 2018

@SUPERCILEX SUPERCILEX added this to the 2.0.0 milestone Jul 2, 2018

@SUPERCILEX SUPERCILEX moved this from Triage to In progress in v2.0 Jul 2, 2018

@SUPERCILEX

This comment has been minimized.

Show comment
Hide comment
@SUPERCILEX

SUPERCILEX Jul 2, 2018

Collaborator

@knordbo Yeah, feel free to file a bug if you'd like. 👍 (It might take a while to get fixed though because the AGP team will have to file the bug with GuardSquare and wait for them to fix it.)

Collaborator

SUPERCILEX commented Jul 2, 2018

@knordbo Yeah, feel free to file a bug if you'd like. 👍 (It might take a while to get fixed though because the AGP team will have to file the bug with GuardSquare and wait for them to fix it.)

@knordbo

This comment has been minimized.

Show comment
Hide comment
@knordbo

knordbo Jul 3, 2018

Apparently been reported for a while: https://issuetracker.google.com/issues/74257813
Make sure to upvote.

knordbo commented Jul 3, 2018

Apparently been reported for a while: https://issuetracker.google.com/issues/74257813
Make sure to upvote.

@bhurling bhurling closed this in #370 Jul 3, 2018

v2.0 automation moved this from In progress to Done Jul 3, 2018

@SUPERCILEX

This comment has been minimized.

Show comment
Hide comment
@SUPERCILEX

SUPERCILEX Jul 3, 2018

Collaborator

@knordbo Thanks for finding that, starred!

Collaborator

SUPERCILEX commented Jul 3, 2018

@knordbo Thanks for finding that, starred!

@dlew

This comment has been minimized.

Show comment
Hide comment
@dlew

dlew Aug 27, 2018

It's looking like AGP 3.2 might go out with the empty mapping files still being generated. Could we reopen this and look into the possibility of simply ignoring empty mapping files on upload?

dlew commented Aug 27, 2018

It's looking like AGP 3.2 might go out with the empty mapping files still being generated. Could we reopen this and look into the possibility of simply ignoring empty mapping files on upload?

@SUPERCILEX

This comment has been minimized.

Show comment
Hide comment
@SUPERCILEX

SUPERCILEX Aug 27, 2018

Collaborator

@dlew yup, we already fixed it on our end: #370

Collaborator

SUPERCILEX commented Aug 27, 2018

@dlew yup, we already fixed it on our end: #370

@dlew

This comment has been minimized.

Show comment
Hide comment
@dlew

dlew Aug 27, 2018

Oh nice, great!

Any idea on when 2.0.0 will be released? (Just trying to figure out how we should proceed - if we should focus on a workaround or just wait for 2.0.0.)

dlew commented Aug 27, 2018

Oh nice, great!

Any idea on when 2.0.0 will be released? (Just trying to figure out how we should proceed - if we should focus on a workaround or just wait for 2.0.0.)

@SUPERCILEX

This comment has been minimized.

Show comment
Hide comment
@SUPERCILEX

SUPERCILEX Aug 27, 2018

Collaborator

@dlew I don't have the keys to master, so that's up to @bhurling. In the meantime, there are snapshot builds available or you can get a static JitPack artifact: com.github.Triple-T:gradle-play-publisher:860be50bec.

Collaborator

SUPERCILEX commented Aug 27, 2018

@dlew I don't have the keys to master, so that's up to @bhurling. In the meantime, there are snapshot builds available or you can get a static JitPack artifact: com.github.Triple-T:gradle-play-publisher:860be50bec.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment