Skip to content

Commit 6a01e66

Browse files
committed
fix: disable async file IO on WebGL
1 parent 5f8a033 commit 6a01e66

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/Sentry.Unity/WebGL/SentryWebGL.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,9 @@ public static void Configure(SentryUnityOptions options)
4343
// Please contact Customer Support with a sample project so that we can reproduce the problem and troubleshoot it."
4444
// Maybe we could write a file when this error occurs and recognize it on the next start. Like unity-native.
4545
options.CrashedLastRun = () => false;
46+
47+
// Disable async when accessing files (e.g. FileStream(useAsync: true)) because it throws on WebGL.
48+
options.UseAsyncFileIO = false;
4649
}
4750
}
4851

0 commit comments

Comments
 (0)