diff --git a/.github/workflows/ci-build.yml b/.github/workflows/ci-build.yml index 85f5fc5a8..94fc00d5e 100644 --- a/.github/workflows/ci-build.yml +++ b/.github/workflows/ci-build.yml @@ -79,11 +79,6 @@ jobs: echo "KLOGG_ARCH=${{ matrix.config.arch }}" >> $GITHUB_ENV # Install build dependencies - - name: Install curl - if: ${{ matrix.config.os == 'ubuntu' }} - run: | - sudo apt-get install libcurl4-openssl-dev - - name: Cache openssl id: cache-openssl if: ${{ matrix.config.os == 'windows' }} @@ -165,7 +160,7 @@ jobs: - name: Check rpm package if: ${{ matrix.config.os == 'ubuntu' }} run: | - docker run --rm -v "$(pwd)/$KLOGG_BUILD_ROOT/packages":/usr/local centos:7 /bin/bash -c "yum install /usr/local/klogg*.rpm" + docker run --rm -v "$(pwd)/$KLOGG_BUILD_ROOT/packages":/usr/local centos:8 /bin/bash -c "yum install -y --setopt tsflags=test /usr/local/klogg*.rpm" - name: Linux AppImage if: ${{ matrix.config.os == 'ubuntu' }} diff --git a/3rdparty/CMakeLists.txt b/3rdparty/CMakeLists.txt index 218d9d1fb..b33200f14 100644 --- a/3rdparty/CMakeLists.txt +++ b/3rdparty/CMakeLists.txt @@ -23,6 +23,7 @@ add_subdirectory(maddy) add_subdirectory(whereami) set(SENTRY_BACKEND "crashpad" CACHE INTERNAL "" FORCE) +set(SENTRY_TRANSPORT "none" CACHE INTERNAL "" FORCE) set(SENTRY_BUILD_EXAMPLES ON CACHE INTERNAL "" FORCE) set(CRASHPAD_ENABLE_INSTALL OFF CACHE INTERNAL "" FORCE) set(CRASHPAD_ENABLE_INSTALL_DEV OFF CACHE INTERNAL "" FORCE) diff --git a/src/app/crashhandler.cpp b/src/app/crashhandler.cpp index 852c5b6e1..e1218e36d 100644 --- a/src/app/crashhandler.cpp +++ b/src/app/crashhandler.cpp @@ -30,7 +30,6 @@ #include #include #include -#include #include #include #include @@ -75,31 +74,6 @@ void logSentry( sentry_level_t level, const char* message, va_list args, void* u PLOG( severity ).printf( message, args ); } -QJsonDocument extractJson( const QByteArray& data, int& lastOffset ) -{ - QJsonParseError parseError; - auto envelopeJson = QJsonDocument::fromJson( data, &parseError ); - if ( parseError.error != QJsonParseError::NoError ) { - envelopeJson = QJsonDocument::fromJson( data.mid( 0, parseError.offset ) ); - } - - lastOffset = parseError.offset; - return envelopeJson; -} - -std::vector extractMessage( const QByteArray& envelopeString ) -{ - std::vector messages; - int position = 0; - auto offset = 0; - do { - messages.push_back( extractJson( envelopeString.mid( position ), offset ) ); - position += offset; - } while ( offset > 0 && position < envelopeString.size() ); - - return messages; -} - QDialog::DialogCode askUserConfirmation( const QString& formattedReport, const QString& reportPath ) { auto message = std::make_unique(); @@ -161,25 +135,6 @@ QDialog::DialogCode askUserConfirmation( const QString& formattedReport, const Q return static_cast( confirmationDialog->exec() ); } -int askUserConfirmation( sentry_envelope_t* envelope, void* ) -{ - size_t size_out = 0; - char* rawEnvelope = sentry_envelope_serialize( envelope, &size_out ); - auto envelopeString = QByteArray( rawEnvelope ); - sentry_free( rawEnvelope ); - - const auto messages = extractMessage( envelopeString ); - QString formattedReport; - for ( const auto& message : messages ) { - formattedReport.append( QString::fromUtf8( message.toJson( QJsonDocument::Indented ) ) ); - } - - return askUserConfirmation( formattedReport, sentryDatabasePath().append( "/last_crash" ) ) - == QDialog::Accepted - ? 0 - : 1; -} - void checkCrashpadReports( const QString& databasePath ) { using namespace crashpad; @@ -261,12 +216,6 @@ CrashHandler::CrashHandler() sentry_options_set_environment( sentryOptions, "development" ); sentry_options_set_release( sentryOptions, kloggVersion().data() ); - auto transport = sentry_transport_new_default(); - - sentry_transport_set_ask_consent_func( transport, askUserConfirmation ); - - sentry_options_set_transport( sentryOptions, transport ); - sentry_init( sentryOptions ); sentry_set_tag( "commit", kloggCommit().data() );