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

Failed to upload snaps to snap store #2514

Closed
kjxbyz opened this issue Dec 17, 2024 · 9 comments
Closed

Failed to upload snaps to snap store #2514

kjxbyz opened this issue Dec 17, 2024 · 9 comments

Comments

@kjxbyz
Copy link

kjxbyz commented Dec 17, 2024

Platform

Flutter Desktop Linux

Obfuscation

Disabled

Debug Info

Disabled

Doctor

[✓] Flutter (Channel stable, 3.27.1, on Ubuntu 22.04.5 LTS 6.5.0-1025-azure, locale C.UTF-8)
    • Flutter version 3.27.1 on channel stable at /opt/hostedtoolcache/flutter/stable-3.27.1-x64
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 17025dd882 (20 hours ago), 2024-12-17 03:23:09 +0900
    • Engine revision cb4b5fff73
    • Dart version 3.6.0
    • DevTools version 2.[40](https://github.com/picguard/picguard/actions/runs/12375329888/job/34540841300#step:6:41).2

[!] Android toolchain - develop for Android devices (Android SDK version 35.0.0)
    • Android SDK at /usr/local/lib/android/sdk
    • Platform android-35-ext14, build-tools 35.0.0
    • ANDROID_HOME = /usr/local/lib/android/sdk
    • ANDROID_SDK_ROOT = /usr/local/lib/android/sdk
    ✗ Android SDK file not found: adb.
    • Try re-installing or updating your Android SDK,
      visit https://flutter.dev/to/linux-android-setup for detailed instructions.

[✓] Chrome - develop for the web
    • Chrome at google-chrome

[✓] Linux toolchain - develop for Linux desktop
    • Ubuntu clang version 14.0.0-1ubuntu1.1
    • cmake version 3.31.2
    • ninja version 1.10.1
    • pkg-config version 0.29.2

[!] Android Studio (not installed)
    • Android Studio not found; download from https://developer.android.com/studio/index.html
      (or visit https://flutter.dev/to/linux-android-setup for detailed instructions).

[✓] Connected device (2 available)
    • Linux (desktop) • linux  • linux-x64      • Ubuntu 22.04.5 LTS 6.5.0-1025-azure
    • Chrome (web)    • chrome • web-javascript • Google Chrome 131.0.6778.139

[✓] Network resources
    • All expected network resources are available.

! Doctor found issues in 2 categories.

Version

8.11.1

Steps to Reproduce

snapcraft upload --release=latest/edge xxx.snap

Expected Result

Upload the snapshot to the snapshot store normally.

Actual Result

Found files with executable stack. This adds PROT_EXEC to mmap(2) during mediation which may cause security denials. Either adjust your program to not require an executable stack, strip it with 'execstack --clear-execstack ...' or remove the affected file from your snap. Affected files: bin/crashpad_handler, lib/crashpad_handler, lib/libsentry.so

Are you willing to submit a PR?

None

@kahest
Copy link
Member

kahest commented Dec 18, 2024

@kjxbyz can you clarify what your use case is? are you using Sentry in an app/library you publish to snapcraft?

fyi @vaind

@kjxbyz
Copy link
Author

kjxbyz commented Dec 18, 2024

are you using Sentry in an app/library you publish to snapcraft?

Yes

@vaind
Copy link
Collaborator

vaind commented Dec 18, 2024

This is caused by the inclusion of sentry-native's crash handler in the build. We'll be making it an opt-in in a next patch release.

@kjxbyz
Copy link
Author

kjxbyz commented Dec 18, 2024

Your solution is to remove some code. I also have a solution to keep the existing code. If my solution can be implemented, what additional configuration needs to be added in snapcraft.yaml?

@getsantry getsantry bot moved this to Waiting for: Product Owner in GitHub Issues with 👀 3 Dec 18, 2024
@kahest
Copy link
Member

kahest commented Dec 19, 2024

@kjxbyz can you tell us more about your solution?

@kjxbyz
Copy link
Author

kjxbyz commented Dec 19, 2024

This is caused by the inclusion of sentry-native's crash handler in the build.

What is the purpose of a crash handler? If it does not affect the core functionality, I think it can be an optional feature.

@getsantry getsantry bot moved this to Waiting for: Product Owner in GitHub Issues with 👀 3 Dec 19, 2024
@buenaflor buenaflor moved this from Needs Discussion to Needs Investigation in Mobile & Cross Platform SDK Dec 19, 2024
@buenaflor buenaflor moved this from Needs Investigation to In Progress in Mobile & Cross Platform SDK Dec 19, 2024
@kjxbyz
Copy link
Author

kjxbyz commented Dec 20, 2024

After upgrading to 8.11.2, snaps were successfully uploaded to the snap store. Thank you!

@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, you can reenable it with a different backend (breakpad should be fine to use with snaps) by setting an env var:

export SENTRY_NATIVE_BACKEND=breakpad
flutter build linux

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. 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.

@kjxbyz
Copy link
Author

kjxbyz commented Dec 20, 2024

My app is distributed not only through exe, msi, dmg, deb or rpm files, but also through microsoft store, flathub, snap store and mac app store, so breakpad is more suitable for me. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Archived in project
Development

No branches or pull requests

3 participants