Closed asifrahiman closed 6 months ago
Just to confirm- after running am start -n com.google.android.adservices.api/com.android.adservices.ui.settings.activities.AdServicesSettingsMainActivity
are you clicking the toggle to enable the Privacy Sandbox? Asking because this error can happen if the Sandbox is not enabled.
Hi Chris,
Yes, we are enabling privacy sandbox toggle button before proceeding to the reminder of the commands.
On Tue, 25 Jul, 2023, 9:29 pm Chris Shmerling, @.***> wrote:
Just to confirm- after running am start -n com.google.android.adservices.api/com.android.adservices.ui.settings.activities.AdServicesSettingsMainActivity are you clicking the toggle to enable the Privacy Sandbox? Asking because this error can happen if the Sandbox is not enabled.
— Reply to this email directly, view it on GitHub https://github.com/android/privacy-sandbox-samples/issues/76#issuecomment-1650113066, or unsubscribe https://github.com/notifications/unsubscribe-auth/AELBZERJLVQCM4RTWR2XXO3XR7UO5ANCNFSM6AAAAAA2VTOL7Y . You are receiving this because you authored the thread.Message ID: @.***>
Thanks for confirming. I know of a few more steps to resolve this issue:
After these steps, you should be able to invoke the job. If not, let me know and I can see if there is anything else missing from your setup.
Hi, The step number 2 of the above response helped solve the issue, Thanks. However we are facing one more hurdle. Wrt MeasurementSampleApp After setting url we are able to send source and trigger events to server. However we are facing issue with reporting. We have forced the reporting jobs using the commands
emu64a:/ $ cmd jobscheduler run -f com.google.android.adservices.api 5
emu64a:/ $ cmd jobscheduler run -f com.google.android.adservices.api 7
emu64a:/ $ cmd jobscheduler run -f com.google.android.adservices.api 3
We have also set the time to 3 days later and triggered the above jobs But the report saving urls are not triggered from app.
We have verified the url of reporting and its same as the one given during the enrolment process. Could you help us in figuring out why the reporting jobs are not triggered?
We did find the below errors in the logcat :
2023-07-30 16:38:37.592 6593-17241 adservices com.google.android.adservices.api E Failed to get registration response: java.net.ConnectException: Failed to connect to /127.0.0.1:8080 2023-07-27 16:45:15.924 6593-6653 adservices com.google.android.adservices.api E Failed to get registration response: java.net.ConnectException: Failed to connect to /127.0.0.1:8080
Hi @cshmerling, Were you able to check on the above query?
Thanks for your patience. I've tried looking in to this issue, but have not come up with an adequate resolution. Flagging @erintwalsh who knows more about Measurement/ARA
hi @asifrahiman, would you mind reproducing the error and then running adb bugreport
, and attaching the file? Thank you!
Hi @erintwalsh, Issue here is that we are not receiving the event-report and aggregate-report requests which i believe is sent internally. The only way we could trigger there was force running jobs, event after which we are not receiving the requests. We are not sure how we can reproduce this scenario. There are no direct errors which are visible. Only one which seemed remotely close is as below.
2023-07-30 16:38:37.592 6593-17241 adservices com.google.android.adservices.api E Failed to get registration response: java.net.ConnectException: Failed to connect to /127.0.0.1:8080 2023-07-27 16:45:15.924 6593-6653 adservices com.google.android.adservices.api E Failed to get registration response: java.net.ConnectException: Failed to connect to /127.0.0.1:8080
if we just need to trigger the jobs and then get a adb bugreport
i will share it here.
bugreport-sdk_gphone64_arm64-URA8.230510.004-2023-08-07-12-25-49.zip
@asifrahiman thanks for your response! It looks like the error is that you're trying to use a localhost for your server. The Attribution API is not allowed to connect to a localhost; I would recommend hosting your endpoint on the cloud or elsewhere and then calling it with registerSource and registerTrigger.
Hi @erintwalsh We have set the url as https://psb.atomex.net and set up a MeasurementAdTechServer to handle the requests. We are recieving source and trigger requests in the server. We are only facing issue with event-report and aggregate-report.
hi @erintwalsh @cshmerling Any update on the above?
hi @asifrahiman,
Try running this command after you call each registerSource
and registerTrigger
:
For Tiramisu (API level 33) ext 5 and below:
adb shell cmd jobscheduler run -f com.google.android.adservices.api 15
For UpsideDownCake (API level 34) and above:
adb shell cmd jobscheduler run -f com.google.android.adservices.api 20
then follow each other step (run jobscheduler command 5, then set date and time forward, then jobscheduler command 3 and 7) afterwards
Hi @erintwalsh, It seems to have worked in sending the aggregate-report url but issue still remains.
The steps i did was as follows.
These are the total requests received at the server
However i believe the requests are coming with empty payload. Not sure if thats expected. Also when i am trying to fetch https://psb.atomex.net/event-reports. the response is empty array. Same for https://psb.atomex.net/aggregate-reports as well.
Let us know if theres anything we can do to look further into the issue.
hi @erintwalsh @cshmerling Any update on the above?
Hi @asifrahiman , we were not able to track down the issue. However, we have since released many updates to our SDK and emulator/device images. Can you try updating and letting us know if the issue persists?
Closing this due to inactivity. Please re-open the issue if you are still encountering the problem.
Hi Team, I am trying to set up privacy sandbox in emulater and facing issue
asifabdulrahiman@Affle-Macbook-77 MeasurementSampleApp % adb shell cmd jobscheduler run -f com.google.android.adservices.api 14
Could not find job 14 in package com.google.android.adservices.api / user 0
This also happens for any other job forced run as well
Please find the emulator details: Properties avd.ini.displayname UpsideDownCakePrivacySandbox avd.ini.encoding UTF-8 AvdId UpsideDownCakePrivacySandbox disk.dataPartition.size 6442450944 fastboot.chosenSnapshotFile fastboot.forceChosenSnapshotBoot no fastboot.forceColdBoot no fastboot.forceFastBoot yes hw.accelerometer yes hw.arc false hw.audioInput yes hw.battery yes hw.camera.back virtualscene hw.camera.front emulated hw.cpu.ncore 4 hw.device.hash2 MD5:3db3250dab5d0d93b29353040181c7e9 hw.device.manufacturer Generic hw.device.name medium_phone hw.dPad no hw.gps yes hw.gpu.enabled yes hw.gpu.mode auto hw.initialOrientation Portrait hw.keyboard yes hw.lcd.density 420 hw.lcd.height 2400 hw.lcd.width 1080 hw.mainKeys no hw.ramSize 2048 hw.sdCard yes hw.sensors.orientation yes hw.sensors.proximity yes hw.trackBall no image.androidVersion.api 33 image.androidVersion.codename UpsideDownCakePrivacySandbox image.sysdir.1 system-images/android-UpsideDownCakePrivacySandbox/google_apis_playstore/arm64-v8a/ PlayStore.enabled true runtime.network.latency none runtime.network.speed full showDeviceFrame no skin.dynamic yes skin.path.backup _no_skin tag.display Google Play tag.id google_apis_playstore vm.heapSize 228
I am running below commands to set up the emulator: am start -n com.google.android.adservices.api/com.android.adservices.ui.settings.activities.AdServicesSettingsMainActivity device_config put adservices ppapi_app_allow_list "" device_config put adservices ppapi_app_signature_allow_list "" device_config put adservices adservice_system_service_enabled true device_config put adservices adservice_enabled true device_config put adservices adservice_enable_status true device_config put adservices global_kill_switch false device_config put adservices disable_sdk_sandbox false device_config put adservices fledge_js_isolate_enforce_max_heap_size false setprop debug.adservices.disable_fledge_enrollment_check true cmd sdk_sandbox set-state --enabled device_config put adservices mdd_measurement_manifest_file_url "https://www.gstatic.com/mdi-serving/rubidium-adservices-adtech-enrollment/1450/48d1f12448dd1c9f8f11d4d8e78f2143f74076cb" cmd jobscheduler run -f com.google.android.adservices.api 14`