I am using MSIX packaging to deploy .NET desktop applications. The app is built by Azure Pipelines and the installation package is deployed to a shared folder on a file server.
When I run the .appinstaller, the dialog opens and applies updates as it should. But then the dialog closes, and nothing happens for over 1 minute. Then the app starts.
TEST 1 - Normal user
Looking in the event log, there is first this warning:
App manifest validation warning: Declared namespace
http://schemas.microsoft.com/developer/appx/2015/build is
inapplicable, it will be ignored during manifest processing.
Then several messages like
error 0x5: Deleting file \?\C:\Program
Files\WindowsApps\Deleted\8b7d5c25-92aa-4962-9e74-93b9685ce2ca-test_2021.1005.1225.1455_x64__002e9dkagpm7g28acfe13-edc2-4d9d-8a69-d5d9687e0573\MyApp\MyApp.exe
failed.
After 1 minute there is this warning:
Warning: There were 129 additional files that failed to be deleted
under the folder \?\C:\Program Files\WindowsApps\Deleted.
It seems that the process tries, and retries, to delete the old files for over 1 minute, then gives up.
How can I allow MSIX to delete the files without giving it administrator rights?
TEST 2 - Administrator user
I did a second test, this time on a different machine, and logged in as an administrator.
The update dialog finished the update and closed after 12s.
Then nothing happened for 5 minutes(!)
I believe I clicked the Start button or something, then suddenly the app started.
Examining the log did not show any warnings about failed file deletions.
Only this warning:
App manifest validation warning: Declared namespace
http://schemas.microsoft.com/developer/appx/2015/build is
inapplicable, it will be ignored during manifest processing.
During the 5 minutes there were no log entries at all.
These were the last 2 log entries, made after 5 minutes:
14-10-2021 10:10:12
UpdateUsingAppInstallerOperation operation on a package with main
parameter
8b7d5c25-92aa-4962-9e74-93b9685ce2ca-test_2021.1013.1518.1578_x64__002e9dkagpm7g
and Options 0 and 0. See http://go.microsoft.com/fwlink/?LinkId=235160
for help diagnosing app deployment issues.
14-10-2021 10:10:13
The bundle streaming reader was created successfully for bundle
8b7d5c25-92aa-4962-9e74-93b9685ce2ca-test_2021.1013.1518.1578_neutral_~_002e9dkagpm7g.Started deploymentThe bundle streaming reader was created
Conclusion
Looking at Task Manager and ProcMon, I can see that the app starts right after the update dialog closes. However, the process is a Background Process, invisible to the user.
While googling, I came across these posts describing the same problem:
https://techcommunity.microsoft.com/t5/msix-deployment/app-does-not-launch-immediately-after-installation-but-after-a/m-p/1972161
https://techcommunity.microsoft.com/t5/msix-deployment/winforms-exe-in-msix-package-does-not-startup-after-auto-update/m-p/965978
You can't give it admin rights. MSIX installations always run per user.
This seems to sound like a machine-related problem. Are you reproducing the same behavior on other machines (try virtual machines if you don't have access to a separate physical machine).
I never found a solution for this. My workaround is to turn off the update dialog by not including ShowPrompt="true".
Then the app seems to launch as it should even if there are updates.
However, there is a new problem - the first time the user starts the app after an update has been released, the auto-update does not happen. It only gets applied the second time the app starts. This is by design apparently...
Related
I have a scheduled task that I want to run every 5 minutes.
I added the url for my method in umbracoSettings.config and the necessary settings but scheduledTasks doesn't seem to be running.
I tried debugging it by calling the url from the browser and I do hit my break point.
I tried checking the logs but there are no errors being recorded. Is this a bug in umbraco? How can I know that the scheduled task is running?
<scheduledTasks>
<!-- add tasks that should be called with an interval (seconds) -->
<task log="true" alias="task1" interval="300" url="http://localhost:43203/umbraco/api/Integration/Init"/>
</scheduledTasks>
I'm using Umbraco 7.5.8
I never had trouble using scheduledTasks in other versions of Umbraco.
The main issue I've seen with scheduled tasks is when the server that's running can't resolve the address in the task. Sometimes a server can be so locked down it can't actually "see" itself, so it can't get to the URL to run it. If this was the case though, you'd normally see some errors in the Umbraco TraceLog file in /App_Data/Logs/.
If your breakpoint isn't getting hit, you could try adding some logging code to the method you're calling and see if that gets written to the Umbraco log files? That way you should be able to tell if it's being hit or not.
Its working now. if you look at umbracoServer table in the database you will see a column isMaster.
The scheduledTasks is only running on the master server.
I am using WebConnector version -2.1.0.30 with QuickBooks 2015 Enterprise.
WebConnector was working fine but all of a sudden when I run WebConnector and click on "Update Selected" button then it came up with this error (Note: by that time no one was logged on to QuickBooks).
Then as a quick fix I have deleted that QWC file and added a New one, that works fine.
Can any one please come up with a better solution and the reason behind this error.
Thanks in advance.
Chances are you're running QuickBooks on a shared Windows Server, or in a hosted scenario with someone like Right Networks, Intuit Cloud, Cloud9, etc.
If so, this error means that Windows Server auto-logged-out some user and closed QuickBooks for them, but is still holding the file lock on the QuickBooks company file. Windows will automatically release the file lock after a short amount of time (usually 30 minutes to an hour).
There is no "fix" outside of waiting for a while, and then trying again.
This is an extension of a question I asked here, which went unanswered. I am attempting to use the Meteor app on my iPad that I'm hosting on my own remote server. The issue is that when I run the following command, the app builds successfully:
sudo meteor run ios-device --mobile-server=XXXX:XXXX
The problem begins when I click the build button in Xcode to deploy the app to my device. It seems to build everything OK and even load the data from my remote server. But after a few seconds, it reverts back to a local database/build. When I check the Xcode log, it says "Finished load of http://meteor.local/" so it seems to be overwriting the remote data with new, local data. I'm not sure if I have something enabled that's causing Xcode to load a local database or if there's something that I have to turn off to prevent it from loading.
UPDATE:
I've resolved the issue using the suggestion from Jey DWork to apply the missing environment variables in the Meteor server startup.
The ones I added were:
Meteor.absoluteUrl.defaultOptions.rootUrl
process.env.ROOT_URL
process.env.MOBILE_ROOT_URL
process.env.MOBILE_DDP_URL
Without setting these, the ROOT_URL seemed to be getting overwritten after the initial load. As these environment variables do not seem to be documented, I'm still going to search and see if there is a different solution to this issue (as it seems strange that the app would have to re-load itself multiple times before it's usable). For now though, this is a temporary solution.
Have a look at this post :
I've understood my problem, maybe your problem is the same, all explanations here : stackoverflow.com/questions/34658956/
Your app for smartphone must be built with --server=http://IP:PORT parameters
And
Your app for server must be started with --mobile-server http://IP:PORT parameters
I'm new to all this programming stuff, but trying to learn. I've had moderate success, but feel like it's more accidental than intentional. I'd appreciate help learning and understanding AppleScript in particular and networking, automation and programing in general.
Here's the environment: Almost all Apple with two Minis, a couple of laptops and various iOS devices including an AppleTV. The network consists of an Apple Airport Extreme, and an older D-Link switch I rescued (with permission) from the recycle bin at work. There are three Foscam wi-fi cameras as well. One of the Mini's (named Dora) is acting as a file server running Yosemite and the OS X Server application with a growing RAID 1 array for media storage.
What I’d like to be able to do is to run a single AppleScript from my laptop (Adam’s Macbook) that does the following:
Launch the application iCamSource on Adam’s Macbook
Change “Require Password to Wake” to true on Adam’s Macbook
Quit iTunes on Adam’s Macbook if it’s running
Start the current ScreenSaver locking Adam’s Macbook
Quit iTunes on Dora if it’s running
Start the current ScreenSaver on Dora if it’s not already running thereby locking Dora
I’d also like to have a single script on Adam’s Macbook that reverses these actions.
I have been able to launch iCamSource, set “Require Password to Wake” to true and start the ScreenSaver on Adam’s Macbook with a lot of Google-Fu, much trial and error, and quite a bit of frustration. I’ve not yet tried to quit iTunes if it’s running. That’s a new idea/requirement, but I think it should be pretty simple to add to the functioning script.
Where I’m running into trouble is controlling Dora from a script on Adam’s Macbook. I run into access errors (905 and 927 generally) about half to two thirds of the time I run the script. I’ve tried every syntax option and many combinations of syntax that I found via Google searches, but this is the one that has the most (but still inconsistent) success.
set remoteMachine to "eppc://remoteMachineadam:slajdlll#10.0.1.2"
tell application "iTunes" of machine remoteMachine
quit
end tell
When reading various articles explaining how to do this, sometimes the scripts use eppc, others use epps and I’ve not seen a consistent result with either one. Some of the articles use the actual IP address of the remote machine, others use password#name.local, so that syntax would be slajdlll#dora.local. That change also seems inconsistent in its results.
This seems to be a pretty basic task, and I’ve found lots of articles that do this very thing, but their methods don’t work in my environment. Many of the articles I’ve read are quite old, so the syntax may be out of date. I’m kind of at my wits end, but feel I should be able to make this work. Any help y’all could provide would be VERY appreciated.
Update - I had the scripts working last night in all regards except controlling the remote machine. This morning, I tried to open the "Away" script to again tackle the remote control issue and I get a Syntax Error Unable To Authenticate User message and the script won't compile. Here's the code:
tell application "System Events"
try
tell application "iTunes" to quit
end try
try
tell application "iTunes" of machine "eppc://Dora.local" to quit
end try
tell security preferences
set require password to wake to true
tell application "iCamSource" to activate
tell application "System Events" to start current screen saver
end tell
end tell
Both "Away" and "Home" scripts run from the AppleScript menu. When I unlock the ScreenSaver after running the "Away" script I get a dialog box stating "There was a problem connecting to the server "Dora's Airport Extreme. The share does not exist on the server. Please check the share name, and then try again." I'm beginning to think I may have a Permissions error on one or more of the machines, or if there's another problem that's making the scripts act inconsistently.
Thanks for all the help so far!
UPDATE Ok, it seems that there was a problem with iPhoto and Screen Saver interacting with the files on the networked hard drive. Opening iPhoto and slowly opening each image and re-linking those that had lost their location seems to have solved that problem. I am still encountering the access error code 905. In order to troubleshoot this process, I'm stripping the script down to one task, to quit iTunes on the remote machine named "Dora" Here's the code:
set Dora to "epps://adam:slajdlll#10.0.1.2"
try
tell application "iTunes" of machine Dora to quit
end try
Here's the event log that running that script generates:
tell application "iTunes" of machine "eppc://epps/adam%253kslajdlll%4010.0.1.2.local"
quit
--> error number -905
end tell
Is it possible/probable that the OS X Server application is mis-configured and is preventing the script from controlling the remote machine? Any other thoughts or things to try?
Thanks!
UPDATE 2
In the Groups section of the OS X Server application running on the remote machine, I found that there is a group called Apple Remote Events ACL. When I click the Edit button to view it's settings I see the actual account name is "com.apple.access_remote_ae-disabled". I wonder if this is telling us something. I searched several libraries for "com.apple.access" thinking it may be something that could be edited, but found nothing. I'm a member of that group. I tried removing myself from the group and tried the script with no change in the results so I added myself back into it.
UPDATE 3
As suggested I'm trying to eliminate OSX Server from the equation. To do this I'm going to try to launch TextEdit (since it's faster to launch than iTunes) on a third machine, known as Office Mini that does not have the Server application on it. Here's the script:
set OfficeMini to "eppc://10.0.1.196"
try
tell application "System Events" of machine OfficeMini
open "/Applications/TextEdit.app"
end tell
end try
When I ran the script initially I got two dialog boxes asking for username and password. I supplied them and checked the "Save in Keychain" checkbox. The script didn't open TextEdit, but I'm not getting the access errors. I am getting different errors though, -600 or -10010 depending on if I use System Events or the Finder. Using the list on this page: Nicholas Reilingh AppleScript Error Codes I find that with System Events I get an error -600 which means the application isn't running. That's no surprise, I'm trying to open it. When I use the Finder instead of System Events, I get an error -10010 which the list indicates is "Handler can’t handle objects of this class." So, there's progress, but I'm still stumped.
UPDATE 4 To further clarify/simplify, I tried running a simple script to open iTunes on the Office Mini locally on that machine and it worked fine.
tell application "iTunes" to activate
Substituting the "quit" for "activate", and trying this syntax with several different applications all worked quite well and very fast. I tried the same script and variations on the Dora machine with the same, successful results.
I then tried to make that syntax work remotely with this code:
set OfficeMini to "eppc://10.0.1.196"
tell application "iTunes" of machine OfficeMini to quit
I got this error message in the event log:
tell application "iTunes" of machine "eppc://10.0.1.196"
quit
--> error number -927
Result:
error "iTunes got an error: Unable to authenticate user." number -927
So, since OSX Server isn't running on the Office Mini, this seems to eliminate that as a culprit for the error. I tried altering the code with another variant I saw online that uses "epps" in place of "eppc" which results in a similar error message: "iTunes got an error: Remote access isn’t allowed." number -905. I did not get dialog boxes requesting credentials. When I've seen the "epps" string used online, it was formatted as "epps://username:password#location" so I used "epps://adam:slajdlll#10.0.1.196" and received the same error message. I even tried "Adam" in place of "adam" with no change in the results.
Yes, step 1 is to try to make your script as simple as possible to narrow down the point of failure.
I have copied your minimal script onto my machine & gotten it to work:
set Dora to "minipuppy.local"
try
tell application "iTunes" of machine Dora to quit
end try
A few notes:
I used "minipuppy.local" (the Bonjour linklocal name) rather than your eppc stuff, because I know what the former is, but not the latter. (You can get the link local name from the Sharing prefs panel* where it says "Computers on your local network can access your computer at:XXXXX"
An authentication dialog popped up saying that I needed to enter the username and password for the target machine - but it did have
an eppc address in the dialog (I didn't take a screenshot :-( )
After entering the username/password my script did nothing. Interestingly, I could not get it to print out a log as yours has?
I fixed this by going to the target Mac's System Preferences & enabling "Remote Apple Events" in the Sharing panel*. After turning that on, my script worked.
I'm hoping enabling "Remote Apple Events" is the ultimate solution to your simplified problem.
*Apple Menu -> System Preferences -> Sharing
I have a windows service installed on a machine running Windows 2008 which automatically stops every night between 2300-0100 hrs.
In the eventviewer I get "dsac.exe.config" file changed. Apart from this I also get the below error in event viewer:
The description for Event ID 1001 from
source Windows Error Reporting cannot
be found. Either the component that
raises this event is not installed on
your local computer or the
installation is corrupted. You can
install or repair the component on the
local computer.
If the event originated on another
computer, the display information had
to be saved with the event.
The following information was included
with the event:
0 CLR20r3 Not available 0
wsbestfarefinder.exe
337.0.0.0 4d8b67b0 Ttl.BestFareFinder.Harvester
337.0.0.0 4d8b67af 301 6 System.TypeInitialization
C:\ProgramData\Microsoft\Windows\WER\ReportQueue\AppCrash_wsbestfarefinder_74e68497d40658e979de885388289e269c39c_c41e675c
0 9a6e7446-661e-11e0-9ac4-005056bc2f52
4
The handle is invalid
Based on KB article 2462585,
Active Directory Administrative Center (Dsac.exe) to manage Active Directory Domain Services (AD DS) objects
That suggests that between those times, something is changing the .config file for dsac.exe. Whether this is relevant to your service or not is something that I suspect is unlikely. You can try to determine this though.
In your development/test/staging environment (you do have one, or all of those, right? :) start your service running and then change the dsac.exe.config file. Does this cause your service to stop? If yes, work out what's causing it to be changed in your production environment.
All that said, I don't think the change to dsac.exe.config is the issue, or at best it's a symptom and not the cause Your service is encountering an exception, specifically a TypeInitializationException at some point in the night. You need to improve your logging and exception handling to get to the root cause of this. Start by hooking the AppDomain.UnhandledException event, logging any exceptions and ensuring that you ship .pdb files with your service.