eventOneHQ / apkup

🚀 Publish APKs to Google Play directly from the terminal
https://oss.eventone.page/apkup
MIT License
36 stars 12 forks source link

When trying to upload .aab file got: ERROR: APK does not contain 'AndroidManifest.xml' #33

Closed chenop closed 4 years ago

chenop commented 4 years ago

Thanks for this package - great tool for deploying!

Tried to do the following:

apkup 
  --key ./key.json 
  --apk /path/to/app-release.aab 
nprail commented 4 years ago

@chenop What version of apkup are you using? AAB support was introduced in 1.3.0.

Based on the error message, it sounds like it is trying to parse the AAB as an APK. That should only happen if the file extension is .apk. Or if the apkup version is earlier than 1.3.

chenop commented 4 years ago

Appreciate your effort to help.

apkup: 1.3.0 java: Java(TM) SE Runtime Environment (build 14.0.2+12-46)

Still got the: ERROR: APK does not contain 'AndroidManifest.xml'

nprail commented 4 years ago

Interesting. Try again but first run:

export DEBUG=apkup:*

Then paste the full output here. Make sure you redact any sensitive info, though 🙂

chenop commented 4 years ago
➜  scripts > export DEBUG=apkup:*
➜  scripts > apkup --key ./key.json --track beta --apk /path/to/release/app-release.aab 
â ‹ Uploading APK...  apkup:helpers > Parsing manifest +0ms
ERROR: APK does not contain 'AndroidManifest.xml'
nprail commented 4 years ago

@chenop Is that the entire output?

There should be another line that is something to the effect of:

apkup:helpers > File path ${apkFile}

After that, it checks the file extension with path.extname and parses either as an AAB or an APK. It seems that it is trying to parse the AAB as an APK.

https://github.com/eventOneHQ/apkup/blob/master/src/helpers.ts#L28

chenop commented 4 years ago

Ok, what happens is that there was an old apkup installed globally...

Once I've uninstalled it - things started to work. Sorry for this and thank you for your support!

nprail commented 4 years ago

Ah, that would explain it! I was pretty confused as to why that would have been happening :)

No problem, I'm glad to help!