Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

System.UnauthorizedAccessException in system.io.packaging.tests.tests.zippackage_createwithfileaccesswrite #72837

Closed
runfoapp bot opened this issue Jul 26, 2022 · 2 comments · Fixed by #72850
Labels
area-System.IO blocking-clean-ci Blocking PR or rolling runs of 'runtime' or 'runtime-extra-platforms' os-tvos Apple tvOS

Comments

@runfoapp
Copy link

runfoapp bot commented Jul 26, 2022

https://helixre107v0xdeko0k025g8.blob.core.windows.net/dotnet-runtime-refs-heads-main-03666e5d9e604c64bd/System.IO.Packaging.Tests/1/testResults.xml?%3Fhelixlogtype%3Dresult

<test name="System.IO.Packaging.Tests.Tests.ZipPackage_CreateWithFileAccessWrite" type="System.IO.Packaging.Tests.Tests" method="ZipPackage_CreateWithFileAccessWrite" time="0.0039565" result="Fail">
        <failure exception-type="System.UnauthorizedAccessException">
          <message><![CDATA[System.UnauthorizedAccessException : Access to the path '/private/var/containers/Bundle/Application/344A2030-F352-44DC-8885-78940495276B/System.IO.Packaging.Tests.app/test.zip' is denied.\n---- System.IO.IOException : Operation not permitted]]></message>
          <stack-trace><![CDATA[   at Interop.ThrowExceptionForIoErrno(ErrorInfo errorInfo, String path, Boolean isDirectory)
   at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String path, OpenFlags flags, Int32 mode, Func`4 createOpenException)
   at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize, UnixFileMode openPermissions, Int64& fileLength, UnixFileMode& filePermissions, Func`4 createOpenException)
   at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize, Nullable`1 unixCreateMode, Func`4 createOpenException)
   at System.IO.Strategies.OSFileStreamStrategy..ctor(String path, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize, Nullable`1 unixCreateMode)
   at System.IO.Strategies.FileStreamHelpers.ChooseStrategyCore(String path, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize, Nullable`1 unixCreateMode)
   at System.IO.Strategies.FileStreamHelpers.ChooseStrategy(FileStream fileStream, String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, Int64 preallocationSize, Nullable`1 unixCreateMode)
   at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, Int64 preallocationSize)
   at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share)
   at System.IO.Packaging.ZipPackage..ctor(String path, FileMode packageFileMode, FileAccess packageFileAccess, FileShare share)
   at System.IO.Packaging.Package.Open(String path, FileMode packageMode, FileAccess packageAccess, FileShare packageShare)
   at System.IO.Packaging.Package.Open(String path, FileMode packageMode, FileAccess packageAccess)
   at System.IO.Packaging.Tests.Tests.ZipPackage_CreateWithFileAccessWrite()
   at System.Reflection.MethodInvoker.InterpretedInvoke(Object obj, Span`1 args, BindingFlags invokeAttr)
----- Inner Stack Trace -----
]]></stack-trace>
        </failure>
      </test>

Runfo Tracking Issue: system.io.packaging.tests.tests.zippackage_createwithfileaccesswrite

