BackupManagerService restoration timeout leads to force stop - android-5.0-lollipop

Since yesterday, my Nexus 5 is running Lollipop and the application I am working on is stopping without any crash.
Each time it exits, the device logs the following:
11-20 00:23:32.679: I/ActivityManager(723): START u0 {flg=0x14008000 cmp=com.mycompany.android/.app.LoginActivity} from uid 10549 on display 0
11-20 00:23:32.713: W/ActivityManager(723): Duplicate finish request for ActivityRecord{2cd672e4 u0 com.mycompany.android/.app.StartupActivity t39 f}
11-20 00:23:32.926: I/ActivityManager(723): Displayed com.mycompany.android/.app.LoginActivity: +223ms
11-20 00:23:45.734: I/ActivityManager(723): Force stopping com.mycompany.android appid=10549 user=-1: uninstall pkg
11-20 00:23:45.734: I/ActivityManager(723): Killing 24090:com.mycompany.android/u0a549 (adj 0): stop com.mycompany.android
11-20 00:23:45.793: W/ActivityManager(723): Force removing ActivityRecord{5367f0c u0 com.mycompany.android/.app.LoginActivity t39}: app died, no saved state
11-20 00:23:45.846: W/ActivityManager(723): Spurious death for ProcessRecord{33eaa703 24090:com.mycompany.android/u0a549}, curProc for 24090: null
11-20 00:23:45.853: I/ActivityManager(723): Force stopping com.mycompany.android appid=10549 user=0: pkg removed
11-20 00:23:46.188: D/BackupManagerService(723): Received broadcast Intent { act=android.intent.action.PACKAGE_REMOVED dat=package:com.mycompany.android flg=0x4000010 (has extras) }
11-20 00:24:23.646: E/BackupManagerService(723): Timeout restoring application com.mycompany.android
11-20 00:24:23.647: W/BackupManagerService(723): Tried to clear data for com.mycompany.android but not found
11-20 00:26:49.647: V/BackupManagerService(723): restoreAtInstall pkg=com.mycompany.android token=a restoreSet=3319d18fd0806258
11-20 00:26:50.025: I/BackupTransportService(1752): Current restore app : com.mycompany.android
11-20 00:26:50.027: I/BackupManagerService(723): Next restore package: RestoreDescription{com.mycompany.android : KEY_VALUE}
11-20 00:26:50.028: V/BackupManagerService(723): Package com.mycompany.android restore version [0] is compatible with installed version [0]
11-20 00:26:50.028: W/BackupManagerService(723): Signature mismatch restoring com.mycompany.android
11-20 00:26:50.236: D/BackupManagerService(723): Received broadcast Intent { act=android.intent.action.PACKAGE_ADDED dat=package:com.mycompany.android flg=0x4000010 (has extras) }
11-20 00:26:50.240: D/BackupManagerService(723): Now staging backup of com.mycompany.android
It sounds like that the system decides to force stop my application because the restoration times out.
It also happens when the app is correctly signed.
BackupManager related implementation was running fine until 4.4.2.
I am currently checking if not invoking any BackupManager APIs works around this unexpected/silent force-stop. For now it looks ok.
Any suggestion?

With gradle in Android Studio you can create a debug directory with an AndroidManifest.xml file for your debug build to disable the BackupManager:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools">
<application
android:allowBackup="false"
tools:replace="android:allowBackup">
</application>
</manifest>

Related

Cannot set configuration in Elastic Beanstalk

