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

Fix crash on tvOS caused by access to filesystem #621

Closed
jpstuehler opened this issue Jul 5, 2021 · 1 comment
Closed

Fix crash on tvOS caused by access to filesystem #621

jpstuehler opened this issue Jul 5, 2021 · 1 comment
Assignees
Labels
priority:high To fix as soon as possible. type:defect Bugs or weaknesses. The issue has to contain steps to reproduce.
Milestone

Comments

@jpstuehler
Copy link

Describe the bug

The app will crash when it tries to write the event to disk.

To Reproduce

Setup a tracker and start tracking events on tvOS using tracker 2.1.1. Setting up the session file url fails and the tracker then crashes when writing data to disk.

SPSession.m line 133.
Error Domain=NSCocoaErrorDomain Code=513 "You don’t have permission to save the file “snowplow” in the folder “Application Support”." UserInfo={NSFilePath=/var/mobile/Containers/Data/Application/1107C145-BB29-40BA-AA29-DD2960253083/Library/Application Support/snowplow, NSUnderlyingError=0x281850150 {Error Domain=NSPOSIXErrorDomain Code=1 "Operation not permitted"}}

SPSession.m line 227 then crashes because of the failure above.

Expected behavior

Creating this directory should not fail and writing to disk should work.

Device information (please complete the following information):

  • Device: Apple TV
  • OS: 14.6
  • Tracker Version: 2.1.1 integrated via SwiftPM
@jpstuehler jpstuehler added the type:defect Bugs or weaknesses. The issue has to contain steps to reproduce. label Jul 5, 2021
@AlexBenny AlexBenny self-assigned this Jul 5, 2021
@AlexBenny AlexBenny added the priority:high To fix as soon as possible. label Jul 5, 2021
@AlexBenny AlexBenny added this to the 2.2.2 milestone Aug 12, 2021
@AlexBenny AlexBenny changed the title tvOS crash because of missing permission to write to "Application Support" Fix crash on tvOS caused by access to filesystem Aug 12, 2021
@jpstuehler
Copy link
Author

Thanks for tackling this. Didn't anticipate this being such a big change 🙌

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority:high To fix as soon as possible. type:defect Bugs or weaknesses. The issue has to contain steps to reproduce.
Projects
None yet
Development

No branches or pull requests

2 participants