Build Definition Kind Run Name Console Core Dump Test Results Run Client
1904025 runtime-extra-platforms PR 72802 net7.0-tvOS-Release-arm64-Mono_Release-OSX.1100.Amd64.AppleTV.Open console.log test results runclient.py
1903739 runtime-extra-platforms PR 72445 net7.0-tvOS-Release-arm64-Mono_Release-OSX.1100.Amd64.AppleTV.Open console.log test results runclient.py
1903582 runtime-extra-platforms PR 72802 net7.0-tvOS-Release-arm64-Mono_Release-OSX.1100.Amd64.AppleTV.Open console.log test results runclient.py
1903495 runtime-extra-platforms Rolling net7.0-tvOS-Release-arm64-Mono_Release-OSX.1100.Amd64.AppleTV.Open console.log test results runclient.py
1903280 runtime-extra-platforms PR 72832 net7.0-tvOS-Release-arm64-Mono_Release-OSX.1100.Amd64.AppleTV.Open console.log test results runclient.py
1902387 runtime-extra-platforms Rolling net7.0-tvOS-Release-arm64-Mono_Release-OSX.1100.Amd64.AppleTV.Open console.log test results runclient.py
1902000 runtime-extra-platforms PR 72706 net7.0-tvOS-Release-arm64-Mono_Release-OSX.1100.Amd64.AppleTV.Open console.log test results runclient.py
1902000 runtime-extra-platforms PR 72706 net7.0-tvOS-Release-arm64-Mono_Release-OSX.1100.Amd64.AppleTV.Open console.log test results runclient.py
1901961 runtime-extra-platforms PR 72802 net7.0-tvOS-Release-arm64-Mono_Release-OSX.1100.Amd64.AppleTV.Open console.log test results runclient.py
1901750 runtime-extra-platforms PR 72545 net7.0-tvOS-Release-arm64-Mono_Release-OSX.1100.Amd64.AppleTV.Open console.log test results runclient.py
1901717 runtime-extra-platforms PR 72554 net7.0-tvOS-Release-arm64-Mono_Release-OSX.1100.Amd64.AppleTV.Open console.log test results runclient.py
1901679 runtime-extra-platforms PR 72445 net7.0-tvOS-Release-arm64-Mono_Release-OSX.1100.Amd64.AppleTV.Open console.log test results runclient.py
1901444 runtime-extra-platforms PR 72707 net7.0-tvOS-Release-arm64-Mono_Release-OSX.1100.Amd64.AppleTV.Open console.log test results runclient.py
1901068 runtime-extra-platforms Rolling net7.0-tvOS-Release-arm64-Mono_Release-OSX.1100.Amd64.AppleTV.Open console.log test results runclient.py
1900774 runtime-extra-platforms PR 72545 net7.0-tvOS-Release-arm64-Mono_Release-OSX.1100.Amd64.AppleTV.Open console.log test results runclient.py
1900571 runtime-extra-platforms Rolling net7.0-tvOS-Release-arm64-Mono_Release-OSX.1100.Amd64.AppleTV.Open console.log test results runclient.py
1900134 runtime-extra-platforms Rolling net7.0-tvOS-Release-arm64-Mono_Release-OSX.1100.Amd64.AppleTV.Open console.log test results runclient.py
1899753 runtime-extra-platforms Rolling net7.0-tvOS-Release-arm64-Mono_Release-OSX.1100.Amd64.AppleTV.Open console.log test results runclient.py
1899254 runtime-extra-platforms Rolling net7.0-tvOS-Release-arm64-Mono_Release-OSX.1100.Amd64.AppleTV.Open console.log test results runclient.py

Build Result Summary

Day Hit Count Week Hit Count Month Hit Count
5 18 18
@ghost ghost added the untriaged New issue has not been triaged by the area owner label Jul 26, 2022
@ghost
Copy link

ghost commented Jul 26, 2022

Tagging subscribers to this area: @dotnet/area-system-io
See info in area-owners.md if you want to be subscribed.

Issue Details

Runfo Creating Tracking Issue (data being generated)

Author: runfoapp[bot]
Assignees: -
Labels:

area-System.IO

Milestone: -

@noahfalk noahfalk changed the title system.io.packaging.tests.tests.zippackage_createwithfileaccesswrite System.UnauthorizedAccessException in system.io.packaging.tests.tests.zippackage_createwithfileaccesswrite Jul 26, 2022
@noahfalk noahfalk added the os-tvos Apple tvOS label Jul 26, 2022
@ghost
Copy link

ghost commented Jul 26, 2022

Tagging subscribers to 'os-tvos': @steveisok, @akoeplinger
See info in area-owners.md if you want to be subscribed.

Issue Details

Runfo Tracking Issue: system.io.packaging.tests.tests.zippackage_createwithfileaccesswrite

