none
Failed to launch in review (allegedly because app lacks permissions to its own LocalStorage on tester's pc)

    Question

  • I have the same problem as here http://social.msdn.microsoft.com/Forums/windowsapps/en-US/c643fdc1-c092-4f39-8eac-2fa66d5cf2d9/app-crashes-in-review-runs-perfectly-when-tested-locally?forum=winappswithcsharp#07e08ad5-9466-4743-b173-5a3c2150ba36  Since it was not resolved i publish this thread. The problem is that my application runs perfectly well locally, passes WCK tests but is returned from Content Compliance stage with complain that it crashes on launch. All info about the problem is only this and means that there is AccessDenied error

    Sig[5].Name=Fault Module Version
    Sig[5].Value=6.3.9600.17031
    Sig[6].Name=Fault Module Timestamp
    Sig[6].Value=53086d7c
    Sig[7].Name=Exception Code
    Sig[7].Value=80070005
    Sig[8].Name=Exception Offset
    Sig[8].Value=00053bff

    My App at launch time copies to local storage some xml  and some media resources. I do this in OnNavigatedTo handler. What is strange that Windows certification Kit passes the application fine on both mine and microsoft side (at technical compliance stage) and as you know Certification Kit test DOES launch application and launches it successfully. After making some investigation in google i found that this kind of error (8007005 AccessDenied) happens on computers which have some  permissions settings problems (like here http://superuser.com/questions/483548/getting-0x8007005-when-installing-any-metro-app-from-app-store-after), so I am almost sure that problem is with the tester's pc  (This explains why  PKZ (from thethread I gave link to above) had succeeded after submitting his application 3 times without changing any code, he just happened to get a tester with pc with fine settings). More specifically app lacks permissions to write to its own Local Storage (at least at the beginning of the run).

     Why Windows Certification Kit manages to launch my app at the Microsoft side (at technical compliance) while tester does not?  What is the difference between those two launches???Thanks in advance.


    Tuesday, September 2, 2014 10:26 PM

Answers

  • So, the good news is that after having been resubmitted my app was launched successfully at content compliance stage. That means their first launch crash was due to rare occasion bug during deployment as I had stated. Bad news is that it did crashed later...the crash details do not have smth. to do with the topic of the given thread so I will discontinue it.

    Also I have to apologize to testers, they do read testers notes (at least after the ballyhoo I made), the one who reviewed my app conscientiously checked Account Unknown(S-1-15-2-...)  though this time that was not an issue.

    A separate thanks to Rob, looking for arguments against his statement that desabling app from getting access to its storage is "a legitimate environmental issue"  I ran into useful info how to manually correct issue when your installed windows store app loses permissions to its LocalState folder due to Account Unknown(S-1-15-2...) user being deleted by mistake or not set. The matter is that such user does not exist  when you try to find it on the machine but there is a ALL APPLICATION PACKAGES user which is superset to all such users and it will do fine.

    • Marked as answer by Yuriy Laschuk Friday, September 5, 2014 9:41 AM
    Friday, September 5, 2014 9:39 AM

All replies

  • Not enough information to know for sure. Possibilities include timing issues, anti-virus checkers, odd system settings (as you suggest), etc.

    Your app should catch this error and recover from it: if the copy fails initially then try again after a few. You should not have the move on the critical start path anyway but should load it asynchronously so the user can get into the app immediately.

    --Rob

    Tuesday, September 2, 2014 11:08 PM
  • Rob, thanks for the answer

    But does not Windows Windows Certification Kit successful  pass mean that app should at least launch fine? WCK does launch app. It mean that there is no timing issues and the like.

    And of course I have Try Catch clause and make copy async (such operation are async by naure in Windows Store app) but since my app relies on xml (which is copied to Local Storage) from the very beginning I show wait screen with continuous progress bar with message like "Wait a few seconds for data initialization". The matter is that app does not get into catch clause. And app seems to freeze on that wait scree.

    I would like to know if certain  files have been created or have not in the LocalSorage when app is being tried to launch but i do not know whom to ask.

    The fact that folk who runs into the same problem did not find any sensible solution and one of them succeeded just after resubmitting app a few times without changing code, see

      http://social.msdn.microsoft.com/Forums/windowsapps/en-US/c643fdc1-c092-4f39-8eac-2fa66d5cf2d9/app-crashes-in-review-runs-perfectly-when-tested-locally

    makes me suspicious about problems with tester's pc

    And I hope that somebody from Microsoft technical support will honor me with answer, I will try to write to support now. 



    Wednesday, September 3, 2014 7:08 AM
  • Well,

    I do know for sure now that the problem is with tester's pc. The matter is that once Windows Store app gets installed there is created an area in the

    C:\Users\{UserName}\AppData\Local\Packages\....

    where app has rights to store and manipulate some data. in that area next folders are created like:

    LocalState

    TempState   and some others

    All of them are asigned a security Identifier (SID) starting from number S-1-15-2-.... that identifier is uniquely generated for the given app and has permissions for Full Control. That identifier can be seen on the security tab of the properties window, so if i uncheck rights for that user I am getting exactly the same situation the reviewer has reported to me.

     Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED)) 

    So for some reason the process of the deployment of my application fails on the tester's pc, its LocalState folder is not assigned app security identifier in proper way and that is why the process of writing to local storage fails. Maybe such happens on rare occasion or maybe that is the permanent fault with that tester pc and he rejects all apps which use Local Storage and are unlucky enough to get to that tester for review

    So I DO know the reason but I DO NOT know how and to whom knock to be heard.  What I should do? Try another lucky shot? 

    Testers do not seem to read notes for testers, admins do not seem to care about technical utilities in their responsibility to function properly (what i can conclude from other thread like this one)

      http://social.msdn.microsoft.com/Forums/windowsapps/en-US/c643fdc1-c092-4f39-8eac-2fa66d5cf2d9/app-crashes-in-review-runs-perfectly-when-tested-locally

    Wednesday, September 3, 2014 1:41 PM
  • App has direct Access to these folders and you don't need any permission for this and one thing more you cannot access these folders only app can access those might be some sort of error in your code please check for paths again in your app.

    Hope this will work .

    Muhammad Asad

    Wednesday, September 3, 2014 2:20 PM
  • Muhammad

    thank you very much for trying to help. Unfortunately you are not right, app has access to those folders in Packages only because there is a user (based on SID 1-15-2....) which is generated and granted rights automatically during app installation. You can check that easily, just go to any LocalState of any Windows Store app, in my case it is

    Account Unknown(S-1-15-2-2243258159-3108872155-1935386791-2980838001-1890539578-2316982129-2089292232)

    and if you uncheck rights checkboxes app has no access rights to its storage.

    Wednesday, September 3, 2014 2:41 PM
  • So,

    I fixed a little catch clause so as AccessDenied error message was displayed, it was not previously because I ried to log error at first into local storage place and then display message but since namely access to local storage was the problem application failed again and never got to displaying message.

    So now it displays error message with my added detailed explanation of the problem ( i add it only in case of UnauthorizedAccessException). The tester is hearty welcomed and kindly asked to perform some steps to find out if my suggestion is right.

    Also I am waiting reply from support (it should be given within 1 business day).

    I will keep this thread updated

    Wednesday, September 3, 2014 6:54 PM
  • You should catch the error and deal with it, probably by waiting and trying again in a bit. There is no good reason to show an error message that the user cannot do anything about.

    This is something your app needs to deal with. It is not likely to be specific to the testers but will also affect users in the field.

    Application Certification is not a full test pass to ensure that your app is not buggy. You need to do that yourself. While you are correct that the app should have permission to that directory, lack of security permissions are only one reason why you would get an Access Denied. Since this is intermittent it is more likely that there is an external effect on the file preventing access, such as (but not necessarily) an anti-virus program having the file open.

    --Rob

    Wednesday, September 3, 2014 7:30 PM
  • I have just received an answer from support, it appeared to  be general, not technical support I applied to. And they redirected me to tech support and it appeared that to get pleasure from communication with tech support is not free (even if one tries to communicate them Microsoft bugs).

    So I have to cross fingers and wait for review results. BTW when i launched today my app it showed me gigantic memory leak... I was stiffened with astonishment, well it appeared that yesterday I linked it to Application Verifier (from Windows Kit) and forgot to unlink it. Maybe it will be helpful to smb.

    Thursday, September 4, 2014 3:21 PM
  • You can open a technical support incident at http://aka.ms/storesupport . You will not be charged if your problem is due to a Microsoft bug. This doesn't sound like a Microsoft bug though. From what you've described this is a legitimate environmental issue that your app needs to be able to handle.

    --Rob

    Thursday, September 4, 2014 6:06 PM
  • Rob,

    I appreciate that you care about my issue. When i try to apply to tech support first of all I am prompted to specify payment method and I do not see any statements that I will not be charged if issue is on the Microsoft part and I do not want to risk.

    Anyway I guess that  it will not be too burdensome for the tester to open LocalState folder corresponding to my app and see on the security tab if there is a Account Unknown(S-1-15-2-...) with full permissions created as I suggest in the Exception Message Box.

    If there is not then it is not " a legitimate environmental issue" but Microsoft deployment bug which disables my app to use its legitimate Local Storage.  Still such bug should be a very rare occasion. I see that my application has been 5 times launched successfully during technical compliance stage ( it has a call to my web-service and it does happen after successful launch). I hope that everything will go smooth on the content compliance stage too this time.

    Thursday, September 4, 2014 7:47 PM
  • While moving the profile as described in the superuser.com site you linked is one possible cause of an Access Denied, it is not the only cause and it is unlikely in the certification case.

    There are more likely, legitimate, intermittent reasons why an app may temporarily not have access to a file or folder that it generally does have access to. A correct app needs to be able to handle these scenarios gracefully.

    If you open a support case and the source of the problem is a Microsoft bug then any costs will be refunded. Again though, from the data provided this appears to be an app bug that it assumes it will always have access and doesn't handle being denied gracefully rather than an OS bug that access is denied.

    --Rob

    Thursday, September 4, 2014 8:00 PM
  • So, the good news is that after having been resubmitted my app was launched successfully at content compliance stage. That means their first launch crash was due to rare occasion bug during deployment as I had stated. Bad news is that it did crashed later...the crash details do not have smth. to do with the topic of the given thread so I will discontinue it.

    Also I have to apologize to testers, they do read testers notes (at least after the ballyhoo I made), the one who reviewed my app conscientiously checked Account Unknown(S-1-15-2-...)  though this time that was not an issue.

    A separate thanks to Rob, looking for arguments against his statement that desabling app from getting access to its storage is "a legitimate environmental issue"  I ran into useful info how to manually correct issue when your installed windows store app loses permissions to its LocalState folder due to Account Unknown(S-1-15-2...) user being deleted by mistake or not set. The matter is that such user does not exist  when you try to find it on the machine but there is a ALL APPLICATION PACKAGES user which is superset to all such users and it will do fine.

    • Marked as answer by Yuriy Laschuk Friday, September 5, 2014 9:41 AM
    Friday, September 5, 2014 9:39 AM