I have 4 Elastic Beanstalk deployments: 3 are Corretto 8 and the other one is Corretto 11.
On the Corretto 8 deployments, I can set new configuration without issue. On the Corretto 11 instance, however, any attempt to set a new configuration fails and causes a rollback.
The Corretto versions might not be the problem, but it's the only difference I can see. All 4 apps are Spring Boot apps that run as web servers (i.e embedded tomcat with exposed web ports). I am trying to set the exact same configuration name and value, and it only fails on the one instance.
The configuration I'm trying to set is pretty simple:
VALIDATE_RENEWALS = true
Even just trying to set DEBUG = true causes a failure and rollback.
I don't see a lot of information from the console about what's failing. Here is the event log:
2020-03-16 13:55:17 UTC-0600 INFO The environment was reverted to the previous configuration setting.
2020-03-16 13:54:45 UTC-0600 ERROR During an aborted deployment, some instances may have deployed the new application version. To ensure all instances are running the same version, re-deploy the appropriate application version.
2020-03-16 13:54:45 UTC-0600 ERROR Failed to deploy configuration.
2020-03-16 13:54:45 UTC-0600 ERROR Unsuccessful command execution on instance id(s) 'i-00553f4ac36afd327'. Aborting the operation.
2020-03-16 13:54:45 UTC-0600 INFO Command execution completed on all instances. Summary: [Successful: 0, Failed: 1].
2020-03-16 13:54:45 UTC-0600 ERROR [Instance: i-00553f4ac36afd327] Command failed on instance. An unexpected error has occurred [ErrorCode: 0000000001].
2020-03-16 13:54:20 UTC-0600 INFO Updating environment XXX's configuration settings.
2020-03-16 13:54:15 UTC-0600 INFO Environment update is starting.
I've also downloaded the full set of logs for the instance and don't see anything obvious. The app stdout doesn't have any errors or exceptions, it just starts normally and then gets terminated. None of the other log files have messages around the times above, so I'm really not sure what else I can look at.
Edit
The times don't line up but I do see this in eb-engine.log file:
2020/03/16 17:54:38.508634 [INFO] checking whether command is applicable to this instance...
2020/03/16 17:54:38.508658 [INFO] this command is applicable to the instance, thus instance should execute command
2020/03/16 17:54:38.508665 [INFO] check whether this is an enhanced env...
2020/03/16 17:54:38.508794 [INFO] Executing instruction: StageJavaApplication
2020/03/16 17:54:38.508858 [ERROR] GetArchivedFileType with file /opt/elasticbeanstalk/deployment/app_source_bundle failed with error open /opt/elasticbeanstalk/deployment/app_source_bundle: no such file or directory
2020/03/16 17:54:38.508868 [ERROR] An error occurred during execution of command [config-deploy] - [StageJavaApplication]. Stop running the command. Error: staging java app failed with error GetArchivedFileType with file /opt/elasticbeanstalk/deployment/app_source_bundle failed with error open /opt/elasticbeanstalk/deployment/app_source_bundle: no such file or directory

Sonar Qube plugin problems with Flex