Build Definition Kind Run Name Console Core Dump Test Results Run Client
1902387 runtime-extra-platforms Rolling net7.0-tvOS-Release-arm64-Mono_Release-OSX.1100.Amd64.AppleTV.Open console.log test results runclient.py
1902000 runtime-extra-platforms PR 72706 net7.0-tvOS-Release-arm64-Mono_Release-OSX.1100.Amd64.AppleTV.Open console.log test results runclient.py
1902000 runtime-extra-platforms PR 72706 net7.0-tvOS-Release-arm64-Mono_Release-OSX.1100.Amd64.AppleTV.Open console.log test results runclient.py
1901961 runtime-extra-platforms PR 72802 net7.0-tvOS-Release-arm64-Mono_Release-OSX.1100.Amd64.AppleTV.Open console.log test results runclient.py
1901750 runtime-extra-platforms PR 72545 net7.0-tvOS-Release-arm64-Mono_Release-OSX.1100.Amd64.AppleTV.Open console.log test results runclient.py
1901717 runtime-extra-platforms PR 72554 net7.0-tvOS-Release-arm64-Mono_Release-OSX.1100.Amd64.AppleTV.Open console.log test results runclient.py
1901679 runtime-extra-platforms PR 72445 net7.0-tvOS-Release-arm64-Mono_Release-OSX.1100.Amd64.AppleTV.Open console.log test results runclient.py
1901444 runtime-extra-platforms PR 72707 net7.0-tvOS-Release-arm64-Mono_Release-OSX.1100.Amd64.AppleTV.Open console.log test results runclient.py
1901068 runtime-extra-platforms Rolling net7.0-tvOS-Release-arm64-Mono_Release-OSX.1100.Amd64.AppleTV.Open console.log test results runclient.py
1900774 runtime-extra-platforms PR 72545 net7.0-tvOS-Release-arm64-Mono_Release-OSX.1100.Amd64.AppleTV.Open console.log test results runclient.py
1900571 runtime-extra-platforms Rolling net7.0-tvOS-Release-arm64-Mono_Release-OSX.1100.Amd64.AppleTV.Open console.log test results runclient.py
1900134 runtime-extra-platforms Rolling net7.0-tvOS-Release-arm64-Mono_Release-OSX.1100.Amd64.AppleTV.Open console.log test results runclient.py
1899753 runtime-extra-platforms Rolling net7.0-tvOS-Release-arm64-Mono_Release-OSX.1100.Amd64.AppleTV.Open console.log test results runclient.py
1899254 runtime-extra-platforms Rolling net7.0-tvOS-Release-arm64-Mono_Release-OSX.1100.Amd64.AppleTV.Open console.log test results runclient.py

Build Result Summary

Day Hit Count Week Hit Count Month Hit Count
8 13 13
Author: runfoapp[bot]
Assignees: -
Labels:

area-System.IO, untriaged, os-tvos

Milestone: -

@noahfalk noahfalk added the blocking-clean-ci Blocking PR or rolling runs of 'runtime' or 'runtime-extra-platforms' label Jul 26, 2022
steveisok pushed a commit to steveisok/runtime that referenced this issue Jul 26, 2022
On iOS, this test was failing due to not being able to write files in the app root directory.  The fix is to write a file in the TestDirectory, which is a subdirectory under the app root and is writeable.

Fixes dotnet#72837
@ghost ghost added the in-pr There is an active PR which will close this issue when it is merged label Jul 26, 2022
steveisok added a commit that referenced this issue Jul 27, 2022
On iOS, this test was failing due to not being able to write files in the app root directory.  The fix is to write a file in the TestDirectory, which is a subdirectory under the app root and is writeable.

Fixes #72837
@ghost ghost removed in-pr There is an active PR which will close this issue when it is merged untriaged New issue has not been triaged by the area owner labels Jul 27, 2022
@ghost ghost locked as resolved and limited conversation to collaborators Aug 26, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-System.IO blocking-clean-ci Blocking PR or rolling runs of 'runtime' or 'runtime-extra-platforms' os-tvos Apple tvOS
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant