firebase / firebase/firebase-tools
One unsupported .so prevents crashlytics:symbols:upload from processing the rest of the symbols archive
- Dominant language
- TypeScript
- Stars
- 4.5k
- Forks
- 1.3k
- Avg merge
- 1d 12h
- Merged PRs (30d)
- 84
Description
### [REQUIRED] Environment info
**firebase-tools:**
`v15.28.2`
**Platform:**
Ubuntu (`ubuntu-latest` GitHub Actions runner)
The issue was observed with an Android native symbols archive generated from a Unity project when **Debug Symbol Level** was set to **Full**.
### [REQUIRED] Test case
The issue can be reproduced using two shared libraries:
1. A library built with debug information.
2. A library built without debug information, representing a prebuilt native library included in a third-party AAR.
The following script creates a `symbols.zip` that reproduces the problem:
```bash
set -eux
mkdir -p build symbols/x86_64
cat > build/lib.c <<'EOF'
int crashlytics_test_add(int a, int b) { return a + b; }
EOF
# A library with debug information
gcc -shared -fPIC -g -Wl,--build-id \
-o build/libwith-debug-info.so \
build/lib.c
# A prebuilt-like library without debug information
gcc -shared -fPIC -g0 -Wl,--build-id \
-o build/libno-debug-info.so \
build/lib.c
# Simulate the processing performed when generating a Full native
# debug-symbol archive.
objcopy --only-keep-debug \
build/libwith-debug-info.so \
symbols/x86_64/libwith-debug-info.so
objcopy --only-keep-debug \
build/libno-debug-info.so \
symbols/x86_64/libno-debug-info.so
(cd symbols && zip -r ../symbols.zip .)
```
Applying `objcopy --only-keep-debug` to the library that originally has no debug information produces an ELF file with:
- no non-empty `.debug_*` sections; and
- `.text` represented as an `SHT_NOBITS` section.
Its section headers can be inspected with:
```bash
readelf -S symbols/x86_64/libno-debug-info.so
```
The resulting file does not contain usable debug information or code contents from which Breakpad symbols can be generated.
### [REQUIRED] Steps to reproduce
1. Run the test case above to create `symbols.zip`.
2. Run the Firebase CLI with debug logging enabled:
```bash
firebase crashlytics:symbols:upload \
--app= \
--dry-run \
--debug \
symbols.zip
```
This also occurs with symbols archives generated from Unity Android projects when:
- Unity's **Debug Symbol Level** is set to **Full**;
- the application includes prebuilt `.so` files from third-party AARs; and
- at least one of those libraries was built without debug information.
### [REQUIRED] Expected behavior
A native library for which Breakpad symbols cannot be generated should not prevent valid libraries in the same archive from being processed.
The command should report the unsupported library and continue generating symbols for the remaining valid libraries.
For example:
```text
Warning: Breakpad symbols could not be generated for x86_64/libno-debug-info.so; skipping this library.
```
After processing the archive, symbols for `libwith-debug-info.so` should exist in the symbol cache. With `--dry-run`, the command should skip only the upload step as documented.
### [REQUIRED] Actual behavior
When Crashlytics Buildtools processes `libno-debug-info.so`, `dump_syms` exits with status 1:
```text
[CRASHLYTICS LOG DEBUG] Crashlytics generating Breakpad Symbol file for:
.../unzippedLibsCache/x86_64/libno-debug-info.so
java.io.IOException: Breakpad symbol generation failed (exit=1), see STDERR
```
This failure aborts processing of the entire archive. Native libraries appearing later in the ZIP are not processed, and the `crashlytics:symbols:upload` command exits with an error.
As a result, a single unsupported `.so` can prevent symbols for all otherwise valid libraries in the same archive from being generated or uploaded. The exact set of affected libraries can depend on the order of entries in the ZIP archive.
Contributor guide
Research direction
Start at the firebase crashlytics:symbols:upload command handling and trace how a dump_syms failure for one library propagates through archive processing. Reproduce the issue with the provided symbols.zip script and debug command; done means the unsupported library is reported and skipped, valid libraries are processed, and --dry-run still skips only upload.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Clearly specified
- Newbie friendliness
- 72/100