这个句子的中文翻译是:“是什么导致了对Firebase服务器的调用?”

huangapple go评论74阅读模式
英文:

What causes this call to Firebase server?

问题

这是要翻译的内容:

"An Android app does not use Firebase. I have done a global search to ensure nothing has the word 'firebase'. However, I see the following logcat entry:

TRuntime.C...ortBackend com.mydomain.myapp I Making request to: https://firebaselogging.googleapis.com/v0cc/log/batch?format=json_proto3

Could anyone offer a tip to help figure out what triggers this?

The app does not use any third-party analytics or advertising packages.

Update [2023-05-25]

Here are the dependencies of the app:

implementation 'androidx.activity:activity:1.7.1'
implementation 'androidx.fragment:fragment:1.5.7'
implementation 'androidx.navigation:navigation-fragment:2.5.3'
implementation 'androidx.navigation:navigation-ui:2.5.3'
implementation 'androidx.preference:preference:1.2.0'
implementation 'androidx.datastore:datastore:1.0.0'
implementation 'androidx.gridlayout:gridlayout:1.0.0'

implementation 'androidx.work:work-runtime:2.8.1'

implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'androidx.recyclerview:recyclerview:1.3.0'
implementation 'androidx.browser:browser:1.5.0'

implementation 'com.google.android.gms:play-services-plus:17.0.0'
implementation 'com.google.android.gms:play-services-auth:20.5.0'
implementation 'com.google.android.gms:play-services-location:21.0.1'
implementation('com.google.guava:guava:30.1.1-android') {
    exclude group: 'com.google.guava'
}

implementation 'com.google.android.gms:play-services-oss-licenses:17.0.1'

implementation 'androidx.multidex:multidex:2.0.1'

implementation 'joda-time:joda-time:2.10.10'

implementation 'com.github.angads25:filepicker:1.1.1'

implementation 'commons-io:commons-io:2.5'

implementation 'com.google.android.flexbox:flexbox:3.0.0'
implementation 'com.google.android.ads.consent:consent-library:1.0.8'

implementation 'com.github.hedzr:android-file-chooser:d7b831bf0a'


implementation('com.google.http-client:google-http-client-gson:1.26.0') {
    exclude group: 'org.apache.httpcomponents'
}
implementation('com.google.api-client:google-api-client-android:1.26.0') {
    exclude group: 'org.apache.httpcomponents'
}
implementation('com.google.apis:google-api-services-drive:v3-rev136-1.25.0') {
    exclude group: 'org.apache.httpcomponents'
}

implementation 'com.android.billingclient:billing:6.0.0'

implementation 'androidx.appcompat:appcompat:1.6.1'
implementation 'com.google.android.material:material:1.9.0'
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
implementation 'org.apache.commons:commons-lang3:3.11'

Update [2023-05-25]

I started to look into this after I observed the app crashes consistently following:

Making request to:
https://firebaselogging.googleapis.com/v0cc/log/batch?format=json_proto3

As far as I know, this started to happen only recently after I updated some dependencies.
Here is the crash:

