Closed ziggyeye closed 1 month ago
Looks like the same problem reported here
cc @jamescrosswell did we change something in the core Sentry package that could cause this?
The diff in Unity is here: https://github.com/getsentry/sentry-unity/compare/2.1.4...2.2.0
Bit it's most likely caused by some change in the .NET SDK, possible either:
Or
Confirming that WebGL is in the KnownPlatforms
: https://github.com/getsentry/sentry-unity/blob/8966aaf2de800353c10daa0c5745222bd06131ff/package-dev/Runtime/SentryInitialization.cs#L296
So it should have file I/O enabled
OK so @jamescrosswell figured out:
He fixed this problem in this PR:
We bumped it in this repo. but that fix wasn't included in the last release.. It has been sitting on main
so I just triggered a release now.
It'll be version 2.2.1
The released 2.2.1
addresses this issue. Please feel free to reach out if you're running into any troubles.
Sentry: (Error) Failed to persist session on the file system. System.ObjectDisposedException: Cannot access a disposed object. Object name: 'Stream has been closed'. at System.IO.FileStream.Flush () [0x0000d] in:0
at System.Text.Json.Utf8JsonWriter.Flush () [0x00094] in <106b5ea9b1fa4ad5922e9fb9e8765bf0>:0
at System.Text.Json.Utf8JsonWriter.Dispose () [0x00011] in <106b5ea9b1fa4ad5922e9fb9e8765bf0>:0
at Sentry.GlobalSessionManager.PersistSession (Sentry.SessionUpdate update, System.Nullable`1[T] pauseTimestamp) [0x0011b] in /sentry-unity/src/sentry-dotnet/src/Sentry/GlobalSessionManager.cs:91