androidandroid-studiovisual-studio-app-centervisual-studio-app-center-distributeappcenter

AppCenter removes Android app releases after producing some logs within hours


We have an Android app on AppCenter which is supposed to be published whenever we approve pull request to merge into production branch. I recently added extensive logging to catch some bugs but after that, our releases remain in AppCenter Release section for several hours and then they get disappeared. The logs are meant to record an event/error. They have been 20 logs for 9 hours of today and then our release was disappeared. (Release section shows previous one as the release) but in recorded logs, the release number shows that it has been live for some hours. What is going wrong? I put that logging mechanisms inside Application Class inside an UncaughtThreadHandler to log crashes before AppCenter does. Maybe they have interference? Or the property of the log is too long?

My log sample:

val properties: HashMap<String?, String?> = object : HashMap<String?, String?>() {
                                    init {
                                        put("Situation", "contentList is null! Error in playing content: found nothing to play!")
                                        put("Class Name", this.javaClass.name)
                                        put("state.selectedStation?.title", state.selectedStation?.title)
                                        put("state.selectedStation?.id", state.selectedStation?.id?.toString())
                                        put("state.selectedStation?.genericMultiLangField1", state.selectedStation?.genericMultiLangField1)
                                        put("Device Unique ID", (application as GeoMuseumApplication).deviceUniqueId)
                                        put("User Chosen Language", SessionSettings.language)
                                        put("LastAudioPlayedOnThisScreen", relativeHref)
                                        put("state.selectedStation?.contentList.isNull ?", (state.selectedStation?.contentList == null).toString())
                                    }
                                }
                            Crashes.trackError(NullPointerException("Cause: state.selectedStation?.contentList.isNullOrEmpty()"), properties, null)

Solution

  • The problem was that our code somewhere was stuck in an infinite loop when an error happened, reporting that error to AppCenter for infinite times and hence, AppCenter recognized it as a DOS attack and removed the release with future associated logs. In general, if AppCenter detects any malicious activity, it removes that release.