APK Release On Google Play Not Connecting To Server

#1

Please help!! I can’t get my apk to connect to my server. I built using this line: meteor build C://output directory --server https://mysite.com I can’t seem to get it to work, but it works fine using: run android-device --mobile-server https://mysite.com. This is a signed and zipaligned app for Google Play. I can’t figure out what I’m doing wrong.

#2

Remove https it will work. Also make sure the app is running on mysite.com

#3

I do like this and works fine:

meteor build /build --mobile-settings settings-production.json --server https://myapp.com

jarsigner -verbose --keystore keystore.jks -sigalg SHA1withRSA -digestalg SHA1 /build/android/release-unsigned.apk <signature_name>

$ANDROID_HOME/build-tools/27.0.3/zipalign 4 /build/android/release-unsigned.apk /build/android/myapp.apk

But you can check if your https://mysite.com is works fine before.

1 Like
#4

This one should work. But first you need to deploy your app. For example Galaxy.
you will get a free domain from galaxy such as myapp.meteorapp.com

then build your app as follow. Make sue you to have your mongo url in your settings.json

Access galaxy here https://galaxy.meteor.com/

meteor build /build  --server  myapp.meteorapp.com

Please tag me so i can get a notification for a quick response.
Hope it help! :slight_smile:

#5

Hi, thanks for the response. I’ve had my app hosted on Galaxy for a few years now. The problem is that I’m finally ready to release the app to the Play Store and it doesn’t connect to the server. The app is running on galaxy and I have tried everyone’s suggestions, but it still doesn’t connect. I have no idea what I’m doing wrong. I tried morningstardev13 and raragao’s suggestions on the build, but still nothing. I have my MongoURL in the setttings.json. I’m using MLab for my database.

#6

Hey, I’m not sure how to tag someone on here, but I appreciate your help.

#7

I had an issue like this as well, turns out it was my SSL certificate on Galaxy.

Check out this article:

https://www.ninjapixel.io/adding-ssl-to-meteor-galaxy.html

1 Like
#8

So do I run that force ssl command with my build command?

#9

Try this one

meteor build /build --server http://www.myapp.com

I think it should work. :thinking:

1 Like
#10

Use http instead of https.

Maybe your website is signef under ssl. That might be the reason.

:thinking:

#11

I didn’t try building with http instead of https. I will try that tonight. Thank you!

#12

It will work for sure. Let me if it works :slight_smile:

#13

So I built with just http on the server command, but the app is still not connecting.

#14

Thanks for this idea!!!

#15

I added the force ssl package to meteor and then built with the following: meteor build C://outputdirectory --server=https://www.mysite.com. It worked!!!

2 Likes