Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 14 additions & 1 deletion .github/workflows/test-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,10 @@ jobs:
# sentry-native requires write access to sample project directory in order to initialize itself properly
run: docker exec -w /workspace/checkout unreal chmod -R +x sample

- name: Set execute permission for Python3
# Python3 is needed for post-build symbol upload script
run: docker exec --user root unreal chmod +x /home/ue4/UnrealEngine/Engine/Binaries/ThirdParty/Python3/Linux/bin/python3

- name: Update engine's build configuration
run: |
docker exec unreal bash -c "
Expand All @@ -119,8 +123,17 @@ jobs:
id: run-tests
env:
EDITOR_BINARY: ${{ inputs.unreal-version == '4.27' && 'UE4Editor' || 'UnrealEditor' }}
SENTRY_UPLOAD_SYMBOLS_AUTOMATICALLY: true
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
SENTRY_ORG: ${{ secrets.SENTRY_ORG }}
SENTRY_PROJECT: ${{ secrets.SENTRY_PROJECT }}
run: |
docker exec -w /workspace/checkout/sample unreal /home/ue4/UnrealEngine/Engine/Build/BatchFiles/RunUAT.sh BuildCookRun \
docker exec -w /workspace/checkout/sample \
-e SENTRY_UPLOAD_SYMBOLS_AUTOMATICALLY="$SENTRY_UPLOAD_SYMBOLS_AUTOMATICALLY" \
-e SENTRY_AUTH_TOKEN="$SENTRY_AUTH_TOKEN" \
-e SENTRY_ORG="$SENTRY_ORG" \
-e SENTRY_PROJECT="$SENTRY_PROJECT" \
Comment on lines +133 to +135
Copy link
Contributor

Choose a reason for hiding this comment

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

There now is a org-auth-token that would allow us to omit the SENTRY_ORG.

Copy link
Contributor

Choose a reason for hiding this comment

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

Also for Symbol upload?

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Let’s keep setting the organization explicitly for now as things could get confusing if the "wrong" token type is used.

unreal /home/ue4/UnrealEngine/Engine/Build/BatchFiles/RunUAT.sh BuildCookRun \
-project=/workspace/checkout/sample/SentryPlayground.uproject \
-archivedirectory=/workspace/checkout/sample/Builds \
-platform=Linux \
Expand Down
11 changes: 10 additions & 1 deletion .github/workflows/test-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,17 @@ jobs:
id: run-tests
env:
EDITOR_BINARY: ${{ inputs.unreal-version == '4.27' && 'UE4Editor.exe' || 'UnrealEditor.exe' }}
SENTRY_UPLOAD_SYMBOLS_AUTOMATICALLY: true
Copy link
Contributor

Choose a reason for hiding this comment

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

Is that getting used anywhere else?

Copy link
Contributor

Choose a reason for hiding this comment

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

In the upload debug symbol python script, it's getting forwarded to docker environment

SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
SENTRY_ORG: ${{ secrets.SENTRY_ORG }}
SENTRY_PROJECT: ${{ secrets.SENTRY_PROJECT }}
run: |
docker exec unreal C:\UnrealEngine\Engine\Build\BatchFiles\RunUAT.bat BuildCookRun `
docker exec `
-e SENTRY_UPLOAD_SYMBOLS_AUTOMATICALLY="$env:SENTRY_UPLOAD_SYMBOLS_AUTOMATICALLY" `
-e SENTRY_AUTH_TOKEN="$env:SENTRY_AUTH_TOKEN" `
-e SENTRY_ORG="$env:SENTRY_ORG" `
-e SENTRY_PROJECT="$env:SENTRY_PROJECT" `
unreal C:\UnrealEngine\Engine\Build\BatchFiles\RunUAT.bat BuildCookRun `
-project=C:/workspace/checkout/sample/SentryPlayground.uproject `
-archivedirectory=C:/workspace/checkout/sample/Builds `
-platform=Win64 `
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