I'm having problems after an upgrade of my Sonar Qube :(
I installed the newest version (5.0) of Sonar Qube using an existing MySQL database. The previous Sonar Qube version was 3.7.4.
I'm using it to analyze a pure ActionScript project using the Flex plugin (Version 2.1).
The problems to me seem threefold:
Just starting the server and viewing previous analysis results I get gray
rects where code quality used to be indicated in shades of green etc.
After installing the Flex plugin using the Update Center this
remains.
Running the sonar-runner (version 2.4) I get two types of errors:
A whole lot of these:
23:35:01.572 DEBUG - Resource org.sonar.api.resources.Directory#46815882[key=path/to/folder] was found using deprecated key. Please update your plugin.
After which the analysis exits with this:
23:35:01.585 INFO - Sensor FlexSquidSensor done: 4508 ms
23:35:01.585 INFO - Sensor org.sonar.plugins.flex.cobertura.CoberturaSensor#1f96a21e...
23:35:01.585 INFO - No Cobertura report provided (see 'sonar.flex.cobertura.reportPath' property)
23:35:01.585 INFO - Sensor org.sonar.plugins.flex.cobertura.CoberturaSensor#1f96a21e done: 0 ms
23:35:01.585 INFO - Sensor SCM Sensor (wrapped)...
23:35:01.612 INFO - SCM provider for this project is: git
23:35:01.612 INFO - Retrieve SCM blame information...
23:35:01.615 INFO - 280 files to be analyzed
23:35:04.012 DEBUG - Updating semaphore batch-nl.manno:Earz
23:35:04.447 DEBUG - Release semaphore on project : org.sonar.api.resources.Project#4aa0b07b[id=60,key=nl.manno:Earz,qualifier=TRK], with key batch-nl.manno:Earz
INFO: ------------------------------------------------------------------------
INFO: EXECUTION FAILURE
INFO: ------------------------------------------------------------------------
Total time: 14.293s
Final Memory: 15M/123M
INFO: ------------------------------------------------------------------------
ERROR: Error during Sonar runner execution
org.sonar.runner.impl.RunnerException: Unable to execute Sonar
at org.sonar.runner.impl.BatchLauncher$1.delegateExecution(BatchLauncher.java:91)
at org.sonar.runner.impl.BatchLauncher$1.run(BatchLauncher.java:75)
at java.security.AccessController.doPrivileged(Native Method)
at org.sonar.runner.impl.BatchLauncher.doExecute(BatchLauncher.java:69)
at org.sonar.runner.impl.BatchLauncher.execute(BatchLauncher.java:50)
at org.sonar.runner.api.EmbeddedRunner.doExecute(EmbeddedRunner.java:102)
at org.sonar.runner.api.Runner.execute(Runner.java:100)
at org.sonar.runner.Main.executeTask(Main.java:70)
at org.sonar.runner.Main.execute(Main.java:59)
at org.sonar.runner.Main.main(Main.java:53)
Caused by: java.lang.IllegalArgumentException: Expected one blame result per line but provider returned 3 blame lines while file src/nl/aloft/earz/core/modules/interval/Interval.as has 76 lines
at com.google.common.base.Preconditions.checkArgument(Preconditions.java:88)
at org.sonar.batch.scm.DefaultBlameOutput.blameResult(DefaultBlameOutput.java:68)
at org.sonar.plugins.scm.git.JGitBlameCommand.blame(JGitBlameCommand.java:131)
at org.sonar.plugins.scm.git.JGitBlameCommand.access$000(JGitBlameCommand.java:44)
at org.sonar.plugins.scm.git.JGitBlameCommand$1.call(JGitBlameCommand.java:105)
at org.sonar.plugins.scm.git.JGitBlameCommand$1.call(JGitBlameCommand.java:102)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
at java.lang.Thread.run(Thread.java:695)
logout
Now I used to have more plugins installed than just Flex (including the mentioned Cobertura) but after installing those Sonar Qube fails to run at all without too much notification (needless to say the runner won't run either).
Can anyone shed some light on this?
Thanks in advance,
Manno
We already faced this issue with files having old Mac line ends (CR or \r). Git will not consider them as line ends so you end up having less lines in your blame than in your file.
You can "clean" your file using mac2unix utility.

Harmon.ie for SharePoint Exception on Init - Registry Access

I have a user who has successfully installed Harmon.ie to the computer, but the log file is showing an "Exception on Init" error. The complete error is below:
Starting Harmonie
2015-01-16 06:48:57,172 INFO [1] Mainsoft.Harmony.AddIn.HarmonyAddIn - OnConnection
2015-01-16 06:48:57,747 INFO [1] Mainsoft.Harmony.AddIn.HarmonyAddIn - Load Harmonie version: 3.4.0.9975 Outlook Version 14.0.0.7105 X86 bit
2015-01-16 06:48:57,748 ERROR [1] Mainsoft.Harmony.AddIn.HarmonyAddIn - Exception on Init
System.Security.SecurityException: Requested registry access is not allowed.
at System.ThrowHelper.ThrowSecurityException(ExceptionResource resource)
at Microsoft.Win32.RegistryKey.OpenSubKey(String name, Boolean writable)
at Mainsoft.Harmony.Utils.RedemptionCleaner.CleanOrphanRegistryKeys()
at Mainsoft.Harmony.AddIn.HarmonyAddIn.Init()
The Zone of the assembly that failed was:
MyComputer
Does anyone know the registry key that is trying to be accessed?
Harmon.ie needs to access at the stage reported in the stack traces you have originally attached the following keys under HKEY_CURRENT_USER\SOFTWARE\Classes
"Redemption.Addin",
"Redemption.AddressLists",
"Redemption.MAPIFolder",
"Redemption.MAPITable",
"Redemption.MAPIUtils",
"Redemption.RDOSession",
"Redemption.SafeAppointmentItem",
"Redemption.SafeContactItem",
"Redemption.SafeCurrentUser",
"Redemption.SafeDistList",
"Redemption.SafeInspector",
"Redemption.SafeJournalItem",
"Redemption.SafeMailItem",
"Redemption.SafeMeetingItem",
"Redemption.SafePostItem",
"Redemption.SafeReportItem",
"Redemption.SafeTaskItem",
"Mainsoft.Harmony.OutlookSidebar.TaskPaneSidebarAx"
Outlook should run under an account with sufficient privileges to read\write under HKEY_CURRENT_USER.
By the way, you are running a quite old version of Harmon.ie, I suggest you download and install the latest 4.5 version from harmon.ie web site.
--- Jean
This error indicates the user did not have sufficient permission to access this registry key.
Do you reproduce it when running Outlook as admin? (please try also to install as admin)
--- Jean

Play TypeSafe Activator fails to start - IllegalArgumentException "Failed to download new template catalog properties"

Moving from play 2.2.x to latest activator last night. Downloaded minimal 1.2.10, extracted it in program file (x86)\typesafe... and put the directory into the system path variable. cloned my repository, and when i executed activator run it downloaded the required modules and my app is up and running. All great so far. run works!
Then I tried to create a new app, and activator fails, with the following trace:
Checking for a newer version of Activator (current version 1.2.10)...
... our current version 1.2.10 looks like the latest.
Found previous process id: 9632
FOUND REPO = activator-local # file:////C:/Program%20Files%20(x86)/Typesafe/activator-1.2.10-minimal/repository
Play server process ID is 9760
[info] play - Application started (Prod)
[info] play - Listening for HTTP on /127.0.0.1:8888
[info] a.e.s.Slf4jLogger - Slf4jLogger started
[WARN] [10/30/2014 10:47:13.972] [default-akka.actor.default-dispatcher-2] [ActorSystem(default)] Failed to download new template ca
talog properties: java.lang.IllegalArgumentException: requirement failed: Source file 'C:\Users\admin\.activator\1.2.10\templates\in
dex.db_6e0565f0c8826b17.tmp' is a directory.
[ERROR] [10/30/2014 10:47:13.972] [default-akka.actor.default-dispatcher-2] [akka://default/user/template-cache] Could not find a te
mplate catalog. (activator.templates.repository.RepositoryException: We don't have C:\Users\admin\.activator\1.2.10\templates\cache.
properties with an index hash in it, even though we should have downloaded one
activator.templates.repository.RepositoryException: We don't have C:\Users\admin\.activator\1.2.10\templates\cache.properties with a
n index hash in it, even though we should have downloaded one
at activator.cache.TemplateCacheActor.preStart(TemplateCacheActor.scala:184)
at akka.actor.Actor$class.aroundPreStart(Actor.scala:470)
at activator.cache.TemplateCacheActor.aroundPreStart(TemplateCacheActor.scala:25)
at akka.actor.ActorCell.create(ActorCell.scala:580)
at akka.actor.ActorCell.invokeAll$1(ActorCell.scala:456)
at akka.actor.ActorCell.systemInvoke(ActorCell.scala:478)
at akka.dispatch.Mailbox.processAllSystemMessages(Mailbox.scala:263)
at akka.dispatch.Mailbox.run(Mailbox.scala:219)
at akka.dispatch.ForkJoinExecutorConfigurator$AkkaForkJoinTask.exec(AbstractDispatcher.scala:393)
at scala.concurrent.forkjoin.ForkJoinTask.doExec(ForkJoinTask.java:260)
at scala.concurrent.forkjoin.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1339)
at scala.concurrent.forkjoin.ForkJoinPool.runWorker(ForkJoinPool.java:1979)
at scala.concurrent.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:107)
I've taken a look at several similar issues on SO and elsewhere. I've deleted .activator directory and retried, I've tried this process from behind a proxy and not, as well as offline (surely offline should work!), but it consistently gives the above error. activator ui gives the same error. I'm stuck and any suggestions would be appreciated. (Edit. tried with full activator download, rather than minimal, and I get the same error.)
Look for reasons it might be impossible to create or access 'C:\Users\admin.activator\1.2.10\templates\in
dex.db_6e0565f0c8826b17.tmp' ... maybe a permissions issue?
The failed check is for "is a directory" but that also fails if it just doesn't exist or can't be accessed.

Hudson | NullPointerException while loading jobs

We are using hudson version 2.0.0.
Few days back after restarting hudson, i found that some of the jobs were missing.
Found that its due to the following NPE.
Dec 9, 2011 11:39:34 AM hudson.model.Hudson$5 onTaskFailed
SEVERE: Failed Loading job ABC
java.lang.NullPointerException
at hudson.model.Project.createTransientActions(Project.java:206)
at hudson.model.AbstractProject.updateTransientActions(AbstractProject.java:627)
at hudson.model.AbstractProject.onLoad(AbstractProject.java:287)
at hudson.model.Project.onLoad(Project.java:87)
at hudson.model.Items.load(Items.java:109)
at hudson.model.Hudson$13.run(Hudson.java:2376)
at org.jvnet.hudson.reactor.TaskGraphBuilder$TaskImpl.run(TaskGraphBuilder.java:146
at org.jvnet.hudson.reactor.Reactor.runTask(Reactor.java:259)
at hudson.model.Hudson$4.runTask(Hudson.java:707)
at org.jvnet.hudson.reactor.Reactor$2.run(Reactor.java:187)
at org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:94)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTaskThreadPoolExecutor.java
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
Upgrading to 2.1.2 didnt help. I removed all the plugins and re-installed, but in vain.
Has anybody else faced this?
Thanks,
Gayathri
OK I found the problem.
To fix this issue, I had to add the line that contains <publishers/> to each config.xml file in projects that failed to load (towards the end of XML file):
</builders>
<buildWrappers/>
<publishers/>
</project>
Somehow without this, Hudson/Jenkins barfs and hides in the corner crying.
Jobs will go missing from the dashboard when there is a parse error in the config.xml.
You can inspect these errors in Hudson / Manage Hudson / System Log looking for
Caused by: com.thoughtworks.xstream.converters.ConversionException: Could not call hudson.scm.CVSSCM.readResolve() : null :
It means the auto parameter migration failed and you have to edit the config.xml in the Jobs root by hand, the debug information in the log provides the offending line number. Commenting out the item usually works. Sometimes manual reconfiguring is needed.
Jobs will go missing from the history between restarts when the file build.xml is not generated in the build/<jobref> directory. If there is an exception in any plugin, it may cause the creation of this file to be skipped, and it will not show in history after a restart. Again looking in the log using Hudson / Manage Hudson / System Log is the quickest way to find the offending plugin. Disabling usually resolves the problem.
Please note that searching for "Missing Hudson Builds" will point to many different plugins/versions that all cause this problem. You should look in YOUR log to find what is causing the problem in YOUR installation, and only disabling the plugin that is causing YOUR problem.
A warning about "failed to generate build.xml" would save a lot of hours. I should open a bug on that.