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

android/sentry.properties (No such file or directory) #372

Closed
furaiev opened this issue Mar 18, 2021 · 6 comments
Closed

android/sentry.properties (No such file or directory) #372

furaiev opened this issue Mar 18, 2021 · 6 comments

Comments

@furaiev
Copy link

furaiev commented Mar 18, 2021

Platform:

  • [ + ] Flutter Android or iOS

IDE:

  • [ + ] IntelliJ/AS

split-debug-info and obfuscate (Flutter Android or iOS) or CanvasKit (Flutter Web):

  • [ + ] Enabled

Platform installed with:

  • [ + ] pub.dev

Output of the command flutter doctor -v below:

[✓] Flutter (Channel stable, 2.0.2, on macOS 11.2.3 20D91 darwin-x64, locale en-GB)
• Flutter version 2.0.2 at /Users/admin/developer/flutter
• Framework revision 8962f6dc68 (6 days ago), 2021-03-11 13:22:20 -0800
• Engine revision 5d8bf811b3
• Dart version 2.12.1

[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.2)
• Android SDK at /Users/admin/Library/Android/sdk
• Platform android-30, build-tools 30.0.2
• Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6915495)
• All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 12.4, Build version 12D4e
• CocoaPods version 1.10.1

[✓] Chrome - develop for the web
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio
• Android Studio at /Applications/Android Studio 4.2 Preview.app/Contents
• Flutter plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/6351-dart
• Java version OpenJDK Runtime Environment (build 11.0.8+10-b944.6916264)

[✓] Android Studio (version 4.1)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/6351-dart
• Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6915495)

[✓] VS Code (version 1.54.0)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.20.0

[✓] Connected device (2 available)
• Android SDK built for x86 (mobile) • emulator-5554 • android-x86 • Android 10 (API 29) (emulator)
• Chrome (web) • chrome • web-javascript • Google Chrome 89.0.4389.90

The version of the SDK (See pubspec.lock):
4.1.0-nullsafety.1


I have the following issue:

During the building process for Android, there is an error.

Steps to reproduce:

  • build or run the app on Android

Actual result:

  • Error: getSentryCli(): /project_path/android/sentry.properties (No such file or directory)

Expected result:

  • Building process without errors
@marandaneto
Copy link
Contributor

marandaneto commented Mar 18, 2021

@furaiev thanks for reporting, what are you trying to do? how are you setting up the project/SDK? are you using the Android gradle plugin?

https://docs.sentry.io/platforms/android/proguard/

@furaiev
Copy link
Author

furaiev commented Mar 18, 2021

@marandaneto I have:
in android/app/build.gradle

apply plugin: 'io.sentry.android.gradle'

sentry {
    autoProguardConfig false
    autoUpload false
    uploadNativeSymbols false
    includeNativeSources false
}

in android/build.gradle

buildscript {
    ...
    dependencies {
       ...
        classpath 'io.sentry:sentry-android-gradle-plugin:1.7.36'
    }
}

in android/gradle.properties:

org.gradle.jvmargs=-Xmx1536M
android.enableR8=true
android.useAndroidX=true
android.enableJetifier=true
android.bundle.enableUncompressedNativeLibs=false

And in CI/CD I use CLI at the end of the building flow

sentry-cli --auth-token $SENTRY_AUTH_TOKEN upload-dif -o "organisation" -p "project" --wait obfuscate

Is it mandatory to create sentry.properties? Can it be an empty file? I don't want to keep auth.token in repo.

Thank you!

@marandaneto
Copy link
Contributor

@furaiev can you please elaborate on whats your problem and what you want to solve?

why do you want to use the io.sentry.android.gradle plugin?
why do you want to use the sentry-cli directly too?

please take some time to read our docs:

The credentials for the upload step are loaded via environment variables or from a sentry.properties file in your project root.

@furaiev
Copy link
Author

furaiev commented Mar 18, 2021

Sure, the purpose is to Upload Debug Symbols.
I use split-debug-info flag and should upload symbols manually. Shouldn't I use io.sentry.android.gradle as well?

@marandaneto
Copy link
Contributor

@furaiev in your plugin configuration you have autoUpload=false so in your case the gradle plugin does nothing, you don't even need it.
if you want to upload proguard mapping file for Java stack traces then you need it, and for that, either you configure sentry.properties or the env. variables.

closing it as it's not a bug, if you think you've configured accordingly to the docs, comment with the error and I'd glad to reopen it.

@furaiev
Copy link
Author

furaiev commented Mar 18, 2021

@marandaneto thank you 💪

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

No branches or pull requests

2 participants