shorebirdtech / updater

libupdater code for Shorebird
Other
67 stars 13 forks source link

Patch Check Request failing when custom proxy is needed #220

Open zwells opened 3 days ago

zwells commented 3 days ago

When running the app on company devices with a custom proxy setting, (using flutter_native_proxy plugin so the app uses the network correctly), the call to the shorebird api fails since it's using its own thread. Is there a way for the plugin/updater to pick up the proxy settings so it can succeed? I've confirmed that the proxy itself is allowing traffic to api.shorebird.dev...

I disabled auto_update and used the plugin thinking maybe it would use the proxy settings after init, but no luck there either. I assume it's due to the nature of the background thread.


I/flutter (20810): [INFO:flutter/shell/common/shorebird/shorebird.cc(148)] Shorebird updater: active path: /data/user/0/com.company.app/files/shorebird_updater/patches/1/dlc.vmcode
I/flutter (20810): updater::updater: Reporting launch start.
I/flutter (20810): updater::cache::patch_manager: No public key provided, skipping signature verification
I/flutter (20810): [INFO:flutter/shell/common/shorebird/shorebird.cc(187)] Shorebird auto_update disabled, not checking for updates.
I/flutter (20810): updater::updater: Reporting successful launch.
I/flutter (20810): proxy enabled using internet.proxy.some-random-company.com:3128
I/flutter (20810): updater::network: Sending patch check request: PatchCheckRequest { app_id: "hidden", channel: "stable", release_version: "4.1.1+4055", platform: "android", arch: "aarch64" }
E/flutter (20810): updater::c_api: Error checking for update: error sending request for url (https://api.shorebird.dev/api/v1/patches/check): operation timed out
E/flutter (20810): 
E/flutter (20810): Caused by:
E/flutter (20810):     operation timed out
eseidel commented 3 days ago

We should add support for this, yes.