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

I just updated to 2.2.0 and now I'm see this error on launch in Unity Editor WebGL platform. #1843

Closed
ziggyeye opened this issue Oct 14, 2024 · 5 comments
Labels
Bug Something isn't working Platform: WebGL

Comments

@ziggyeye
Copy link

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

@bruno-garcia
Copy link
Member

Looks like the same problem reported here

@bruno-garcia
Copy link
Member

cc @jamescrosswell did we change something in the core Sentry package that could cause this?

@bruno-garcia bruno-garcia added Bug Something isn't working Platform: WebGL labels Oct 14, 2024
@bruno-garcia
Copy link
Member

bruno-garcia commented Oct 14, 2024

The diff in Unity is here: 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:

platform == RuntimePlatform.WebGLPlayer

So it should have file I/O enabled

@bruno-garcia
Copy link
Member

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

@bitsandfoxes
Copy link
Contributor

The released 2.2.1 addresses this issue. Please feel free to reach out if you're running into any troubles.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working Platform: WebGL
Projects
Status: Done
Archived in project
Development

No branches or pull requests

3 participants