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

fix: avoid android.os.strictmode.UnbufferedIoViolation by using BufferedInputStream #6565

Closed

Conversation

gubatron
Copy link

@gubatron gubatron commented Dec 5, 2024

  • Wrap InputStream with BufferedInputStream to ensure buffered I/O and prevent UnbufferedIoViolation in Android 14 (SDK 34).
  • Use try-with-resources to automatically close streams, improving resource management.
  • Retain existing functionality for converting InputStream to a UTF-8 string.

This change ensures compliance with Android 14's stricter I/O policies.
Many apps are about to up their target SDK to 34 and this comes up as soon as apps startup.

…redInputStream

- Wrap InputStream with BufferedInputStream to ensure buffered I/O and 
  prevent UnbufferedIoViolation in Android 14 (SDK 34).
- Use try-with-resources to automatically close streams, improving resource management.
- Retain existing functionality for converting InputStream to a UTF-8 string.

This change ensures compliance with Android 14's stricter I/O policies.
@gubatron
Copy link
Author

bump.

Copy link
Contributor

@mrober mrober left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Can you please add a CHANGELOG entry? You can link to this PR in it

@mrober
Copy link
Contributor

mrober commented Mar 17, 2025

It looks like you have a formatting problem. Try running ./gradlew :firebase-crashlytics:spotlessApply see https://github.com/firebase/firebase-android-sdk?tab=readme-ov-file#code-formatting.

Can you also add a changelog entry to https://github.com/firebase/firebase-android-sdk/blob/main/firebase-crashlytics/CHANGELOG.md? You can link to this PR in it, and the link will eventually show on our release notes.

gubatron added a commit to gubatron/firebase-android-sdk that referenced this pull request Mar 18, 2025
@gubatron
Copy link
Author

@gubatron
Copy link
Author

CLA updated to have my github username
Screenshot 2025-03-18 at 9 18 06 AM

Screenshot 2025-03-18 at 9 22 04 AM

@davidmotson
Copy link
Collaborator

Hi, to resolve this issue you are having with the "malformed root JSON" error, please add a secret to your fork of this repo.

The secret must be named "INTEG_TESTS_GOOGLE_SERVICES" and contain a base64 string which decodes to the contents of a valid google-services.json file.

@gubatron
Copy link
Author

I've created a google-services.json file with a dummy firebase project, encoded its contents into a base64 string and added it to a secret in the settings of my repo, should I do anything else now?
Screenshot 2025-03-24 at 8 37 57 PM