StrictMode policy violation: android.os.strictmode.UntaggedSocketViolation: Untagged socket detected; use TrafficStats.setThreadSocketTag() to track all network usage
at android.os.StrictMode.onUntaggedSocket(StrictMode.java:2023)
at com.android.server.NetworkManagementSocketTagger.tag(NetworkManagementSocketTagger.java:82)
at libcore.io.BlockGuardOs.tagSocket(BlockGuardOs.java:50)
at libcore.io.BlockGuardOs.socket(BlockGuardOs.java:313)
at libcore.io.IoBridge.socket(IoBridge.java:640)
at java.net.PlainSocketImpl.socketCreate(PlainSocketImpl.java:124)
at java.net.AbstractPlainSocketImpl.create(AbstractPlainSocketImpl.java:128)
at java.net.Socket.createImpl(Socket.java:489)
at java.net.Socket.getImpl(Socket.java:552)
at java.net.Socket.setSoTimeout(Socket.java:1180)
at com.android.okhttp.internal.io.RealConnection.connectSocket(RealConnection.java:139)
at com.android.okhttp.internal.io.RealConnection.connect(RealConnection.java:112)
at com.android.okhttp.internal.http.StreamAllocation.findConnection(StreamAllocation.java:184)
at com.android.okhttp.internal.http.StreamAllocation.findHealthyConnection(StreamAllocation.java:126)
at com.android.okhttp.internal.http.StreamAllocation.newStream(StreamAllocation.java:95)
at com.android.okhttp.internal.http.HttpEngine.connect(HttpEngine.java:281)
at com.android.okhttp.internal.http.HttpEngine.sendRequest(HttpEngine.java:224)
at com.android.okhttp.internal.huc.HttpURLConnectionImpl.execute(HttpURLConnectionImpl.java:461)
at com.android.okhttp.internal.huc.HttpURLConnectionImpl.connect(HttpURLConnectionImpl.java:127)
at com.android.okhttp.internal.huc.HttpURLConnectionImpl.getOutputStream(HttpURLConnectionImpl.java:258)
at com.android.okhttp.internal.huc.DelegatingHttpsURLConnection.getOutputStream(DelegatingHttpsURLConnection.java:218)
at com.android.okhttp.internal.huc.HttpsURLConnectionImpl.getOutputStream(HttpsURLConnectionImpl.java:26)
at com.google.android.datatransport.cct.CctTransportBackend.doSend(CctTransportBackend.java:303)
at com.google.android.datatransport.cct.CctTransportBackend.$r8$lambda$bLAzIpNF4NtapXlUpPVGhzxyNT8(Unknown Source:0)
at com.google.android.datatransport.cct.CctTransportBackend$$ExternalSyntheticLambda0.apply(Unknown Source:4)
at com.google.android.datatransport.runtime.retries.Retries.retry(Retries.java:54)
at com.google.android.datatransport.cct.CctTransportBackend.send(CctTransportBackend.java:372)
at com.google.android.datatransport.runtime.scheduling.jobscheduling.Uploader.logAndUpdateState(Uploader.java:146)
at com.google.android.datatransport.runtime.scheduling.jobscheduling.Uploader.lambda$upload$1$com-google-android-datatransport-runtime-scheduling-jobscheduling-Uploader(Uploader.java:105)
at com.google.android.datatransport.runtime.scheduling.jobscheduling.Uploader$$ExternalSyntheticLambda2.run(Unknown Source:8)
at com.google.android.datatransport.runtime.SafeLoggingExecutor$SafeLoggingRunnable.run(SafeLoggingExecutor.java:47)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
at java.lang.Thread.run(Thread.java:764)

**Update

英文:

An Android app does not use Firebase. I have done a global search to ensure nothing has the word "firebase". However, I see the following logcat entry:

> TRuntime.C...ortBackend com.mydomain.myapp I Making request to: https://firebaselogging.googleapis.com/v0cc/log/batch?format=json_proto3

Could anyone offer a tip to help figure out what triggers this?

The app does not use any third-party analytics or advertising packages.

Update [2023-05-25]

Here are the dependencies of the app:

   implementation "androidx.activity:activity:1.7.1"
    implementation 'androidx.fragment:fragment:1.5.7'
    implementation "androidx.navigation:navigation-fragment:2.5.3"
    implementation "androidx.navigation:navigation-ui:2.5.3"
    implementation "androidx.preference:preference:1.2.0"
    implementation "androidx.datastore:datastore:1.0.0"
    implementation 'androidx.gridlayout:gridlayout:1.0.0'

    implementation 'androidx.work:work-runtime:2.8.1'

    implementation 'androidx.legacy:legacy-support-v4:1.0.0'
    implementation 'androidx.recyclerview:recyclerview:1.3.0'
    implementation 'androidx.browser:browser:1.5.0'

    implementation 'com.google.android.gms:play-services-plus:17.0.0'
    implementation 'com.google.android.gms:play-services-auth:20.5.0'
    implementation 'com.google.android.gms:play-services-location:21.0.1'
    implementation('com.google.guava:guava:30.1.1-android') {
        exclude group: "com.google.guava"
    }

    implementation 'com.google.android.gms:play-services-oss-licenses:17.0.1'

    implementation 'androidx.multidex:multidex:2.0.1'

    implementation 'joda-time:joda-time:2.10.10'

    implementation 'com.github.angads25:filepicker:1.1.1'

    implementation 'commons-io:commons-io:2.5'

    implementation 'com.google.android.flexbox:flexbox:3.0.0'
    implementation 'com.google.android.ads.consent:consent-library:1.0.8'

    implementation 'com.github.hedzr:android-file-chooser:d7b831bf0a'


    implementation('com.google.http-client:google-http-client-gson:1.26.0') {
        exclude group: 'org.apache.httpcomponents'
    }
    implementation('com.google.api-client:google-api-client-android:1.26.0') {
        exclude group: 'org.apache.httpcomponents'
    }
    implementation('com.google.apis:google-api-services-drive:v3-rev136-1.25.0') {
        exclude group: 'org.apache.httpcomponents'
    }

    implementation 'com.android.billingclient:billing:6.0.0'

    implementation 'androidx.appcompat:appcompat:1.6.1'
    implementation 'com.google.android.material:material:1.9.0'
    implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
    implementation 'org.apache.commons:commons-lang3:3.11'

Update [2023-05-25]

I started to look into this after I observed the app crashes consistently following:

> Making request to:
> https://firebaselogging.googleapis.com/v0cc/log/batch?format=json_proto3

As far as I know, this started to happen only recently after I updated some dependencies.
Here is the crash:

StrictMode policy violation: android.os.strictmode.UntaggedSocketViolation: Untagged socket detected; use TrafficStats.setThreadSocketTag() to track all network usage
    at android.os.StrictMode.onUntaggedSocket(StrictMode.java:2023)
    at com.android.server.NetworkManagementSocketTagger.tag(NetworkManagementSocketTagger.java:82)
    at libcore.io.BlockGuardOs.tagSocket(BlockGuardOs.java:50)
    at libcore.io.BlockGuardOs.socket(BlockGuardOs.java:313)
    at libcore.io.IoBridge.socket(IoBridge.java:640)
    at java.net.PlainSocketImpl.socketCreate(PlainSocketImpl.java:124)
    at java.net.AbstractPlainSocketImpl.create(AbstractPlainSocketImpl.java:128)
    at java.net.Socket.createImpl(Socket.java:489)
    at java.net.Socket.getImpl(Socket.java:552)
    at java.net.Socket.setSoTimeout(Socket.java:1180)
    at com.android.okhttp.internal.io.RealConnection.connectSocket(RealConnection.java:139)
    at com.android.okhttp.internal.io.RealConnection.connect(RealConnection.java:112)
    at com.android.okhttp.internal.http.StreamAllocation.findConnection(StreamAllocation.java:184)
    at com.android.okhttp.internal.http.StreamAllocation.findHealthyConnection(StreamAllocation.java:126)
    at com.android.okhttp.internal.http.StreamAllocation.newStream(StreamAllocation.java:95)
    at com.android.okhttp.internal.http.HttpEngine.connect(HttpEngine.java:281)
    at com.android.okhttp.internal.http.HttpEngine.sendRequest(HttpEngine.java:224)
    at com.android.okhttp.internal.huc.HttpURLConnectionImpl.execute(HttpURLConnectionImpl.java:461)
    at com.android.okhttp.internal.huc.HttpURLConnectionImpl.connect(HttpURLConnectionImpl.java:127)
    at com.android.okhttp.internal.huc.HttpURLConnectionImpl.getOutputStream(HttpURLConnectionImpl.java:258)
    at com.android.okhttp.internal.huc.DelegatingHttpsURLConnection.getOutputStream(DelegatingHttpsURLConnection.java:218)
    at com.android.okhttp.internal.huc.HttpsURLConnectionImpl.getOutputStream(HttpsURLConnectionImpl.java:26)
    at com.google.android.datatransport.cct.CctTransportBackend.doSend(CctTransportBackend.java:303)
    at com.google.android.datatransport.cct.CctTransportBackend.$r8$lambda$bLAzIpNF4NtapXlUpPVGhzxyNT8(Unknown Source:0)
    at com.google.android.datatransport.cct.CctTransportBackend$$ExternalSyntheticLambda0.apply(Unknown Source:4)
    at com.google.android.datatransport.runtime.retries.Retries.retry(Retries.java:54)
    at com.google.android.datatransport.cct.CctTransportBackend.send(CctTransportBackend.java:372)
    at com.google.android.datatransport.runtime.scheduling.jobscheduling.Uploader.logAndUpdateState(Uploader.java:146)
    at com.google.android.datatransport.runtime.scheduling.jobscheduling.Uploader.lambda$upload$1$com-google-android-datatransport-runtime-scheduling-jobscheduling-Uploader(Uploader.java:105)
    at com.google.android.datatransport.runtime.scheduling.jobscheduling.Uploader$$ExternalSyntheticLambda2.run(Unknown Source:8)
    at com.google.android.datatransport.runtime.SafeLoggingExecutor$SafeLoggingRunnable.run(SafeLoggingExecutor.java:47)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
    at java.lang.Thread.run(Thread.java:764)

Update [2023-07-21]

The complete logcat entry of the Firebase call that causes the crash:

> I/TRuntime.CctTransportBackend: Making request to:
> https://firebaselogging.googleapis.com/v0cc/log/batch?format=json_proto3

答案1

得分: 4

很多非Firebase的Google开发者产品使用https://firebaselogging.googleapis.com/端点将数据记录到Google的服务器上,因此对该端点的调用不一定要来自Firebase SDK。

大多数带有SDK的Google开发者产品都使用一个通用基础架构,用于从应用程序内部记录特定于应用程序的数据并将其发送回Google。它们使用共同的端点来发送这些日志,以便将来自多个SDK的API调用组合成对日志后端的单个调用,从而降低/摊销日志记录的开销。

在某个时候,许多Google开发者产品的SDK都从Google品牌的端点切换到了使用Firebase品牌的端点。但无论哪种方式,数据流都是相同的,对https://firebaselogging.googleapis.com/的调用不一定意味着产品使用Firebase SDK。

尽管这确实令人困惑,但我在内部提出了一个问题,考虑再次更改为一个单一的Google品牌端点,或者使用每个产品的端点(这将失去前面提到的摊销效益的一部分)。

英文:

firebaser here

tl;dr: many non-Firebase Google use the https://firebaselogging.googleapis.com/ endpoint to log data to Google's servers, so calls to that endpoint do not have to originate from Firebase SDKs.


Most Google developer products that come with an SDK use a common infrastructure for logging application specific data from within the app back to Google. They use common endpoints for sending this logging, so that they can combine API calls from multiple SDKs into a single call to the logging backend - reducing/amortize the overhead of the logging.

At some point many of the SDKs for Google developer products switched over from a Google-branded endpoint to using a Firebase-branded endpoint. But the data flows is the same either way, and calls to the https://firebaselogging.googleapis.com/ does not necessarily mean that the product uses a Firebase SDK.

This is indeed confusing though, so I raised an issue internally to consider changing to a single Google-branded endpoint again, or to use a per-product endpoint (which would lose some of the amortization benefits mentioned earlier.

huangapple
  • 本文由 发表于 2023年5月25日 09:30:34
  • 转载请务必保留本文链接:https://go.coder-hub.com/76328337.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定