Skip to content

SocketException: Connection refused In Android 14 #107

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

Closed
nikunj-p-7span opened this issue Oct 17, 2024 · 4 comments
Closed

SocketException: Connection refused In Android 14 #107

nikunj-p-7span opened this issue Oct 17, 2024 · 4 comments

Comments

@nikunj-p-7span
Copy link

Segment: An internal error occurred: Unknown network error: ClientException with SocketException: Connection refused (OS Error: Connection refused, errno = 111), address = cdn-settings.segment.com, port = 39544, uri=https://cdn-settings.segment.com/v1/projects/CmNTik4B90AzDQ3s29orxFrOSBzhzzcM/settings

Segment: Could not receive settings from Segment. Device mode destinations will be ignored unless you specify default settings in the client config.
Screenshot 2024-10-17 at 1 11 46 PM

@JoshStrobl
Copy link

Getting the same on Android 15. Did you find any solution @nikunj-p-7span ?

@chrisdlangham
Copy link

@nikunj-p-7span I think you posted your api key.

I am also having this issue in iOS and Android

@neelkanth-kaushik
Copy link
Contributor

Hi @chrisdlangham @nikunj-p-7span ,

Is it possible for you to share how you are configuring and creating the client instance in the code?

I created the client as follows and there is no error at all:

// Initialize the Segment client with your write key
final analytics = createClient(
  Configuration(
      'WRITE_KEY',
      debug: true, // Enable debug logs
      flushPolicies: [
        CountFlushPolicy(10),
        TimerFlushPolicy(100)
      ],
      cdnHost: "cdn-settings.segment.com/v1"
  ),
);

Also I will suggest following troubleshooting steps to verify at your end:-

1. Check Internet Access

  • Ensure your development device/emulator has a working internet connection.

2. Check Firewall, Proxy, or VPN

  • Disable VPN or proxy (if used).

  • Check if a firewall or antivirus is blocking the request.

  • If you're on a corporate network, switch to a personal or mobile hotspot to test.

@chrisdlangham
Copy link

@neelkanth-kaushik I don't remember what the issue was. This was nearly two months ago, but I figured it out and no longer have this issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants