getsentry / sentry-unreal

Unreal Engine
https://docs.sentry.io/platforms/unreal/
MIT License
84 stars 34 forks source link

"error: Not enough memory resources are available to process this command" when packaging for Android #200

Closed namnq-sipher closed 6 months ago

namnq-sipher commented 1 year ago

Environment

How do you use Sentry? Sentry SaaS (sentry.io)

Which version of the SDK? 0.1.1

How did you install the package? (Git-URL, Assetstore) Git-URL

Which version of Unreal? 5.0.1

Is this happening in Unreal (editor) or on a player like Android, iOS, Windows? Android

Steps to Reproduce

  1. Enable Upload debug symbols automatically in Sentry project settings.
  2. Package the game using UAT command line interface. The full command is: RunUAT.bat BuildCookRun -nop4 -project='path_to_project_file.uproject' -skipcook -skipstage -skippak -archive -package -archivedirectory='path_to_output_folder' -distribution -clientconfig=Development -cookflavor=ASTC -targetplatform=Android -utf8output -target=MyGameClient

Expected Result

The build success and an APK & AAB are outputs.

Actual Result

The build failed to output an APK file. It failed at the step uploadSentryNativeSymbolsForRelease. The error message I got is error: Not enough memory resources are available to process this command. (os error 8)

Note 1: if Upload debug symbols automatically in Sentry project settings is disabled, the packaging process will succeed. Note 2: the task uploadSentryProguardMappingsRelease which ran before uploadSentryNativeSymbolsForRelease was successful.

I'm using Windows 11 and have 64GB of RAM.

Any logs or screenshots

Screenshot 2023-01-30 173422

bitsandfoxes commented 1 year ago

Sorry to see you running into this issue @namnq-sipher . We'll take a look.

namnq-sipher commented 1 year ago

thank you @bitsandfoxes

namnq-sipher commented 1 year ago

Awesome thank you. Is there any update btw.

tustanivsky commented 1 year ago

Awesome thank you. Is there any update btw.

We're still trying to identify the origin of this problem. The lack of memory resources doesn't seem to be the case here, so we'll continue looking for a fix. It's possible that the issue is not related to UE package itself but the gradle plugin which is used under the hood for debug symbols upload.

For now I can suggest upgrading to the latest plugin version since it has some important Android-related fixes.

tustanivsky commented 1 year ago

@namnq-sipher here are two workarounds you can try to fix the problem with Android debug symbols upload:

1. Increase the JVM heap size

2. Increase the Page File size on Windows

NoCodeBugsFree commented 9 months ago

@namnq-sipher , did you resolve the issue? were you at git engine? how huge was your libUnreal.so ? in my case if I use git engine to build android libUnreal.so file is relatively huge ( 2-3 gigs for development / shipping for git engine vs 300-400mb for launcher engine) so as I got it correct sentry limit is 2gigs. Note , idk how does it work under the hood , but git engine capable of build the game to android without -distribution flag but the symbols uploads to sentry step is skipped in this case and it allows the entire build finished with success.

tustanivsky commented 6 months ago

@namnq-sipher as it was mentioned above Sentry has a limit of 2GB for debug symbols files so if that's the case using a custom Symbol Server should help to resolve the original issue.

Closing it for now yet feel free to re-open if the problem persists.