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

Fix problem with parsing existing parameter after missing parameter #541

Merged
merged 1 commit into from
Apr 23, 2024

Conversation

ki11roy
Copy link
Contributor

@ki11roy ki11roy commented Apr 17, 2024

This fixes situation when all the parameters in [/Script/Sentry.SentrySettings] which follows non existing parameter in batch file are going to be skipped.

In the example below EnableBuildTargets won't be parsed, because there is no EnableBuildPlatforms parameter set.

[/Script/Sentry.SentrySettings]
Debug=True
AutomaticBreadcrumbs=(bOnMapLoadingStarted=True,bOnMapLoaded=True,bOnGameStateClassChanged=True,bOnGameSessionIDChanged=True,bOnUserActivityStringChanged=True)
UploadSymbolsAutomatically=True
InitAutomatically=True
Release="main-1987"
PropertiesFilePath=Config/sentry.properties
EnableAutoCrashCapturing=False
BeforeSendHandler=/Script/CoreUObject.Class'/Script/Project.ProjectSentryBeforeSendHandler'
EnableAutoLogAttachment=True
IncludeSources=True
EnableBuildTargets=(bEnableClient=True,bEnableGame=True,bEnableEditor=False,bEnableServer=False,bEnableProgram=True)
Dsn="https://something@crash-reports.something/3"

@tustanivsky
Copy link
Collaborator

Thanks for contributing! We'll check this on our end and get back to you.

@tustanivsky
Copy link
Collaborator

@ki11roy The suggested change looks reasonable however I've experimented with symbol uploading a bit on my end and everything seems to work just fine for the above example even without it - regardless EnableBuildPlatforms parameter is specified or not a subsequent EnableBuildTargets option is always getting parsed properly. Can you provide some additional steps on how this can be reproduced?

@ki11roy
Copy link
Contributor Author

ki11roy commented Apr 22, 2024

Sure:

Running: upload-debug-symbols-win.bat Linux TestServer Server Development "." ".\Sentry"
with this DefaultEngine.ini

[Section1]
A=B

[/Script/Sentry.SentrySettings]
UploadSymbolsAutomatically=True
IncludeSources=True
EnableBuildTargets=(bEnableClient=True,bEnableGame=True,bEnableEditor=False,bEnableServer=False,bEnableProgram=True)
EnableBuildPlatforms=(bEnableWin64=True,bEnableLinux=True)

[Section2]
C=D

...will produce a correct result:

Sentry: Start debug symbols upload
"Sentry: Automatic symbols upload is disabled for build target type Server. Skipping...

However, running: upload-debug-symbols-win.bat Linux TestServer Server Development "." ".\Sentry"
with this DefaultEngine.ini (please note missing EnableBuildPlatforms)

[Section1]
A=B

[/Script/Sentry.SentrySettings]
UploadSymbolsAutomatically=True
IncludeSources=True
EnableBuildTargets=(bEnableClient=True,bEnableGame=True,bEnableEditor=False,bEnableServer=False,bEnableProgram=True)

[Section2]
C=D

...will produce unexpected result (exit for Server target won't be called):

Sentry: Start debug symbols upload
Warning: Sentry: Properties file is missing: '.\sentry.properties

Resetting inisection with set insection= as in PR should be fixing this.

@tustanivsky
Copy link
Collaborator

Thank you, I've managed to reproduce this issue with the above details on my side too.
Great catch with this!

@tustanivsky tustanivsky merged commit 0a2547a into getsentry:main Apr 23, 2024
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants