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

Windows ARM64 Build failing #2498

Closed
nowfalsalahudeen opened this issue Dec 14, 2024 · 8 comments
Closed

Windows ARM64 Build failing #2498

nowfalsalahudeen opened this issue Dec 14, 2024 · 8 comments

Comments

@nowfalsalahudeen
Copy link

Platform

Flutter Desktop Windows

Obfuscation

Disabled

Debug Info

Disabled

Doctor

Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.27.0, on Microsoft Windows [Version 10.0.22621.4169], locale en-US)
[✓] Windows Version (Installed version of Windows is version 10 or higher)
[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
[✗] Chrome - develop for the web (Cannot find Chrome executable at .\Google\Chrome\Application\chrome.exe)
! Cannot find Chrome. Try setting CHROME_EXECUTABLE to a Chrome executable.
[✓] Visual Studio - develop Windows apps (Visual Studio Community 2022 17.12.3)
[✓] Android Studio (version 2023.1)
[✓] VS Code (version 1.95.2)
[✓] Connected device (2 available)
[✓] Network resources

! Doctor found issues in 1 category.

Version

8.11.0

Steps to Reproduce

C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\BuildCustomizations\marmasm.targets(56,5): error MSB8076: Only ARM, ARM64 and ARM64EC platforms are supported. [C:\Users\nowfal\VaasITS\edr-pos-userapp-flutter\build\windows\x64_deps\sentry-native-build\crashpad_build\util\crashpad_util.vcxproj]
Building Windows application... 25.0s
Build process failed.

Macbook m2 Pro with parallel desktop windows 11 arm64

Expected Result

It was working fine , after upgrade the sdk, got this error,

Actual Result

C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\BuildCustomizations\marmasm.targets(56,5): error MSB8076: Only ARM, ARM64 and ARM64EC platforms are supported. [C:\Users\nowfal\VaasITS\edr-pos-userapp-flutter\build\windows\x64_deps\sentry-native-build\crashpad_build\util\crashpad_util.vcxproj]
Building Windows application... 25.0s
Build process failed.

Are you willing to submit a PR?

None

@getsantry getsantry bot moved this to Waiting for: Product Owner in GitHub Issues with 👀 3 Dec 14, 2024
@vaind vaind changed the title Windows Build failing Windows ARM64 Build failing Dec 16, 2024
@vaind
Copy link
Collaborator

vaind commented Dec 16, 2024

v8.11 brought Windows native error & obfuscation support (#2286, #2426)

It seems like you're building ARM64 but it doesn't get propagated and something actually builds as x64.

Can you update the Steps to reproduce to include the build command you're using?

Also, it seems like sentry-native currently doesn't support Windows ARM64, see getsentry/sentry-native#880 - we may need to make adjustment here to exclude the cmake target in this case.

@Ali-Toosi
Copy link

Ali-Toosi commented Dec 18, 2024

Same issue here. The same setup as nowfalsalahudeen. The command is just Flutter's debug or build command:

flutter run

I'm not sure if it's an 8.11.0 issue or a general one though. Because downgrading Sentry did not fix the issue. But I can confirm removing Sentry from the project does fix the issue and the build starts working again.

EDIT: my bad, downgrading to 8.10.0 does fix the problem. The issue is only present in 8.11.

@buenaflor
Copy link
Contributor

buenaflor commented Dec 18, 2024

@Ali-Toosi which versions did you downgrade to where it still doesnt work?

@Ali-Toosi
Copy link

@buenaflor Actually sorry it does work with 8.10.0. I thought I had downgraded but I hadn't. 8.10.0 runs, 8.11.0 and 8.11.1 don't.
Let me know if you'd like me to try another version.

@buenaflor
Copy link
Contributor

Thanks, we added a feature in 8.11.0 that is enabled by default but due to the impact it has on build fails on linux and windows we will make the feature opt-in for now (until the next major - 9)

@Ali-Toosi
Copy link

Thank you! 8.11.2 working.

@getsantry getsantry bot moved this to Waiting for: Product Owner in GitHub Issues with 👀 3 Dec 20, 2024
@vaind
Copy link
Collaborator

vaind commented Dec 20, 2024

Just released v8.11.2 disabled the native crash reporting by default. If you'd like to try it out and provide feedback (since Windows Arm64 is not very common, the feedbeck would be very valuable), you can try enabling a crash handling backend by setting an env var:

(the following code is for powershell, assuming that's what you use on Windows)

$env:SENTRY_NATIVE_BACKEND = 'breakpad'
flutter build windows

You could read about various backends in https://docs.sentry.io/platforms/native/advanced-usage/backend-tradeoffs/ but TLDR is that crashpad is preferrable unless you cannot use it, e.g. because you cannot ship an additional executable along your app, or like in this case, it doesn't work for the platform you're building for (yet). If that's the case, there's breakpad and inproc, which both run in the same process have some advantages over each other. If you don't care about these (they're described in docs), breakpad would be the next best thing after crashpad.

@vaind
Copy link
Collaborator

vaind commented Dec 20, 2024

One more note: in sentry_flutter v9, we're likely to enable native crash reporting again, with breakpad as default for ARM64 unless we can make crashpad work.

@vaind vaind closed this as completed Dec 20, 2024
@github-project-automation github-project-automation bot moved this from In Progress to Done in Mobile & Cross Platform SDK Dec 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Status: Done
Development

No branches or pull requests

5 participants