Can't upload apk to Play Store

Last August I uploaded my first apk for alpha testing to the Google Play Store.

Last week I unpublished that app, created a new app with a slightly different name and since then I cannot upload a new apk. I am using build-tools version 23.0.1

I followed these instructions, dozens of times: http://guide.meteor.com/mobile.html#submitting-android

I get this result:

Upload failed
Your APK has been signed with multiple certificates. Please only sign it with one certificate and upload it again.
You need to use a different package name because “com.idbzpo1upqh87wp5no3r” is already used by one of your other applications.

I’ve read a great many threads on the “multiple certificates” but I can’t get past it. The second error I thought maybe was because the play store told me it could take up to 24 hours to unpublish, but it’s been 5 days.

Can anyone advise?

Haven’t hit this exact one, but I’m thinking you may need to use the cordova override to get to a point that Google likes?

Related links:

cordova-build-override docs

setting versions in the override

Thanks. Those links got me thinking about mobile-config.js. I had completely forgotten about that file having only used it once 8 months ago, and having always built with mup (and more recently, mupx).

Next I hit the deprecated ldpi stuff, which I found is actually documented here: http://guide.meteor.com/1.3-migration.html#mobile, so that part was easily solved.

Then I hit this one: /home/fugbert/.meteor/packages/meteor-tool/.1.3.1.1lem8vw++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/isopackets/cordova-support/npm/node_modules/meteor/promise/node_modules/meteor-promise/promise_server.js:116
throw error;
^
SyntaxError: Unexpected token A

And that exact error (down to line number even) I found mentioned only here: Error after updating meteor to 1.3 however pretty much everything on that thread seems to relate to Windows only and I’m on Ubuntu 14.04. Also from that thread I tried the @brianfox thing of moving .meteor, running, getting the error about “meteor create”, then moving .meteor back, but it did not change anything.

Is there some cleaner way I need to completely remove meteor, clean my .meteor folder (everything is in my github repo of course which worries me some) and reinstall meteor 1.3.x?

Have you tried to set an id in the App.info() section of mobile-config.xml? This is where you can set the package name.

Thanks!

Sorry I just now saw your reply for some reason even though of course I was automatically subscribed to this thread.

Of the two error messages I was getting from the play store (in my original post), the first one seemed to go away on its own. I had only done a “meteor update”, no code changes (which only updated a few packages, meteor remained 1.3.1)

I did try adding an id as you suggested, even though the docs state here that that section is entirely optional: http://docs.meteor.com/#/full/mobileconfigjs and the Alpha APK finally was successfully uploaded!

Now, I did have the App.info, but just not with the id. Furthermore, I find no documentation that tells me what the id should be. But the way I’ve always seen it is in the reverse of the server name (com.example.chris, or whatever), so I did that (hope that’s ok?)

Maybe there is a better place for me to bring up these issues so that the guide can be more clear?

Hi @chrisco23: The id can be chosen to your liking, but you have to ensure it is unique across all developers world-wide. Otherwise it could happen that Xcode complains that the id is already used. Hence it’s a good practice to use the reverse domain notation to avoid any potential clashes. I’m not sure if this restriction also applies to Android, but in Java it is also common to use reverse domain notation to name packages to avoid any clashes if you use 3rd party libraries. So I would recommend this approach also from this perspective.

BTW: You should also make sure you increment the version number each time you upload the APK to Google. Otherwise it won’t work.

That’s a misconception. In JavaScript, you often name input parameter objects options even if some of the parameters are mandatory. If it were optional, the Meteor docs would specify it as [options]. And if you look at the Cordova documentation linked from the Meteor docs, the id field is marked as mandatory:

http://cordova.apache.org/docs/en/latest/config_ref/index.html

Thanks for the explanation and the tip on the version number.

It was very cool last night though to see the hot-code-push happening on mobile. As long as I’m the sole alpha tester (soon to be myself and my client/partner) is there any reason to upload a new apk?

I understand but I was actually referring to the meteor docs where they describe mobile-config.js.

The code reads:

// This section sets up some basic app metadata, // the entire section is optional. App.info({ id: 'com.example.matt.uber', name: 'ĂĽber', description: 'Get ĂĽber power in one button click', author: 'Matt Development Group', email: 'contact@example.com', website: 'http://example.com' });

Ah, I see, you’re right!

Maybe @martijnwalraven might want to adjust that? IMHO, this section should also include the version, as it is required to upload new APKs.

Here are my experiences with this:

  • You need to upload a new .apk / .ipa if you add any Cordova plugins. Because these plugins contain native code, a HCP is not sufficient in this case.
  • Apple does not accept HCP, at least if they notice it. I had implemented a nice dialog that requests user permission before performing the HCP, just to avoid any unwanted interruptions due to the reload. When Apple saw this dialog, they asked me to remove these silent updates. Well, I’m still using HCP for iOS, but I disabled the dialog and deferred the HCP until the user closes and re-opens the app.
  • Until Meteor 1.2, HCP was very unreliable. So it could happen that it bricked the app and the user had to re-install it from the app-store. This has been fixed in 1.3, thanks to Martijn. I don’t have any experiences with this new HCP yet, but I’m sure it’s working as it should now. If you’re still on 1.2, though, as I am, it might be wise to avoid too many HCPs.

more good things to know especially for when I get to iOS.

For now, no cordova plugins, Meteor 1.3.2, and only targeting Android so far, so it sounds like I’m probably ok. Still a little wary of updating apk’s because of the original difficulties (now thankfully resolved).

1 Like

If you update the version tag and include a valid id, you should be fine. In my experience, uploading to Google Play works much smoother than uploading to Apple’s store.