Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
d32eba5
Merge pull request #2160 from bugsnag/main
YYChen01988 Mar 4, 2025
cb11caf
refactor(jni_cache) remove unused bsg jni cache (#2161)
YYChen01988 Mar 5, 2025
94acac9
Enable Appium session reporting in e2e tests
Mar 6, 2025
1f40757
Merge pull request #2164 from bugsnag/tms/appium-reports
twometresteve Mar 7, 2025
db2f98a
refactor(lib) remove parson from main dir and only used in test dirs …
YYChen01988 Mar 10, 2025
10527b5
Use Appium API methods where implemented
Mar 17, 2025
8d4bd44
Use new api method
Mar 18, 2025
8e2f742
Merge pull request #2166 from bugsnag/tms/appium-api
twometresteve Mar 18, 2025
382fe60
build(deps): bump github/codeql-action from 3.28.10 to 3.28.13
dependabot[bot] Mar 25, 2025
3f4691a
build(deps): bump actions/upload-artifact from 4.6.1 to 4.6.2
dependabot[bot] Mar 25, 2025
fbdae4f
Merge pull request #2167 from bugsnag/dependabot/github_actions/githu…
lemnik Mar 25, 2025
20af7c2
Merge pull request #2168 from bugsnag/dependabot/github_actions/actio…
lemnik Mar 25, 2025
fa5135c
chore(size reporting): updated size reporting script
lemnik Mar 25, 2025
c078339
Merge pull request #2169 from bugsnag/PLAT-13937/update-size-reporting
lemnik Mar 26, 2025
fc14b3f
fix(lib): LibraryLoader will retry System.loadLibrary exactly once on…
lemnik Mar 26, 2025
9f7d9a8
Add testing on Android 15
Mar 31, 2025
05e2349
build(deps): bump gradle/actions from 4.3.0 to 4.3.1
dependabot[bot] Apr 1, 2025
f36168e
Skip scenario on Android 15 and clean up skip tags
Apr 1, 2025
c3e82b2
Merge pull request #2170 from bugsnag/PLAT-13984/libload-retry
lemnik Apr 1, 2025
60f131e
Rework scenario to expect handled errors to be sent again after the 2…
Apr 1, 2025
e185191
Guard against session folder not existing
Apr 1, 2025
bb6c0e4
Fix lint
Apr 1, 2025
ce3f995
Rework - first attempt was really not good code
Apr 2, 2025
2827404
Unused import
Apr 2, 2025
3fc36d2
Merge pull request #2173 from bugsnag/tms/flake-fixes
twometresteve Apr 2, 2025
de75d8c
Merge pull request #2171 from bugsnag/tms/android-15
twometresteve Apr 2, 2025
fb575fa
Merge pull request #2172 from bugsnag/dependabot/github_actions/gradl…
lemnik Apr 3, 2025
e01c81e
build(deps): bump github/codeql-action from 3.28.13 to 3.28.15 (#2175)
dependabot[bot] Apr 14, 2025
59b52bb
release v6.13.0
YYChen01988 Apr 15, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
102 changes: 102 additions & 0 deletions .buildkite/pipeline.full.yml
Original file line number Diff line number Diff line change
Expand Up @@ -869,6 +869,108 @@ steps:
concurrency_group: 'browserstack-app'
concurrency_method: eager


- label: ':bitbar: Android 15 NDK r21 end-to-end tests - batch 1'
depends_on: "fixture-r21"
timeout_in_minutes: 60
plugins:
artifacts#v1.9.0:
download:
- "build/fixture-r21-url.txt"
- "build/fixture-r21/*"
upload:
- "maze_output/failed/**/*"
- "maze_output/metrics.csv"
docker-compose#v4.7.0:
pull: maze-runner
run: maze-runner
service-ports: true
command:
- "features/full_tests"
- "--exclude=features/full_tests/[^a-k].*.feature"
- "--exclude=features/full_tests/anr.feature"
- "--app=@build/fixture-r21-url.txt"
- "--appium-version=1.22"
- "--no-tunnel"
- "--aws-public-ip"
- "--farm=bb"
- "--device=ANDROID_15"
test-collector#v1.10.2:
files: "reports/TEST-*.xml"
format: "junit"
branch: "^main|next$$"
env:
TEST_FIXTURE_SYMBOL_DIR: "build/fixture-r21"
concurrency: 25
concurrency_group: 'bitbar'
concurrency_method: eager

- label: ':bitbar: Android 15 NDK r21 end-to-end tests - batch 2'
depends_on: "fixture-r21"
timeout_in_minutes: 60
plugins:
artifacts#v1.9.0:
download:
- "build/fixture-r21-url.txt"
- "build/fixture-r21/*"
upload:
- "maze_output/failed/**/*"
- "maze_output/metrics.csv"
docker-compose#v4.7.0:
pull: maze-runner
run: maze-runner
service-ports: true
command:
- "features/full_tests"
- "--exclude=features/full_tests/[^l-z].*.feature"
- "--exclude=features/full_tests/anr.feature"
- "--app=@build/fixture-r21-url.txt"
- "--appium-version=1.22"
- "--no-tunnel"
- "--aws-public-ip"
- "--farm=bb"
- "--device=ANDROID_15"
test-collector#v1.10.2:
files: "reports/TEST-*.xml"
format: "junit"
branch: "^main|next$$"
env:
TEST_FIXTURE_SYMBOL_DIR: "build/fixture-r21"
concurrency: 25
concurrency_group: 'bitbar'
concurrency_method: eager

- label: ':browserstack: Android 15 NDK r21 end-to-end tests - ANRs'
depends_on: "fixture-r21"
timeout_in_minutes: 30
plugins:
artifacts#v1.9.0:
download:
- "build/bs-fixture-r21-url.txt"
- "build/fixture-r21/*"
upload:
- "maze_output/failed/**/*"
- "maze_output/metrics.csv"
docker-compose#v4.7.0:
pull: maze-runner
run: maze-runner
service-ports: true
command:
- "features/full_tests/anr.feature"
- "--app=@build/bs-fixture-r21-url.txt"
- "--appium-version=1.22.0"
- "--farm=bs"
- "--device=ANDROID_15"
test-collector#v1.10.2:
files: "reports/TEST-*.xml"
format: "junit"
branch: "^main|next$$"
env:
TEST_FIXTURE_SYMBOL_DIR: "build/fixture-r21"
concurrency: 5
concurrency_group: 'browserstack-app'
concurrency_method: eager

# If there is a tag present activate a manual publishing step

- block: 'Trigger package publish'
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ jobs:

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@b56ba49b26e50535fa1e7f7db0f4f7b4bf65d80d #v3.28.10
uses: github/codeql-action/init@45775bd8235c68ba998cffa5171334d58593da47 #v3.28.15
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
Expand All @@ -83,6 +83,6 @@ jobs:
./gradlew --no-daemon assemble

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@b56ba49b26e50535fa1e7f7db0f4f7b4bf65d80d #v3.28.10
uses: github/codeql-action/analyze@45775bd8235c68ba998cffa5171334d58593da47 #v3.28.15
with:
category: "/language:${{matrix.language}}"
6 changes: 3 additions & 3 deletions .github/workflows/scorecard.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ jobs:
# Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF
# format to the repository Actions tab.
- name: "Upload artifact"
uses: actions/upload-artifact@4cec3d8aa04e39d1a68397de0c4cd6fb9dce8ec1 # v4.6.1
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
name: SARIF file
path: results.sarif
Expand All @@ -68,7 +68,7 @@ jobs:
# Upload the results to GitHub's code scanning dashboard (optional).
# Commenting out will disable upload of results to your repo's Code Scanning dashboard
- name: "Upload to code-scanning"
uses: github/codeql-action/upload-sarif@b56ba49b26e50535fa1e7f7db0f4f7b4bf65d80d # v3.28.10
uses: github/codeql-action/upload-sarif@45775bd8235c68ba998cffa5171334d58593da47 # v3.28.15
with:
sarif_file: results.sarif

Expand All @@ -77,4 +77,4 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: gradle/actions/wrapper-validation@94baf225fe0a508e581a564467443d0e2379123b # v4.3.0
- uses: gradle/actions/wrapper-validation@06832c7b30a0129d7fb559bcc6e43d26f6374244 # v4.3.1
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Changelog

## 6.13.0 (2025-04-15)

### Enhancements

* Attempt a second `System.loadLibrary` for native modules in case of library loading race-conditions
[#2170](https://github.com/bugsnag/bugsnag-android/pull/2170)

## 6.12.1 (2025-03-03)

### Bug fixes
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,14 @@ void loadLibInternal(String name, Client client, OnErrorCallback callback) {
try {
System.loadLibrary(name);
loaded = true;
} catch (UnsatisfiedLinkError error) {
client.notify(error, callback);
} catch (UnsatisfiedLinkError ignored) {
// retry once in case the failure wasn't permanent
try {
System.loadLibrary(name);
loaded = true;
} catch (UnsatisfiedLinkError error) {
client.notify(error, callback);
}
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import java.io.IOException
*/
class Notifier @JvmOverloads constructor(
var name: String = "Android Bugsnag Notifier",
var version: String = "6.12.1",
var version: String = "6.13.0",
var url: String = "https://bugsnag.com"
) : JsonStream.Streamable {

Expand Down
3 changes: 0 additions & 3 deletions bugsnag-plugin-android-ndk/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
{
"dependencies": {
"kgabis/parson": "0.0.0"
},
"development": {
"silentbicycle/greatest": "v1.2.1"
}
Expand Down
1 change: 0 additions & 1 deletion bugsnag-plugin-android-ndk/src/main/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ add_library( # Specifies the name of the library.
jni/utils/string.c
jni/utils/threads.c
jni/utils/memory.c
jni/deps/parson/parson.c
)

include_directories(
Expand Down
15 changes: 0 additions & 15 deletions bugsnag-plugin-android-ndk/src/main/jni/jni_cache.c
Original file line number Diff line number Diff line change
Expand Up @@ -141,17 +141,9 @@ bool bsg_jni_cache_init(JNIEnv *env) {

CACHE_CLASS(Long, "java/lang/Long");
CACHE_STATIC_METHOD(Long, Long_valueOf, "valueOf", "(J)Ljava/lang/Long;");
CACHE_METHOD(Long, Long_constructor, "<init>", "(J)V");

CACHE_CLASS(String, "java/lang/String");

CACHE_CLASS(ArrayList, "java/util/ArrayList");
CACHE_METHOD(ArrayList, ArrayList_constructor_default, "<init>", "()V");
CACHE_METHOD(ArrayList, ArrayList_constructor_collection, "<init>",
"(Ljava/util/Collection;)V");
CACHE_METHOD(ArrayList, ArrayList_get, "get", "(I)Ljava/lang/Object;");
CACHE_METHOD(ArrayList, ArrayList_add, "add", "(Ljava/lang/Object;)Z");

CACHE_CLASS(Set, "java/util/Set");
CACHE_METHOD(Set, Set_iterator, "iterator", "()Ljava/util/Iterator;");

Expand All @@ -160,7 +152,6 @@ bool bsg_jni_cache_init(JNIEnv *env) {
CACHE_METHOD(Iterator, Iterator_next, "next", "()Ljava/lang/Object;");

CACHE_CLASS(Map, "java/util/Map");
CACHE_METHOD(Map, Map_keySet, "keySet", "()Ljava/util/Set;");
CACHE_METHOD(Map, Map_size, "size", "()I");
CACHE_METHOD(Map, Map_get, "get", "(Ljava/lang/Object;)Ljava/lang/Object;");
CACHE_METHOD(Map, Map_put, "put",
Expand All @@ -173,8 +164,6 @@ bool bsg_jni_cache_init(JNIEnv *env) {

CACHE_CLASS(HashMap, "java/util/HashMap");
CACHE_METHOD(HashMap, HashMap_constructor, "<init>", "()V");
CACHE_METHOD(HashMap, HashMap_keySet, "keySet", "()Ljava/util/Set;");
CACHE_METHOD(HashMap, HashMap_size, "size", "()I");
CACHE_METHOD(HashMap, HashMap_get, "get",
"(Ljava/lang/Object;)Ljava/lang/Object;");
CACHE_METHOD(HashMap, HashMap_put, "put",
Expand All @@ -196,10 +185,6 @@ bool bsg_jni_cache_init(JNIEnv *env) {
CACHE_STATIC_METHOD(NativeInterface, NativeInterface_notify, "notify",
"([B[BLcom/bugsnag/android/Severity;[Lcom/bugsnag/"
"android/NativeStackframe;)V");
CACHE_STATIC_METHOD(NativeInterface, NativeInterface_isDiscardErrorClass,
"isDiscardErrorClass", "(Ljava/lang/String;)Z");
CACHE_STATIC_METHOD(NativeInterface, NativeInterface_deliverReport,
"deliverReport", "([B[B[BLjava/lang/String;Z)V");
CACHE_STATIC_METHOD(NativeInterface, NativeInterface_leaveBreadcrumb,
"leaveBreadcrumb",
"([BLcom/bugsnag/android/BreadcrumbType;)V");
Expand Down
12 changes: 0 additions & 12 deletions bugsnag-plugin-android-ndk/src/main/jni/jni_cache.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ typedef struct {
jmethodID Int_intValue;

jclass Long;
jmethodID Long_constructor;
jmethodID Long_valueOf;

jclass Float;
Expand All @@ -48,7 +47,6 @@ typedef struct {
jmethodID Map_get;
jmethodID Map_put;
jmethodID Map_size;
jmethodID Map_keySet;
jmethodID Map_entrySet;

jclass MapEntry;
Expand All @@ -59,14 +57,6 @@ typedef struct {
jmethodID HashMap_constructor;
jmethodID HashMap_get;
jmethodID HashMap_put;
jmethodID HashMap_size;
jmethodID HashMap_keySet;

jclass ArrayList;
jmethodID ArrayList_constructor_default;
jmethodID ArrayList_constructor_collection;
jmethodID ArrayList_get;
jmethodID ArrayList_add;

jclass NativeInterface;
jmethodID NativeInterface_getApp;
Expand All @@ -77,8 +67,6 @@ typedef struct {
jmethodID NativeInterface_getContext;
jmethodID NativeInterface_notify;
jmethodID NativeInterface_leaveBreadcrumb;
jmethodID NativeInterface_isDiscardErrorClass;
jmethodID NativeInterface_deliverReport;

jclass NativeStackframe;
jmethodID NativeStackframe_constructor;
Expand Down
1 change: 1 addition & 0 deletions bugsnag-plugin-android-ndk/src/test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,6 @@ add_library(bugsnag-ndk-test SHARED
cpp/test_featureflags.c
cpp/test_bsg_event.c
cpp/UnwindTest.cpp
cpp/parson/parson.h
)
target_link_libraries(bugsnag-ndk-test bugsnag-ndk)
2 changes: 1 addition & 1 deletion bugsnag-plugin-android-ndk/src/test/cpp/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
#define GREATEST_FPRINTF(ignore, fmt, ...) \
__android_log_print(ANDROID_LOG_INFO, "BugsnagNDKTest", fmt, ##__VA_ARGS__)

#include "parson/parson.h"
#include <greatest/greatest.h>
#include <parson/parson.h>

#include "test_bsg_event.h"
#include "test_serializer.h"
Expand Down
12 changes: 0 additions & 12 deletions bugsnag-plugin-android-ndk/src/test/cpp/test_serializer.c
Original file line number Diff line number Diff line change
@@ -1,18 +1,6 @@
#include <utils/string.h>
#include "test_serializer.h"

enum greatest_test_res validate_serialized_json(const test_case *test_case,
JSON_Value *event_val) {
// convert to string
char *serialized_string = json_serialize_to_string(event_val);
json_value_free(event_val);

// validate structure
char *expected = test_case->expected_json;
ASSERT_STR_EQ(expected, serialized_string);
PASS();
}

void loadUserTestCase(bugsnag_event *event) {
bugsnag_user *user = &event->user;
strcpy(user->name, "Fenton");
Expand Down
4 changes: 1 addition & 3 deletions bugsnag-plugin-android-ndk/src/test/cpp/test_serializer.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

#include <stdlib.h>

#include <parson/parson.h>
#include "parson/parson.h"

#include <utils/serializer.h>

Expand All @@ -12,8 +12,6 @@ typedef struct {
char *expected_json;
} test_case;

enum greatest_test_res validate_serialized_json(const test_case *test_case,
JSON_Value *event_val);
void loadUserTestCase(bugsnag_event *event);
void loadAppTestCase(bugsnag_event *event);
void loadAppMetadataTestCase(bugsnag_event *event);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
#include <stdlib.h>
#include <unistd.h>

#include "parson/parson.h"
#include <greatest/greatest.h>
#include <parson/parson.h>

#include <featureflags.h>
#include <utils/serializer.h>
Expand Down
1 change: 1 addition & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ x-common-environment: &common-environment
BUILDKITE_STEP_KEY:
MAZE_BUGSNAG_API_KEY:
MAZE_NO_FAIL_FAST:
MAZE_APPIUM_BUGSNAG_API_KEY:
MAZE_SCENARIO_BUGSNAG_API_KEY:
TEST_FIXTURE_SYMBOL_DIR:

Expand Down
4 changes: 2 additions & 2 deletions examples/sdk-app-example/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ android {
}

dependencies {
implementation "com.bugsnag:bugsnag-android:6.12.1"
implementation "com.bugsnag:bugsnag-plugin-android-okhttp:6.12.1"
implementation "com.bugsnag:bugsnag-android:6.13.0"
implementation "com.bugsnag:bugsnag-plugin-android-okhttp:6.13.0"
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
implementation "androidx.appcompat:appcompat:1.6.1"
implementation "com.google.android.material:material:1.11.0"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ internal class DiscardOldSessionScenario(

fun waitForSessionFile() {
val dir = sessionDir()
while (dir.listFiles()!!.isEmpty()) {
while (dir.listFiles().isNullOrEmpty()) {
Thread.sleep(100)
}
}
Expand Down
Loading
Loading