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: Fix moving app state to previous app state #2321

Merged
merged 3 commits into from
Oct 24, 2022

Conversation

kevinrenskers
Copy link
Contributor

This is a very high priority fix for an issue introduced in #2250

2022-10-24 14:37:46.961457+0200 iOS-Swift[719:27083] Sentry - error:: Failed to move app state to previous app state: Error Domain=NSCocoaErrorDomain Code=516 "“app.state” couldn’t be moved to “b810aaca937def33af3796f237e6793ec907f1e4” because an item with the same name already exists." UserInfo={NSSourceFilePathErrorKey=/var/mobile/Containers/Data/Application/C3AC2606-338F-40F4-A24C-FEA67EC08FF4/Library/Caches/io.sentry/b810aaca937def33af3796f237e6793ec907f1e4/app.state, NSUserStringVariant=(
    Move
), NSDestinationFilePath=/var/mobile/Containers/Data/Application/C3AC2606-338F-40F4-A24C-FEA67EC08FF4/Library/Caches/io.sentry/b810aaca937def33af3796f237e6793ec907f1e4/previous.app.state, NSFilePath=/var/mobile/Containers/Data/Application/C3AC2606-338F-40F4-A24C-FEA67EC08FF4/Library/Caches/io.sentry/b810aaca937def33af3796f237e6793ec907f1e4/app.state, NSUnderlyingError=0x280e646f0 {Error Domain=NSPOSIXErrorDomain Code=17 "File exists"}}

Added a unit test to make sure this doesn't happen again.

Copy link
Member

@philipphofmann philipphofmann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, @kevinrenskers.

@philipphofmann
Copy link
Member

@brustolin, can you try to release, as you already wanted to last week?

@github-actions
Copy link

github-actions bot commented Oct 24, 2022

Performance metrics 🚀

  Plain With Sentry Diff
Startup time 1231.38 ms 1248.00 ms 16.62 ms
Size 20.50 KiB 339.02 KiB 318.51 KiB

Baseline results on branch: master

Startup times

Revision Plain With Sentry Diff
e43ce74 1235.77 ms 1252.06 ms 16.29 ms
202334c 1265.41 ms 1277.34 ms 11.93 ms
be47c6c 1228.57 ms 1247.10 ms 18.53 ms
7977992 1219.80 ms 1241.92 ms 22.12 ms
4a188b8 1245.57 ms 1266.04 ms 20.47 ms
8607e67 1240.00 ms 1270.55 ms 30.55 ms
0fdf0b2 1194.37 ms 1227.90 ms 33.53 ms
4a0c282 1228.60 ms 1250.74 ms 22.14 ms
be47c6c 1235.71 ms 1268.02 ms 32.31 ms
db5f62a 1234.47 ms 1257.80 ms 23.33 ms

App size

Revision Plain With Sentry Diff
e43ce74 20.51 KiB 335.49 KiB 314.99 KiB
202334c 20.51 KiB 331.79 KiB 311.28 KiB
be47c6c 20.50 KiB 333.55 KiB 313.04 KiB
7977992 20.50 KiB 333.58 KiB 313.07 KiB
4a188b8 20.50 KiB 337.70 KiB 317.20 KiB
8607e67 20.50 KiB 338.99 KiB 318.49 KiB
0fdf0b2 20.51 KiB 332.90 KiB 312.39 KiB
4a0c282 20.51 KiB 333.10 KiB 312.60 KiB
be47c6c 20.50 KiB 333.54 KiB 313.04 KiB
db5f62a 20.51 KiB 333.16 KiB 312.65 KiB

@brustolin
Copy link
Contributor

@brustolin, can you try to release, as you already wanted to last week?

Sure

@brustolin brustolin merged commit 64225be into master Oct 24, 2022
@brustolin brustolin deleted the fix/critical-fix-previous-app-state branch October 24, 2022 13:44
kevinrenskers added a commit that referenced this pull request Oct 24, 2022
* master:
  fix: Fix moving app state to previous app state (#2321)
  ci: Remove macos-10.15 usage (#2312)
  ref: Remove not existent SentryContext (#2320)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants