Most probably, being stuck at the end of uploading means the APK parsing error (the UI should return an error but sometimes it doesn't).
Please check the following places for errors:
1. Open the Chrome developer console, "Network" section, and check the HTTP errors
2. Check this file: /var/lib/tomcat9/logs/catalina.out, it should contain the error stack trace in the case of error.