Skip to content
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

No application was found for the given package name.. error #106

Closed
IvoVentura opened this issue Sep 19, 2018 · 11 comments
Closed

No application was found for the given package name.. error #106

IvoVentura opened this issue Sep 19, 2018 · 11 comments

Comments

@IvoVentura
Copy link

Hello,

I'm having issues using the extension when I try to upload the apk to Google play I get the following error:

2018-09-19T07:39:15.3157050Z Authenticated with Google Play and getting new edit
2018-09-19T07:39:15.3241920Z ##[debug]Creating a new edit transaction in Google Play.
2018-09-19T07:39:15.3330200Z ##[debug]Request Parameters: {"packageName":"6.0-2438415"}
2018-09-19T07:39:15.6219660Z ##[debug]Failed to create a new edit transaction for the package 6.0-2438415.
2018-09-19T07:39:15.6308820Z ##[debug]Error: No application was found for the given package name.
2018-09-19T07:39:15.6383700Z ##[debug]task result: Failed
2018-09-19T07:39:15.6539700Z ##[error]Error: Failed to create a new edit transaction for the package 6.0-2438415. Failed with message: Error: No application was found for the given package name.. See log for details.

Looking at the manifest we can see that the step is grabbing the "platformBuildVersionName" instead of the "package" when doing the Request Parameters, which causes the above error.

Can you guys help?

Thanks in advance,
Best Regards

@lkillgore
Copy link
Contributor

Hi @IvoVentura, unfortunately, I can't reproduce the issue. In my test APKs, it's properly reading the correct package name.

The code that gets the package name is here, and as you can see it's trying to get the value from 'package'. We're using adbkit-apkreader, and in (briefly) looking through their source nothing stands out as something that would change that value when being read.

Some questions for you: could you please supply your AndroidManifest.xml file (or a redacted snippet... I'm interested in how the XML looks for 'package' and 'platformBuildVersionName')? Does it look different from the AndroidManifest.xml file located in the APK (if you didn't know, you can unzip the APK, and extract the manifest)? Does manually uploading this APK to the android developer console work?

Hopefully, we'll be able to get to the bottom of this quickly. Thanks!

@IvoVentura
Copy link
Author

Hi @lkillgore,

Thanks for your reply, we have tried again today and we got the same error. I've attached the manifest we are using. Uploading the app manually on the android developer console directly works fine, it was the workaround that we've used.

Thanks,
Best Regards

AndroidManifest.zip

@lkillgore
Copy link
Contributor

Thanks, @IvoVentura. I don't see anything odd about your manifest, and I tried injecting some of your values in my test project, but I wasn't able to reproduce the issue. I think the next step would be to try to figure out where things are going sideways. Unfortunately, I can't test much on my side without your APK, but I think I can walk you through some steps. Could you try this out?

  1. Install NodeJS and NPM
  2. Copy your APK to a temp folder
  3. Navigate to the temp folder in a command prompt or terminal window
  4. Run npm install adbkit-apkreader
  5. Run from this location an interactive Node prompt (type node)
  6. Run this script:
const reader = require('adbkit-apkreader')
reader.open('filename-of-your-apk.apk').then(apk => apk.readManifest()).then(manifest => console.log(JSON.stringify(manifest)));

It should produce something along the lines of:

{"versionCode":12345,"versionName":"1.0","compileSdkVersion":28,"compileSdkVersionCodename":"9","package":"com.microsoft....","platformBuildVersionCode":28,"platformBuildVersionName":9,"usesPermissions":[],.....

If you could let me know what the values are for package and platformBuildVersionName, it would let me know whether the issue is in with the extension or a problem with the reader.

@IvoVentura
Copy link
Author

Hi @lkillgore,

I've run the script, this the result:

{"versionCode":7618,"versionName":"uses-permission","installLocation":0,"package":"6.0-2438415","platformBuildVersionCode":23,"platformBuildVersionName":"3.1.180919.2","manifest":7618,"com.gfi.companyhub":"uses-permission","usesPermissions":[],"permissions":[],"permissionTrees":[],"permissionGroups":[],"instrumentation":null,"usesSdk":null,"usesConfiguration":null,"usesFeatures":[],"supportsScreens":null,"compatibleScreens":[],"supportsGlTextures":[],"application":{}}

Best Regards

@lkillgore
Copy link
Contributor

Hi @IvoVentura, that's very useful. Thanks!

I see this:
"package":"6.0-2438415", (which is in your manifest is 'platformBuildVersionName')
"platformBuildVersionName":"3.1.180919.2", (which in your manifest is 'versionName')

The rest gets weirder. It seems to be an issue with the apkreader. Could you please open a ticket here: https://github.com/openstf/adbkit-apkreader/issues and link back here? I'll keep an eye on it, and chime in.

Also, if you want me to look into it further, I'll need to have an APK that can reproduce the issue. If you have one you don't mine public, you could put it here. Or you can email it to me at lukillgo at microsoft dot com.

@IvoVentura
Copy link
Author

Hi @lkillgore,

We have opened the issue on the Adbkit-apkreader issues:
openstf/adbkit-apkreader#17

I'll shortly send you an email with the apk file.

Best Regards

@IvoVentura
Copy link
Author

Hi @lkillgore,

The folks at adbkit-apkreader fixed the issue on their end and release a version 3.0 of their plugin.

I've tested it using the commands you provided and it now obtains the correct values.

Best regards

@lkillgore
Copy link
Contributor

That's fantastic! I'll get around to making a new release as soon as possible. And, thank you for helping us to work through this issue!

I'll post an update to this thread when I'm ready to update the plugin.

@IvoVentura
Copy link
Author

Ok, thank you

@lkillgore
Copy link
Contributor

@IvoVentura, I've updated the extension in the marketplace which should trickle its way to your Azure DevOps account soon. Unfortunately, I can't verify the fix in production myself, so if you could verify that it's working and close out this bug (or let me know that it's not), that would be a big help.

Thanks!

@IvoVentura
Copy link
Author

Hi @IvoVentura,

I've tested and now it works fine :)

Thanks for all your help,
Best Regards

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants