We developed a mobile app in Java with Android Studio using the Square Reader SDK to process payments with the Reader device. Since the Square Reader SDK is retired, we are migrating our mobile app to the Mobile Payments SDK.
I have the problem that our mobile app is unable to connect to the Square services as shown in the screenshots below.
We are not distributing our mobile app through the Google Play Store but we deliver it as Signed APK files to our customers who use the app internally. I have created Signed APK files for testing and executed them on the test device (a Zebra EC55). I am able to run the app itself, but I am unable to connect to the Square services. We show the Square page for the settings and I was able to use it to pair to a physical Square Reader (1st Generation). But both pages show the same “Reader unavailable” error “Unable to establish a secure connection to Square”.
The mobile phone uses Wi-Fi connection and I can browse normally using the Chrome browser. No SIM card is installed. It is the same setup with the same type of devices that our customers use.
The application Id is sq0idp-QjFeYcXFd7vyAj0YmPwoxA.
Developer mode is not activated.
The device has been restarted multiple times and is fully charged.
We are using production credentials.
The location we selected is currently accepting payments via the old Reader SDK so it should be able to accept payments here, too.
The app’s domain and SHA256 was set under “Mobile Payments SDK” in the Square portal. Since we are delivering Signed APK files, the SDHA256 was taken via command line on Windows with CertUtil -hashfile [FILENAME] SHA256.
If this documentation helped you find a solution, please check the box indicating that this reply solves the problem.
Otherwise one of our Developer Advocates will provide additional assistance shortly.
I set the application’s namespace and SHA256 in the Square portal and tried to connect many times after that, yes. There is not information to be found if there is an issue there.
Good morning, I was hoping that it just needed some time for the Square Portal to update itself, but 16h later the issue remains the same. All applications on the Zebra EC55 mobile device are able to connect to the internet or their services. I still get the same errors for Square though. Is there any way I can investigate what causes the issue?
The team says that the app has been modified in a way that might or might not be intentional. If it’s unintentional, it should be fixable by re-installing. So if you delete it and re-install the app does it work?
I have now reinstalled the mobile app several times and I always come to the same result as shown in the image below. I can identify the reader (it blinks orange when I press “Identify reader”), but the error message still says the Reader is unavailable.
The mobile app has not been touched in over three years until we recently replaced the Reader SDK of yours with the Mobile Payment SDK. Because of the time in between, the version of Android Studio, Android Gradle, and many dependencies has changed. Outside of the usage of the payment SDK no changes have been made. I also had to use a new Keystore file to signing the APK file because the original developer is no longer working for the company and he had the Keystore file locally as we found out.
The SHA256 signature was obtained in the way I described in my original post for the Signed APK file which I would like to use for testing and once the testing is successful, it should be used for Release. If we have to make code changes, I do not know whether the signature would be the same. If it differs, I would add the new one in the Square Portal.
Hello Bryan, I do have not access to the last Release since it was made by a former employee before we built the infrastructure we currently have. Is there anything that I can do to make my viable? If you are talking about mismatching signatures, I am assuming there is a validation or authorization issue?
Hello Bryan, the Application Id should be the same, but the Location Id would be different. We created other locations for our customers so we can easily identify to which customer a payment belongs. I cannot use our customer’s Location Id for our final tests since the payments would show up for them.
I was reading this thread when I solved this issue so I thought I’d leave a reply in case it’s helpful.
I was using ADB to test my build and it wasn’t automatically installing the signed release version to my test device. I manually installed the correct version withadb install app-release.apk and it connected succesfully.
I used Square’s demo app and realised I couldn’t connect on that either, which helped me narrow down the issues.
Apologies for the delay. I have downloaded and installed the Android SDK command-line tools and I was able to successfully install our app on the mobile device. The app itself works perfectly fine and as expected - except Square. The issue which I reported in this thread still exist and have not changed. I also made sure to leave the Developer Mode on the phone and to disconnect from USB in case there are some hidden security checks in the component. How can I investigate this issue, Square?