@gubatron gubatron force-pushed the fix/unbuffered-io-violation-android-14 branch from 78956ff to 25f6a59 Compare March 24, 2025 19:10
tejasd and others added 15 commits March 24, 2025 22:19
…tional custom key value pairs (firebase#6528)

This PR adds a method `public void recordException(@nonnull Throwable
throwable, CustomKeysAndValues keysAndValues)` as an overload to the
existing `recordException` method in Crashlytics to allow attaching
additional custom keys to the specific event.

Details:
- The total number of custom key/value pairs are still restricted to 64
- App level custom keys take precedence over event specific custom keys
for the 64 key/value pair limit
- The values of event keys override the value of global custom keys if
they're identical

Additionally:
- Creates a new EventMetadata class to represent `sessionId` and
`timestamp` attached to non fatal events.
…nd/functions/functions (firebase#6566)

Bumps [path-to-regexp](https://github.com/pillarjs/path-to-regexp) and
[express](https://github.com/expressjs/express). These dependencies
needed to be updated together.
Updates `path-to-regexp` from 0.1.10 to 0.1.12
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/pillarjs/path-to-regexp/releases">path-to-regexp's
releases</a>.</em></p>
<blockquote>
<h2>Fix backtracking (again)</h2>
<p><strong>Fixed</strong></p>
<ul>
<li>Improved backtracking protection for 0.1.x, will break some
previously valid paths (see previous advisory: <a
href="https://github.com/pillarjs/path-to-regexp/security/advisories/GHSA-9wv6-86v2-598j">https://github.com/pillarjs/path-to-regexp/security/advisories/GHSA-9wv6-86v2-598j</a>)</li>
</ul>
<p><a
href="https://github.com/pillarjs/path-to-regexp/compare/v0.1.11...v0.1.12">https://github.com/pillarjs/path-to-regexp/compare/v0.1.11...v0.1.12</a></p>
<h2>Error on bad input</h2>
<p><strong>Changed</strong></p>
<ul>
<li>Add error on bad input values  8f09549</li>
</ul>
<p><a
href="https://github.com/pillarjs/path-to-regexp/compare/v0.1.10...v0.1.11">https://github.com/pillarjs/path-to-regexp/compare/v0.1.10...v0.1.11</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/pillarjs/path-to-regexp/commit/640e694c6fd971f78268439df9cf44040855e669"><code>640e694</code></a>
0.1.12</li>
<li><a
href="https://github.com/pillarjs/path-to-regexp/commit/f01c26a013b1889f0c217c643964513acf17f6a4"><code>f01c26a</code></a>
Merge commit from fork</li>
<li><a
href="https://github.com/pillarjs/path-to-regexp/commit/0c7119248b7cb528a0aea3ba45ed4e2db007cba4"><code>0c71192</code></a>
0.1.11</li>
<li><a
href="https://github.com/pillarjs/path-to-regexp/commit/8f095497d678c2ec3495a99ab3928748731e73ee"><code>8f09549</code></a>
Add error on bad input values</li>
<li>See full diff in <a
href="https://github.com/pillarjs/path-to-regexp/compare/v0.1.10...v0.1.12">compare
view</a></li>
</ul>
</details>
<br />

Updates `express` from 4.21.1 to 4.21.2
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/expressjs/express/releases">express's
releases</a>.</em></p>
<blockquote>
<h2>4.21.2</h2>
<h2>What's Changed</h2>
<ul>
<li>Add funding field (v4) by <a
href="https://github.com/bjohansebas"><code>@​bjohansebas</code></a> in
<a
href="https://redirect.github.com/expressjs/express/pull/6065">expressjs/express#6065</a></li>
<li>deps: [email protected] by <a
href="https://github.com/blakeembrey"><code>@​blakeembrey</code></a> in
<a
href="https://redirect.github.com/expressjs/express/pull/5956">expressjs/express#5956</a></li>
<li>deps: bump [email protected] by <a
href="https://github.com/jonchurch"><code>@​jonchurch</code></a> in <a
href="https://redirect.github.com/expressjs/express/pull/6209">expressjs/express#6209</a></li>
<li>Release: 4.21.2 by <a
href="https://github.com/UlisesGascon"><code>@​UlisesGascon</code></a>
in <a
href="https://redirect.github.com/expressjs/express/pull/6094">expressjs/express#6094</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/expressjs/express/compare/4.21.1...4.21.2">https://github.com/expressjs/express/compare/4.21.1...4.21.2</a></p>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/expressjs/express/blob/4.21.2/History.md">express's
changelog</a>.</em></p>
<blockquote>
<h1>4.21.2 / 2024-11-06</h1>
<ul>
<li>deps: [email protected]
<ul>
<li>Fix backtracking protection</li>
</ul>
</li>
<li>deps: [email protected]
<ul>
<li>Throws an error on invalid path values</li>
</ul>
</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/expressjs/express/commit/1faf228935aa0a13111f92c28ee795be64ce3f0f"><code>1faf228</code></a>
4.21.2</li>
<li><a
href="https://github.com/expressjs/express/commit/2e0fb646d03184dd9a5285813460210c0e7ae654"><code>2e0fb64</code></a>
deps: bump [email protected] (<a
href="https://redirect.github.com/expressjs/express/issues/6209">#6209</a>)</li>
<li><a
href="https://github.com/expressjs/express/commit/59fc27028ec5d212be653d35d7e3f73a2c3ac3c0"><code>59fc270</code></a>
deps: [email protected] (<a
href="https://redirect.github.com/expressjs/express/issues/5956">#5956</a>)</li>
<li><a
href="https://github.com/expressjs/express/commit/51fc39ccf834eec44547b0f4fed8027e7c05a009"><code>51fc39c</code></a>
docs: add funding (<a
href="https://redirect.github.com/expressjs/express/issues/6065">#6065</a>)</li>
<li>See full diff in <a
href="https://github.com/expressjs/express/compare/4.21.1...4.21.2">compare
view</a></li>
</ul>
</details>
<details>
<summary>Maintainer changes</summary>
<p>This version was pushed to npm by <a
href="https://www.npmjs.com/~jonchurch">jonchurch</a>, a new releaser
for express since your current version.</p>
</details>
<br />


Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)
You can disable automated security fix PRs for this repo from the
[Security Alerts
page](https://github.com/firebase/firebase-android-sdk/network/alerts).

</details>

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Rodrigo Lazo <[email protected]>
…flows (firebase#5620)

Bumps
[tj-actions/changed-files](https://github.com/tj-actions/changed-files)
from 36.0.10 to 41.0.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/tj-actions/changed-files/releases">tj-actions/changed-files's
releases</a>.</em></p>
<blockquote>
<h2>v41.0.0</h2>
<h2>🔥 🔥 BREAKING CHANGE 🔥 🔥</h2>
<p>A new <code>safe_output</code> input is now available to prevent
outputting unsafe filename characters (Enabled by default). This would
escape characters in the filename that could be used for command
injection.</p>
<blockquote>
<p>[!NOTE]
This can be disabled by setting the <code>safe_output</code> to false
this comes with a recommendation to store all outputs generated in an
environment variable first before using them.</p>
</blockquote>
<h4>Example</h4>
<pre lang="yaml"><code>...
    - name: Get changed files
      id: changed-files
      uses: tj-actions/changed-files@v40
      with:
safe_output: false # set to false because we are using an environment
variable to store the output and avoid command injection.
<pre><code>- name: List all added files
  env:
    ADDED_FILES: ${{ steps.changed-files.outputs.added_files }}
  run: |
    for file in &amp;quot;$ADDED_FILES&amp;quot;; do
      echo &amp;quot;$file was added&amp;quot;
    done
</code></pre>
<p>...
</code></pre></p>
<h2>What's Changed</h2>
<ul>
<li>chore(deps): update typescript-eslint monorepo to v6.15.0 by <a
href="https://github.com/renovate"><code>@​renovate</code></a> in <a
href="https://redirect.github.com/tj-actions/changed-files/pull/1801">tj-actions/changed-files#1801</a></li>
<li>Upgraded to v40.2.3 by <a
href="https://github.com/tj-actions-bot"><code>@​tj-actions-bot</code></a>
in <a
href="https://redirect.github.com/tj-actions/changed-files/pull/1800">tj-actions/changed-files#1800</a></li>
<li>chore(deps): update dependency eslint-plugin-prettier to v5.1.0 by
<a href="https://github.com/renovate"><code>@​renovate</code></a> in <a
href="https://redirect.github.com/tj-actions/changed-files/pull/1802">tj-actions/changed-files#1802</a></li>
<li>chore(deps): lock file maintenance by <a
href="https://github.com/renovate"><code>@​renovate</code></a> in <a
href="https://redirect.github.com/tj-actions/changed-files/pull/1803">tj-actions/changed-files#1803</a></li>
<li>chore(deps): update dependency eslint-plugin-prettier to v5.1.1 by
<a href="https://github.com/renovate"><code>@​renovate</code></a> in <a
href="https://redirect.github.com/tj-actions/changed-files/pull/1804">tj-actions/changed-files#1804</a></li>
<li>fix: update safe output regex and the docs by <a
href="https://github.com/tj-actions-bot"><code>@​tj-actions-bot</code></a>
in <a
href="https://redirect.github.com/tj-actions/changed-files/pull/1805">tj-actions/changed-files#1805</a></li>
<li>Revert &quot;chore(deps): update actions/download-artifact action to
v4&quot; by <a
href="https://github.com/jackton1"><code>@​jackton1</code></a> in <a
href="https://redirect.github.com/tj-actions/changed-files/pull/1806">tj-actions/changed-files#1806</a></li>
<li>Update README.md by <a
href="https://github.com/jackton1"><code>@​jackton1</code></a> in <a
href="https://redirect.github.com/tj-actions/changed-files/pull/1808">tj-actions/changed-files#1808</a></li>
<li>chore(deps): lock file maintenance by <a
href="https://github.com/renovate"><code>@​renovate</code></a> in <a
href="https://redirect.github.com/tj-actions/changed-files/pull/1809">tj-actions/changed-files#1809</a></li>
<li>Updated README.md by <a
href="https://github.com/tj-actions-bot"><code>@​tj-actions-bot</code></a>
in <a
href="https://redirect.github.com/tj-actions/changed-files/pull/1810">tj-actions/changed-files#1810</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/tj-actions/changed-files/compare/v40...v41.0.0">https://github.com/tj-actions/changed-files/compare/v40...v41.0.0</a></p>
<h2>v41</h2>
<h1>Changes in v41.0.1</h1>
<h2>What's Changed</h2>
<ul>
<li>Upgraded to v41 by <a
href="https://github.com/tj-actions-bot"><code>@​tj-actions-bot</code></a>
in <a
href="https://redirect.github.com/tj-actions/changed-files/pull/1811">tj-actions/changed-files#1811</a></li>
<li>chore(deps): update dependency eslint-plugin-prettier to v5.1.2 by
<a href="https://github.com/renovate"><code>@​renovate</code></a> in <a
href="https://redirect.github.com/tj-actions/changed-files/pull/1813">tj-actions/changed-files#1813</a></li>
<li>fix: update characters escaped by safe output by <a
href="https://github.com/jackton1"><code>@​jackton1</code></a> in <a
href="https://redirect.github.com/tj-actions/changed-files/pull/1815">tj-actions/changed-files#1815</a></li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/tj-actions/changed-files/blob/main/HISTORY.md">tj-actions/changed-files's
changelog</a>.</em></p>
<blockquote>
<h1><a
href="https://github.com/tj-actions/changed-files/compare/v40.2.3...v41.0.0">41.0.0</a>
- (2023-12-23)</h1>
<h2><!-- raw HTML omitted -->🐛 Bug Fixes</h2>
<ul>
<li>Update safe output regex and the docs (<a
href="https://redirect.github.com/tj-actions/changed-files/issues/1805">#1805</a>)
(<a
href="https://github.com/tj-actions/changed-files/commit/ff2f6e6b91913a7be42be1b5917330fe442f2ede">ff2f6e6</a>)
- (tj-actions[bot])</li>
</ul>
<h2><!-- raw HTML omitted -->⏪ Reverts</h2>
<ul>
<li>Revert &quot;chore(deps): update actions/download-artifact action to
v4&quot; (<a
href="https://redirect.github.com/tj-actions/changed-files/issues/1806">#1806</a>)</li>
</ul>
<p>(<a
href="https://github.com/tj-actions/changed-files/commit/4f573fed06c9abb5da4c72f75c1c320718114ff7">4f573fe</a>)
- (Tonye Jack)</p>
<h2><!-- raw HTML omitted -->🔄 Update</h2>
<ul>
<li>Update README.md (<a
href="https://github.com/tj-actions/changed-files/commit/6e79d6e3dbe48946636c2939c80ff5c84ff7f9fe">6e79d6e</a>)
- (Tonye Jack)</li>
<li>Update README.md (<a
href="https://github.com/tj-actions/changed-files/commit/d13ac1942fb3c1d7d32017915bb082cebe8a272a">d13ac19</a>)
- (Tonye Jack)</li>
<li>Update README.md (<a
href="https://github.com/tj-actions/changed-files/commit/bb89f97963be96b39e1a303e64d5b91a1af4c340">bb89f97</a>)
- (Tonye Jack)</li>
<li>Updated README.md (<a
href="https://redirect.github.com/tj-actions/changed-files/issues/1810">#1810</a>)</li>
</ul>
<p>Co-authored-by: renovate[bot] <!-- raw HTML omitted --> (<a
href="https://github.com/tj-actions/changed-files/commit/1864078d0afadf68ba489e671ecc09fefe8b70ab">1864078</a>)
- (tj-actions[bot])</p>
<ul>
<li>Update README.md (<a
href="https://redirect.github.com/tj-actions/changed-files/issues/1808">#1808</a>)</li>
</ul>
<p>(<a
href="https://github.com/tj-actions/changed-files/commit/47371c50e97c089212d9eb92ca26c8453224e78e">47371c5</a>)
- (Tonye Jack)</p>
<h2><!-- raw HTML omitted -->📝 Other</h2>
<ul>
<li>Merge pull request from GHSA-mcph-m25j-8j63</li>
</ul>
<ul>
<li>
<p>feat: add <code>safe_output</code> input enabled by default</p>
</li>
<li>
<p>fix: migrate README to safe uses of interpolation</p>
</li>
<li>
<p>fix: README <code>uses</code> typo</p>
</li>
<li>
<p>fix: README examples to account for newlines</p>
</li>
<li>
<p>fix: README examples missing <code>safe_output</code></p>
</li>
<li>
<p>fix: remove sanitization of <code>'</code></p>
</li>
<li>
<p>fix: also sanitize <code>|&amp;;</code> (<a
href="https://github.com/tj-actions/changed-files/commit/0102c07446a3cad972f4afcbd0ee4dbc4b6d2d1b">0102c07</a>)
- (Jorge)</p>
</li>
</ul>
<h2><!-- raw HTML omitted -->⚙️ Miscellaneous Tasks</h2>
<ul>
<li><strong>deps:</strong> Lock file maintenance (<a
href="https://github.com/tj-actions/changed-files/commit/f495a0321d3fffa62da2573adf70b77d5eb2f57a">f495a03</a>)
- (renovate[bot])</li>
<li><strong>deps:</strong> Update dependency eslint-plugin-prettier to
v5.1.1 (<a
href="https://github.com/tj-actions/changed-files/commit/089842a7a899531f61a45ef6ea69c485e1d62dbe">089842a</a>)
- (renovate[bot])</li>
<li><strong>deps:</strong> Lock file maintenance (<a
href="https://github.com/tj-actions/changed-files/commit/787db0612e783421667a00319cf394b649682c4c">787db06</a>)
- (renovate[bot])</li>
<li><strong>deps:</strong> Update dependency eslint-plugin-prettier to
v5.1.0 (<a
href="https://github.com/tj-actions/changed-files/commit/4ef6b56482141a958bd3efb05520e4df9ecf4147">4ef6b56</a>)
- (renovate[bot])</li>
<li><strong>deps:</strong> Update typescript-eslint monorepo to v6.15.0
(<a
href="https://github.com/tj-actions/changed-files/commit/c9ae347dbba64d95d83f36a0568e0e25a688dd1f">c9ae347</a>)
- (renovate[bot])</li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/tj-actions/changed-files/commit/6e79d6e3dbe48946636c2939c80ff5c84ff7f9fe"><code>6e79d6e</code></a>
Update README.md</li>
<li><a
href="https://github.com/tj-actions/changed-files/commit/d13ac1942fb3c1d7d32017915bb082cebe8a272a"><code>d13ac19</code></a>
Update README.md</li>
<li><a
href="https://github.com/tj-actions/changed-files/commit/bb89f97963be96b39e1a303e64d5b91a1af4c340"><code>bb89f97</code></a>
Update README.md</li>
<li><a
href="https://github.com/tj-actions/changed-files/commit/1864078d0afadf68ba489e671ecc09fefe8b70ab"><code>1864078</code></a>
Updated README.md (<a
href="https://redirect.github.com/tj-actions/changed-files/issues/1810">#1810</a>)</li>
<li><a
href="https://github.com/tj-actions/changed-files/commit/f495a0321d3fffa62da2573adf70b77d5eb2f57a"><code>f495a03</code></a>
chore(deps): lock file maintenance</li>
<li><a
href="https://github.com/tj-actions/changed-files/commit/47371c50e97c089212d9eb92ca26c8453224e78e"><code>47371c5</code></a>
Update README.md (<a
href="https://redirect.github.com/tj-actions/changed-files/issues/1808">#1808</a>)</li>
<li><a
href="https://github.com/tj-actions/changed-files/commit/4f573fed06c9abb5da4c72f75c1c320718114ff7"><code>4f573fe</code></a>
Revert &quot;chore(deps): update actions/download-artifact action to
v4&quot; (<a
href="https://redirect.github.com/tj-actions/changed-files/issues/1806">#1806</a>)</li>
<li><a
href="https://github.com/tj-actions/changed-files/commit/ff2f6e6b91913a7be42be1b5917330fe442f2ede"><code>ff2f6e6</code></a>
fix: update safe output regex and the docs (<a
href="https://redirect.github.com/tj-actions/changed-files/issues/1805">#1805</a>)</li>
<li><a
href="https://github.com/tj-actions/changed-files/commit/0102c07446a3cad972f4afcbd0ee4dbc4b6d2d1b"><code>0102c07</code></a>
Merge pull request from GHSA-mcph-m25j-8j63</li>
<li><a
href="https://github.com/tj-actions/changed-files/commit/089842a7a899531f61a45ef6ea69c485e1d62dbe"><code>089842a</code></a>
chore(deps): update dependency eslint-plugin-prettier to v5.1.1</li>
<li>Additional commits viewable in <a
href="https://github.com/tj-actions/changed-files/compare/v36.0.10...v41.0.0">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=tj-actions/changed-files&package-manager=github_actions&previous-version=36.0.10&new-version=41.0.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

You can trigger a rebase of this PR by commenting `@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)
You can disable automated security fix PRs for this repo from the
[Security Alerts
page](https://github.com/firebase/firebase-android-sdk/network/alerts).

</details>

> **Note**
> Automatic rebases have been disabled on this pull request as it has
been open for over 30 days.

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Rodrigo Lazo <[email protected]>
The only dependencies not moved are the ones against other Firebase
libraries. These will be updated during releases.
rlazo and others added 24 commits March 24, 2025 22:19
The server produces a discovery document with the details of the API
surface.

https://aiplatform.googleapis.com/$discovery/rest?version=v1beta1

This change introduces code that can generate similar a description of
the API covered by the SDK. This will enable us to track difference
between both.

In a follow up PR we can implement the logic to fully export the
surface.

---------

Co-authored-by: Daymon <[email protected]>
For issue firebase#6558, this is an attempt at fixing the
IllegalArgumentException by ensuring that the context we use for
registering the SyncTask is the same context we use to unregister the
task. Race conditions dont seem like a culprit here since unregister is
only triggered by the Receiver itself, which should be only executed
synchronously on the main thread.
…ion response (firebase#6602)

Extend Firebase SDK with new APIs to consume streaming callable function
response.

- Handling the server-sent event (SSE) parsing internally
- Providing proper error handling and connection management
- Maintaining memory efficiency for long-running streams

---------

Co-authored-by: Rodrigo Lazo <[email protected]>
Auto-generated PR for cleaning up release m160

NO_RELEASE_CHANGE

---------

Co-authored-by: VinayGuthal <[email protected]>
Co-authored-by: VinayGuthal <[email protected]>
Remove the `firebase-vertexai/src/test/resources/golden-files`
directory. This was carried over from the
[`generative-ai-android`](https://github.com/google-gemini/generative-ai-android)
repository. We are now using
https://github.com/FirebaseExtended/vertexai-sdk-test-data/tree/main/mock-responses
instead.

#no-changelog

---------

Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
Co-authored-by: Rodrigo Lazo <[email protected]>
Co-authored-by: Daymon <[email protected]>
Co-authored-by: Matthew Robertson <[email protected]>
Co-authored-by: Rodrigo Lazo Paz <[email protected]>
…ase#6738)

Bumps [app.cash.turbine:turbine](https://github.com/cashapp/turbine)
from 1.0.0 to 1.2.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/cashapp/turbine/releases">app.cash.turbine:turbine's
releases</a>.</em></p>
<blockquote>
<h2>1.2.0</h2>
<h3>Added</h3>
<ul>
<li>Add <code>wasmWasi</code> target.</li>
</ul>
<h2>1.1.0</h2>
<h3>Changed</h3>
<ul>
<li>Add <code>wasmJs</code> target, remove <code>iosArm32</code> and
<code>watchosX86</code> targets.</li>
<li>Throw unconsumed events if scope is externally canceled.</li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/cashapp/turbine/blob/trunk/CHANGELOG.md">app.cash.turbine:turbine's
changelog</a>.</em></p>
<blockquote>
<h2><a
href="https://github.com/cashapp/turbine/releases/tag/1.2.0">1.2.0</a> -
2024-10-16</h2>
<h3>Added</h3>
<ul>
<li>Add <code>wasmWasi</code> target.</li>
</ul>
<h2><a
href="https://github.com/cashapp/turbine/releases/tag/1.1.0">1.1.0</a> -
2024-03-06</h2>
<h3>Changed</h3>
<ul>
<li>Add <code>wasmJs</code> target, remove <code>iosArm32</code> and
<code>watchosX86</code> targets.</li>
<li>Throw unconsumed events if scope is externally canceled.</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/cashapp/turbine/commit/9cffb0a7e256e80745d742726d91012b75a5b39e"><code>9cffb0a</code></a>
Prepare version 1.2.0</li>
<li><a
href="https://github.com/cashapp/turbine/commit/9419a5c4083e4264bb81862f0c3bf8c660dfdb6c"><code>9419a5c</code></a>
Add ignore for Kotlin 2.0 directory</li>
<li><a
href="https://github.com/cashapp/turbine/commit/cb94e153aad7f2de987132dd19c87225ae7632d3"><code>cb94e15</code></a>
Add wasmWasi target (<a
href="https://redirect.github.com/cashapp/turbine/issues/357">#357</a>)</li>
<li><a
href="https://github.com/cashapp/turbine/commit/c26369bb0871a84dfbc6f21d6608fc9e0f0a757f"><code>c26369b</code></a>
Update plugin publish to v0.30.0 (<a
href="https://redirect.github.com/cashapp/turbine/issues/356">#356</a>)</li>
<li><a
href="https://github.com/cashapp/turbine/commit/9e238e4927274ba17630876cda00124ee1beb7a5"><code>9e238e4</code></a>
Update plugin kotlin to v2.0.21 (<a
href="https://redirect.github.com/cashapp/turbine/issues/355">#355</a>)</li>
<li><a
href="https://github.com/cashapp/turbine/commit/91957d0d4bfdb2ed25de252762c8c5d56d33a7e0"><code>91957d0</code></a>
Update README.md Timeout Default Value (<a
href="https://redirect.github.com/cashapp/turbine/issues/354">#354</a>)</li>
<li><a
href="https://github.com/cashapp/turbine/commit/64e33be293d86d8cda39db7d3478569b0cabecfc"><code>64e33be</code></a>
Update dependency gradle to v8.10.2 (<a
href="https://redirect.github.com/cashapp/turbine/issues/353">#353</a>)</li>
<li><a
href="https://github.com/cashapp/turbine/commit/c63cc010d70cd8d8f9880247099446fa048f1279"><code>c63cc01</code></a>
Update coroutines to v1.9.0 (<a
href="https://redirect.github.com/cashapp/turbine/issues/352">#352</a>)</li>
<li><a
href="https://github.com/cashapp/turbine/commit/391d59359bb3fb37226ad27e43f627103a11facf"><code>391d593</code></a>
Update dependency gradle to v8.10.1 (<a
href="https://redirect.github.com/cashapp/turbine/issues/351">#351</a>)</li>
<li><a
href="https://github.com/cashapp/turbine/commit/5afbaa9fbeb4532f9fe2e55c0843dff0f6b73b7a"><code>5afbaa9</code></a>
Update plugin kotlin to v2.0.20 (<a
href="https://redirect.github.com/cashapp/turbine/issues/347">#347</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/cashapp/turbine/compare/1.0.0...1.2.0">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=app.cash.turbine:turbine&package-manager=gradle&previous-version=1.0.0&new-version=1.2.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Rodrigo Lazo <[email protected]>
…se#6758)

Update the versions and changelog entries for Crashlytics, Perf, and
AQS. The important entries are copied from AQS to Crashlytics so they
get published on the release notes page.
… from 5.0.0 to 5.1.1 (firebase#6739)

Bumps com.google.firebase:firebase-appdistribution-gradle from 5.0.0 to
5.1.1.


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=com.google.firebase:firebase-appdistribution-gradle&package-manager=gradle&previous-version=5.0.0&new-version=5.1.1)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Kai Bolay <[email protected]>
We need explicit permissions to create PRs now, this adjusts our create
release workflow to specify them.
There is an extra copy of some tests inside ` test/.../common`
directory. This change removes them, and in the process:

- Adds missing tests to the correct test file
- Gets rid of duplicated tests and test-util code
- Adds an exception type for quota exceeded
…irebase#6775)

Alternative to firebase#6774 - we'll keep that PR for a follow-up release.

For now, we're exposing the `reactive-streams` dependency to make sure
it works out of the box for Java developers.
Throwing inside the `PublisherStream` causes a Runtime exception that
can't be caught in the call site.
Instead, we should use `notifyError()` so that the error can be caught
in the `Subscriber#onError()` function.

I tried to catch the exception using both of the code snippets below,
but none of them worked. (they both work with the changes in this PR):

```kotlin
functions.getHttpsCallable("nonExistentFunction")
    .stream().asFlow()
    .catch {
        // Handle error for a 404 function
    }
    .collect {
        // ...
    }
```

```kotlin
try {
    functions.getHttpsCallable("nonExistentFunction")
        .stream().asFlow()
        .collect {
            // ...
        }
} catch(e: Exception) {
    // Handle error for a 404 function
}
```

Runtime exception thrown:

```
FATAL EXCEPTION: OkHttp Dispatcher
    Process: com.google.samples.quickstart.functions, PID: 13321
    com.google.firebase.functions.FirebaseFunctionsException: Value <html><head> of type java.lang.String cannot be converted to JSONObject Unexpected Response:
                                                                             
    <html><head>
    <meta http-equiv="content-type" content="text/html;charset=utf-8">
    <title>404 Page not found</title>
    </head>
        <body text=#000000 bgcolor=#ffffff>
            <h1>Error: Page not found</h1>
            <h2>The requested URL was not found on this server.</h2>
            <h2></h2>
        </body></html>
                                                                              
    at com.google.firebase.functions.PublisherStream.validateResponse(PublisherStream.kt:316)
    at com.google.firebase.functions.PublisherStream.access$validateResponse(PublisherStream.kt:41)
    at com.google.firebase.functions.PublisherStream$startStreaming$1$4.onResponse(PublisherStream.kt:161)
    at okhttp3.RealCall$AsyncCall.execute(RealCall.java:203)
    at okhttp3.internal.NamedRunnable.run(NamedRunnable.java:32)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1156)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:651)
    at java.lang.Thread.run(Thread.java:1119)
```
@gubatron gubatron force-pushed the fix/unbuffered-io-violation-android-14 branch from 25f6a59 to a2959f5 Compare March 24, 2025 20:21
@lehcar09
Copy link
Contributor

Hey @gubatron, this PR shows a lot of conflicts. Could you file a new one to? That might be faster and easier to resolve this conflicts. Also, please ensure that your forked repository is updated before you commit the changes.

@gubatron
Copy link
Author

Closing in favor of PR #6822

@gubatron gubatron closed this Mar 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.