- Add screenshot capturing for ensure/assert events on Android ([#1097](https://github.com/getsentry/sentry-unreal/pull/1097))
- Add level-specific logging methods (LogDebug, LogInfo, LogWarning, LogError, LogFatal) to match other Sentry SDKs ([#1110](https://github.com/getsentry/sentry-unreal/pull/1110))
- Migrated debug symbol upload to unified Python-based implementation to improve stability ([#1114](https://github.com/getsentry/sentry-unreal/pull/1114))

### Fixes

Expand Down
18 changes: 18 additions & 0 deletions plugin-dev/Scripts/post-build-steps-linux.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/bin/bash

TARGET_PLATFORM="$1"
TARGET_NAME="$2"
TARGET_TYPE="$3"
TARGET_CONFIGURATION="$4"
PROJECT_FILE="$5"
PLUGIN_DIR="$6"
ENGINE_DIR="$7"

# Grant execute permissions to sentry-cli binary (FAB version of the plugin doesn't preserve file permissions)
if [ -f "$PLUGIN_DIR/Source/ThirdParty/CLI/sentry-cli-Linux-x86_64" ]; then
Comment on lines +11 to +12
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't understand how this works. The .sh does have permissions to grant permissions?

Copy link
Contributor

Choose a reason for hiding this comment

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

It can grant permissions if the user running it has permissions to do so.

chmod +x "$PLUGIN_DIR/Source/ThirdParty/CLI/sentry-cli-Linux-x86_64"
fi

Copy link
Contributor

@bitsandfoxes bitsandfoxes Oct 14, 2025

Choose a reason for hiding this comment

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

The Windows cross-compilation copies the crash handler, but the Linux-native script doesn't?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Manual crashpad copying is only required when using the FAB version of the plugin. Since the Epic Games Launcher is not available on Linux, users can’t download the Sentry plugin from the FAB there, so this step isn’t needed for the native build.

# Call Python script for debug symbol upload
"$ENGINE_DIR/Binaries/ThirdParty/Python3/Linux/bin/python3" "$PLUGIN_DIR/Scripts/upload-debug-symbols.py" \
"$TARGET_PLATFORM" "$TARGET_NAME" "$TARGET_TYPE" "$TARGET_CONFIGURATION" "$PROJECT_FILE" "$PLUGIN_DIR"
24 changes: 24 additions & 0 deletions plugin-dev/Scripts/post-build-steps-mac.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#!/bin/bash

TARGET_PLATFORM="$1"
TARGET_NAME="$2"
TARGET_TYPE="$3"
TARGET_CONFIGURATION="$4"
PROJECT_FILE="$5"
PLUGIN_DIR="$6"
ENGINE_DIR="$7"

# Copy sentry.dylib to plugin's Binaries/Mac dir if it doesn't exist there to ensure FAB version of the plugin works correctly
# Epic obfuscates any extra binaries when pre-building the plugin
if [ "$TARGET_PLATFORM" = "Mac" ] && [ ! -f "$PLUGIN_DIR/Binaries/Mac/sentry.dylib" ]; then
cp "$PLUGIN_DIR/Source/ThirdParty/Mac/bin/sentry.dylib" "$PLUGIN_DIR/Binaries/Mac/sentry.dylib"
fi

# Grant execute permissions to sentry-cli binary (FAB version of the plugin doesn't preserve file permissions)
if [ -f "$PLUGIN_DIR/Source/ThirdParty/CLI/sentry-cli-Darwin-universal" ]; then
chmod +x "$PLUGIN_DIR/Source/ThirdParty/CLI/sentry-cli-Darwin-universal"
fi

# Call Python script for debug symbol upload
"$ENGINE_DIR/Binaries/ThirdParty/Python3/Mac/bin/python3" "$PLUGIN_DIR/Scripts/upload-debug-symbols.py" \
"$TARGET_PLATFORM" "$TARGET_NAME" "$TARGET_TYPE" "$TARGET_CONFIGURATION" "$PROJECT_FILE" "$PLUGIN_DIR"
37 changes: 37 additions & 0 deletions plugin-dev/Scripts/post-build-steps-win.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
@echo off

setlocal enabledelayedexpansion

set "TARGET_PLATFORM=%~1"
set "TARGET_NAME=%~2"
set "TARGET_TYPE=%~3"
set "TARGET_CONFIGURATION=%~4"
set "PROJECT_FILE=%~5"
set "PLUGIN_DIR=%~6"
set "ENGINE_DIR=%~7"

REM Copy crashpad handler executable to plugin's Binaries\Linux dir if it doesn't exist there
REM This enables cross-compilation for Linux on Windows with FAB version of the plugin
set "CRASHPAD_HANDLER_LINUX=%PLUGIN_DIR%\Binaries\Linux\crashpad_handler"
if "%TARGET_PLATFORM%"=="Linux" (
if not exist "%CRASHPAD_HANDLER_LINUX%" (
if not exist "%PLUGIN_DIR%\Binaries\Linux\" (mkdir "%PLUGIN_DIR%\Binaries\Linux")
xcopy "%PLUGIN_DIR%\Source\ThirdParty\Linux\bin\*" "%PLUGIN_DIR%\Binaries\Linux\" /F /R /Y /I
)
)

REM Copy crashpad handler executable to plugin's Binaries\Win64 dir if it doesn't exist there
REM Epic obfuscates any extra binaries when pre-building the plugin for FAB
set "CRASHPAD_HANDLER_WIN=%PLUGIN_DIR%\Binaries\Win64\crashpad_handler.exe"
if "%TARGET_PLATFORM%"=="Win64" (
if not exist "%CRASHPAD_HANDLER_WIN%" (
if not exist "%PLUGIN_DIR%\Binaries\Win64\" (mkdir "%PLUGIN_DIR%\Binaries\Win64")
xcopy "%PLUGIN_DIR%\Source\ThirdParty\Win64\bin\*" "%PLUGIN_DIR%\Binaries\Win64\" /F /R /Y /I
)
)

REM Call Python script for debug symbol upload
"%ENGINE_DIR%\Binaries\ThirdParty\Python3\Win64\python.exe" "%PLUGIN_DIR%\Scripts\upload-debug-symbols.py" ^
%TARGET_PLATFORM% %TARGET_NAME% %TARGET_TYPE% %TARGET_CONFIGURATION% "%PROJECT_FILE%" "%PLUGIN_DIR%"

endlocal
183 changes: 0 additions & 183 deletions plugin-dev/Scripts/upload-debug-symbols-win.bat

This file was deleted.

Loading